You can retrieve the synchronization rules for a bucket.
HTTP request syntax (URI)
aws --endpoint-url https://company.com s3api get-bucket-replication --bucket "hcpcs_bucket"
Request structure
Not applicable.
Response structure
This is the response body for sync-to:
{ "ReplicationConfiguration": { "Role"": "", "Rules": [ { "Filter": { "And": { "Prefix": "SQS", "Tags": [ { "Value": "string", "Key": "string" } ] } }, "Status": "Enabled", "Destination": { "Bucket": "arn::sync-to::1.0::s3.amazonaws.com:443::<AWS-Region>::<AWSBucketName>::V4::true" }, "ID": "string" } ], } }
This is the response body for sync-from:
{ "ReplicationConfiguration": { "Role"": "", "Rules": [ { "Filter": { "And": { "Prefix": "string", "Tags": [ { "Value": "string", "Key": "string" } ] } }, "Status": "Enabled", "Destination": { "Bucket": "arn::sync-from::1.0::s3.amazonaws.com:443::<AWS-Region>::<AWSBucketName>::V4::true::AWS_SQS::<SQS-Region>::<SQS-QUEUE-TopicName>", }, "ID": "string" } ] } }
Parameter | Required | Type | Description |
---|---|---|---|
Role | Yes | N/A | Not supported; empty. |
Prefix | No | String | Prefix. |
Key | No | String | Tag key. |
Value | No | String | Tag value. Sets of prefixes and key-value pairs. |
Status | Yes | Boolean | If false, rule is ignored. |
Bucket | Yes | Base64-encoded JSON |
Bucket access settings. S3 access and secret keys are masked. |
ID | No | String | Unique identifier for rule, up to 255 characters. |
HTTP status codes
Status code |
HTTP name |
Description |
---|---|---|
200 | OK | The request was executed successfully. |
401 | Unauthorized | Access was denied due to invalid credentials. |
Example
Request example:
aws --endpoint-url https://10.08.1019 s3api get-bucket-replication --bucket "hcpcs_bucket"
JSON response:
{ "ReplicationConfiguration": { "Role"": "", "Rules": [ { "Filter": { "And": { "Prefix": "SQS", "Tags": [ { "Value": "cloud", "Key": "target" } ] } }, "Status": "Enabled", "Destination": { "Bucket": { 'version': 'version', 'action': 'sync-from', 'externalBucket': { 'host': 'host', 'type': 'type', 'region': 'region', 'remoteBucketName': 'bucket_name', 'port': 'port', 'authVersion': 'auth_version', 'usePathStyleAlways': '[true|false]' } }" }, "ID": "mirrorBack_rule_for_images" } ] } }