netapp.storagegrid.na_sg_org_container module – Manage buckets on StorageGRID.
Note
This module is part of the netapp.storagegrid collection (version 21.16.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install netapp.storagegrid.
To use it in a playbook, specify: netapp.storagegrid.na_sg_org_container.
New in netapp.storagegrid 20.6.0
Synopsis
- Create S3 buckets on NetApp StorageGRID.
Parameters
Parameter | Comments |
|---|---|
api_url string / required | The url to the StorageGRID Admin Node REST API. |
auth_token string / required | The authorization token for the API request |
bucket_versioning_enabled boolean added in netapp.storagegrid 21.11.0 | Enable versioning on the bucket. This API requires StorageGRID 11.6 or greater. Choices:
|
capacity_limit float added in netapp.storagegrid 21.16.0 | The maximum number of GB available for this buckets’s objects. Represents a logical amount (object size), not a physical amount (size on disk). Requires storageGRID 11.9 or later. |
compliance dictionary | Configure compliance settings for an S3 bucket. Cannot be specified along with s3_object_lock_enabled. |
|
auto_delete boolean |
If enabled, objects will be deleted automatically when its retention period expires, unless the bucket is under a legal hold. Choices:
|
|
legal_hold boolean |
If enabled, objects in this bucket cannot be deleted, even if their retention period has expired. Choices:
|
|
retention_period_minutes integer |
specify the length of the retention period for objects added to this bucket, in minutes. |
consistency string added in netapp.storagegrid 21.15.0 | The consistency control affects the availability of objects for client requests. Choices:
|
name string / required | Name of the bucket. |
policy dictionary added in netapp.storagegrid 21.16.0 | Configure bucket policy. |
region string | Set a region for the bucket. |
s3_object_lock_enabled boolean added in netapp.storagegrid 21.9.0 | Enable S3 Object Lock on the bucket. S3 Object Lock requires StorageGRID 11.5 or greater. Choices:
|
state string | Whether the specified bucket should exist or not. Choices:
|
validate_certs boolean | Should https certificates be validated? Choices:
|
Notes
Note
- The modules prefixed with
na_sgare built to manage NetApp StorageGRID.
Examples
- name: create a s3 bucket
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
name: ansiblebucket1
- name: delete a s3 bucket
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: absent
name: ansiblebucket1
- name: create a s3 bucket with Object Lock
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
name: objectlock-bucket1
s3_object_lock_enabled: true
- name: create a s3 bucket with versioning enabled
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
name: ansiblebucket1
bucket_versioning_enabled: true
- name: create a s3 bucket with capacity_limit
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
name: ansiblebucket1
capacity_limit: 1.5
- name: create a s3 bucket with policy
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
name: ansiblebucket1
policy:
Statement:
- Sid: "string"
Effect: "Allow"
Action": "s3:GetObject"
Resource:
- "arn:aws:s3:::mybucket/myobject"
- "arn:aws:s3:::mybucket/myobject"
Principal: "*"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
resp dictionary | Returns information about the StorageGRID bucket. Returned: always Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/netapp/storagegrid/na_sg_org_container_module.html