Last chance! 50% off unlimited learning
Sale ends in
Returns the cors configuration information set for the bucket.
To use this operation, you must have permission to perform the s3:GetBucketCORS action. By default, the bucket owner has this permission and can grant it to others.
For more information about cors, see Enabling Cross-Origin Resource Sharing.
The following operations are related to
get_bucket_cors
:
s3_get_bucket_cors(Bucket, ExpectedBucketOwner)
[required] The bucket name for which to get the cors configuration.
The account id of the expected bucket owner. If the bucket is owned by a
different account, the request will fail with an HTTP
403 (Access Denied)
error.
A list with the following syntax:
list( CORSRules = list( list( AllowedHeaders = list( "string" ), AllowedMethods = list( "string" ), AllowedOrigins = list( "string" ), ExposeHeaders = list( "string" ), MaxAgeSeconds = 123 ) ) )
svc$get_bucket_cors( Bucket = "string", ExpectedBucketOwner = "string" )
# NOT RUN {
# The following example returns cross-origin resource sharing (CORS)
# configuration set on a bucket.
svc$get_bucket_cors(
Bucket = "examplebucket"
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab