netapp.storagegrid.na_sg_org_cloud_mirror_replication module – Manage Cloud Mirror Replication 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_cloud_mirror_replication.

New in netapp.storagegrid 21.16.0

Synopsis

  • Manage Cloud Mirror Replication on 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_name

string / required

The name of the bucket for which to configure Cloud Mirror Replication.

rule

dictionary

The replication rule configuration.

destination

dictionary

The destination configuration for the replication rule.

bucket_urn

string

The URN of the destination bucket.

storage_class

string

The storage class for the destination bucket.

Choices:

  • "STANDARD"

  • "STANDARD_IA"

  • "REDUCED_REDUNDANCY"

  • "NEARLINE"

  • "COLDLINE"

  • "ARCHIVE"

id

string

The ID of the replication rule.

prefix

string

The prefix filter for the replication rule.

status

string

The status of the replication rule.

Choices:

  • "Enabled"

  • "Disabled"

state

string

The Cloud Mirror Replication should be present.

Choices:

  • "present" ← (default)

validate_certs

boolean

Should https certificates be validated?

Choices:

  • false

  • true ← (default)

xmlns

string

The XML namespace for the replication configuration.

Notes

Note

  • The modules prefixed with na_sg are built to manage NetApp StorageGRID.

Examples

- name: create cloud mirror replication
  netapp.storagegrid.na_sg_org_cloud_mirror_replication:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    state: present
    validate_certs: false
    bucket_name: bucket1
    xmlns: "http://1.2.3.4:10444/"
    rule:
      id: "rule1"
      status: "Enabled"
      prefix: "abc"
      destination:
        bucket_urn: "urn:sgws:s3:::bucket2"
        storage_class: "STANDARD"

- name: remove cloud mirror replication
  netapp.storagegrid.na_sg_org_cloud_mirror_replication:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    state: present
    validate_certs: false
    bucket_name: bucket1

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 cloud mirror replication.

Returned: always

Sample: {"replication": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ReplicationConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n  <Rule>\n    <ID>rule1</ID>\n    <Status>Enabled</Status>\n    <Prefix></Prefix>\n    <Destination>\n      <Bucket>arn:aws:s3:::mybucket-replicated</Bucket>\n      <StorageClass>STANDARD</StorageClass>\n    </Destination>\n    <Role>arn:aws:iam::35667example:role/CrossRegionReplicationRoleForS3</Role>\n  </Rule>\n</ReplicationConfiguration>\n"}

Authors

  • NetApp Ansible Team (@vinaykus)