netapp.storagegrid.na_sg_org_container module – Manage buckets on StorageGRID.
Note
This module is part of the netapp.storagegrid collection (version 21.11.1).
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 |
---|---|
The url to the StorageGRID Admin Node REST API. |
|
The authorization token for the API request |
|
Enable versioning on the bucket. This API requires StorageGRID 11.6 or greater. Choices:
|
|
Configure compliance settings for an S3 bucket. Cannot be specified along with s3_object_lock_enabled. |
|
If enabled, objects will be deleted automatically when its retention period expires, unless the bucket is under a legal hold. Choices:
|
|
If enabled, objects in this bucket cannot be deleted, even if their retention period has expired. Choices:
|
|
specify the length of the retention period for objects added to this bucket, in minutes. |
|
Name of the bucket. |
|
Set a region for the bucket. |
|
Enable S3 Object Lock on the bucket. S3 Object Lock requires StorageGRID 11.5 or greater. Choices:
|
|
Whether the specified bucket should exist or not. Choices:
|
|
Should https certificates be validated? Choices:
|
Notes
Note
The modules prefixed with
na_sg
are 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
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Returns information about the StorageGRID bucket. Returned: always Sample: |