You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::S3::Types::CORSRule

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb

Overview

Note:

When making an API call, you may pass CORSRule data as a hash:

{
  allowed_headers: ["AllowedHeader"],
  allowed_methods: ["AllowedMethod"], # required
  allowed_origins: ["AllowedOrigin"], # required
  expose_headers: ["ExposeHeader"],
  max_age_seconds: 1,
}

Instance Attribute Summary collapse

Instance Attribute Details

#allowed_headersArray<String>

Specifies which headers are allowed in a pre-flight OPTIONS request.

Returns:

  • (Array<String>)


508
509
510
511
512
513
514
515
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 508

class CORSRule < Struct.new(
  :allowed_headers,
  :allowed_methods,
  :allowed_origins,
  :expose_headers,
  :max_age_seconds)
  include Aws::Structure
end

#allowed_methodsArray<String>

Identifies HTTP methods that the domain/origin specified in the rule is allowed to execute.

Returns:

  • (Array<String>)


508
509
510
511
512
513
514
515
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 508

class CORSRule < Struct.new(
  :allowed_headers,
  :allowed_methods,
  :allowed_origins,
  :expose_headers,
  :max_age_seconds)
  include Aws::Structure
end

#allowed_originsArray<String>

One or more origins you want customers to be able to access the bucket from.

Returns:

  • (Array<String>)


508
509
510
511
512
513
514
515
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 508

class CORSRule < Struct.new(
  :allowed_headers,
  :allowed_methods,
  :allowed_origins,
  :expose_headers,
  :max_age_seconds)
  include Aws::Structure
end

#expose_headersArray<String>

One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

Returns:

  • (Array<String>)


508
509
510
511
512
513
514
515
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 508

class CORSRule < Struct.new(
  :allowed_headers,
  :allowed_methods,
  :allowed_origins,
  :expose_headers,
  :max_age_seconds)
  include Aws::Structure
end

#max_age_secondsInteger

The time in seconds that your browser is to cache the preflight response for the specified resource.

Returns:

  • (Integer)


508
509
510
511
512
513
514
515
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 508

class CORSRule < Struct.new(
  :allowed_headers,
  :allowed_methods,
  :allowed_origins,
  :expose_headers,
  :max_age_seconds)
  include Aws::Structure
end