The GET Bucket compliance request allows you to determine the compliance settings currently in effect for a bucket that was created to be compliant.
You must have the s3:GetBucketCompliance permission, or be account root, to complete this operation.
This example request allows you to determine the compliance settings for the bucket named mybucket.
GET /mybucket/?x-ntap-sg-compliance HTTP/1.1 Date: date Authorization: authorization string Host: host
In the response XML, <SGCompliance> lists the compliance settings in effect for the bucket. This example response shows the compliance settings for a bucket in which each object will be retained for one year (525,600 minutes), starting from when the object is ingested into the grid. There is currently no legal hold on this bucket. Each object will be automatically deleted after one year.
HTTP/1.1 200 OK Date: date Connection: connection Server: StorageGRID/11.1.0 x-amz-request-id: request ID Content-Length: length Content-Type: application/xml <SGCompliance> <RetentionPeriodMinutes>525600</RetentionPeriodMinutes> <LegalHold>false</LegalHold> <AutoDelete>true</AutoDelete> </SGCompliance>
Name | Description |
---|---|
RetentionPeriodMinutes | The length of the retention period for objects added to this bucket, in minutes. The retention period starts when the object is ingested into the grid. |
LegalHold |
|
AutoDelete |
|
If the bucket was not created to be compliant, the HTTP status code for the response is 404 Not Found, with an S3 error code of XNoSuchBucketCompliance.