Learn R Programming

paws.storage (version 0.1.11)

s3_get_bucket_cors: Returns the cors configuration information set for the bucket

Description

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:

Usage

s3_get_bucket_cors(Bucket, ExpectedBucketOwner)

Arguments

Bucket

[required] The bucket name for which to get the cors configuration.

ExpectedBucketOwner

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.

Value

A list with the following syntax:

list(
  CORSRules = list(
    list(
      AllowedHeaders = list(
        "string"
      ),
      AllowedMethods = list(
        "string"
      ),
      AllowedOrigins = list(
        "string"
      ),
      ExposeHeaders = list(
        "string"
      ),
      MaxAgeSeconds = 123
    )
  )
)

Request syntax

svc$get_bucket_cors(
  Bucket = "string",
  ExpectedBucketOwner = "string"
)

Examples

Run this code
# 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