replication_configurations
Creates, updates, deletes, gets or lists a replication_configurations resource.
Overview
| Name | replication_configurations |
| Type | Resource |
| Id | aws.efs.replication_configurations |
Fields
The following fields are returned by SELECT queries:
- describe_replication_configurations
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | Describes when the replication configuration was created. |
destinations | array | An array of destination objects. Only one destination object is supported. |
original_source_file_system_arn | string | The Amazon Resource Name (ARN) of the original source EFS file system in the replication configuration. |
source_file_system_arn | string | The Amazon Resource Name (ARN) of the current source file system in the replication configuration. |
source_file_system_id | string | The ID of the source Amazon EFS file system that is being replicated. (pattern: <code>^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$</code>) |
source_file_system_owner_id | string | ID of the Amazon Web Services account in which the source file system resides. (pattern: <code>^(\d{12})|(\d{4}-\d{4}-\d{4})$</code>) |
source_file_system_region | string | The Amazon Web Services Region in which the source EFS file system is located. (pattern: <code>^[a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-{0,1}[0-9]{0,1}$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_replication_configurations | select | region | FileSystemId, NextToken, MaxResults | Retrieves the replication configuration for a specific file system. If a file system is not specified, all of the replication configurations for the Amazon Web Services account in an Amazon Web Services Region are retrieved. |
create_replication_configuration | insert | source_file_system_id, region | Creates a replication configuration to either a new or existing EFS file system. For more information, see Amazon EFS replication in the Amazon EFS User Guide. The replication configuration specifies the following: Source file system – The EFS file system that you want to replicate. Destination file system – The destination file system to which the source file system is replicated. There can only be one destination file system in a replication configuration. A file system can be part of only one replication configuration. The destination parameters for the replication configuration depend on whether you are replicating to a new file system or to an existing file system, and if you are replicating across Amazon Web Services accounts. See DestinationToCreate for more information. This operation requires permissions for the elasticfilesystem:CreateReplicationConfiguration action. Additionally, other permissions are required depending on how you are replicating file systems. For more information, see Required permissions for replication in the Amazon EFS User Guide. | |
delete_replication_configuration | delete | source_file_system_id, region | deletionMode | Deletes a replication configuration. Deleting a replication configuration ends the replication process. After a replication configuration is deleted, the destination file system becomes Writeable and its replication overwrite protection is re-enabled. For more information, see Delete a replication configuration. This operation requires permissions for the elasticfilesystem:DeleteReplicationConfiguration action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
source_file_system_id | string | The ID of the source file system in the replication configuration. |
FileSystemId | string | You can retrieve the replication configuration for a specific file system by providing its file system ID. For cross-account,cross-region replication, an account can only describe the replication configuration for a file system in its own Region. |
MaxResults | integer | (Optional) To limit the number of objects returned in a response, you can specify the MaxItems parameter. The default value is 100. |
NextToken | string | NextToken is present if the response is paginated. You can use NextToken in a subsequent request to fetch the next page of output. |
deletionMode | string | When replicating across Amazon Web Services accounts or across Amazon Web Services Regions, Amazon EFS deletes the replication configuration from both the source and destination account or Region (ALL_CONFIGURATIONS) by default. If there's a configuration or permissions issue that prevents Amazon EFS from deleting the replication configuration from both sides, you can use the LOCAL_CONFIGURATION_ONLY mode to delete the replication configuration from only the local side (the account or Region from which the delete is performed). Only use the LOCAL_CONFIGURATION_ONLY mode in the case that Amazon EFS is unable to delete the replication configuration in both the source and destination account or Region. Deleting the local configuration leaves the configuration in the other account or Region unrecoverable. Additionally, do not use this mode for same-account, same-region replication as doing so results in a BadRequest exception error. |
SELECT examples
- describe_replication_configurations
Retrieves the replication configuration for a specific file system. If a file system is not specified, all of the replication configurations for the Amazon Web Services account in an Amazon Web Services Region are retrieved.
SELECT
creation_time,
destinations,
original_source_file_system_arn,
source_file_system_arn,
source_file_system_id,
source_file_system_owner_id,
source_file_system_region
FROM aws.efs.replication_configurations
WHERE region = '{{ region }}' -- required
AND FileSystemId = '{{ FileSystemId }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;
INSERT examples
- create_replication_configuration
- Manifest
Creates a replication configuration to either a new or existing EFS file system. For more information, see Amazon EFS replication in the Amazon EFS User Guide. The replication configuration specifies the following: Source file system – The EFS file system that you want to replicate. Destination file system – The destination file system to which the source file system is replicated. There can only be one destination file system in a replication configuration. A file system can be part of only one replication configuration. The destination parameters for the replication configuration depend on whether you are replicating to a new file system or to an existing file system, and if you are replicating across Amazon Web Services accounts. See DestinationToCreate for more information. This operation requires permissions for the elasticfilesystem:CreateReplicationConfiguration action. Additionally, other permissions are required depending on how you are replicating file systems. For more information, see Required permissions for replication in the Amazon EFS User Guide.
INSERT INTO aws.efs.replication_configurations (
Destinations,
source_file_system_id,
region
)
SELECT
'{{ Destinations }}',
'{{ source_file_system_id }}',
'{{ region }}'
RETURNING
creation_time,
destinations,
original_source_file_system_arn,
source_file_system_arn,
source_file_system_id,
source_file_system_owner_id,
source_file_system_region
;
# Description fields are for documentation purposes
- name: replication_configurations
props:
- name: source_file_system_id
value: "{{ source_file_system_id }}"
description: Required parameter for the replication_configurations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the replication_configurations resource.
- name: Destinations
value:
- Region: "{{ Region }}"
AvailabilityZoneName: "{{ AvailabilityZoneName }}"
KmsKeyId: "{{ KmsKeyId }}"
FileSystemId: "{{ FileSystemId }}"
RoleArn: "{{ RoleArn }}"
DELETE examples
- delete_replication_configuration
Deletes a replication configuration. Deleting a replication configuration ends the replication process. After a replication configuration is deleted, the destination file system becomes Writeable and its replication overwrite protection is re-enabled. For more information, see Delete a replication configuration. This operation requires permissions for the elasticfilesystem:DeleteReplicationConfiguration action.
DELETE FROM aws.efs.replication_configurations
WHERE source_file_system_id = '{{ source_file_system_id }}' --required
AND region = '{{ region }}' --required
AND deletionMode = '{{ deletionMode }}'
;