Learn R Programming

paws.storage (version 0.1.12)

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:

  • put_bucket_cors

  • delete_bucket_cors

Usage

s3_get_bucket_cors(Bucket, ExpectedBucketOwner)

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
    )
  )
)

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.

Request syntax

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

Examples

Run this code
if (FALSE) {
# The following example returns cross-origin resource sharing (CORS)
# configuration set on a bucket.
svc$get_bucket_cors(
  Bucket = "examplebucket"
)
}

Run the code above in your browser using DataLab