You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::S3::Types::CORSRule
- Inherits:
-
Struct
- Object
- Struct
- Aws::S3::Types::CORSRule
- Defined in:
- (unknown)
Overview
When passing CORSRule as input to an Aws::Client method, you can use a vanilla Hash:
{
allowed_headers: ["AllowedHeader"],
allowed_methods: ["AllowedMethod"], # required
allowed_origins: ["AllowedOrigin"], # required
expose_headers: ["ExposeHeader"],
max_age_seconds: 1,
}
Specifies a cross-origin access rule for an Amazon S3 bucket.
Instance Attribute Summary collapse
-
#allowed_headers ⇒ Array<String>
Headers that are specified in the
Access-Control-Request-Headers
header. -
#allowed_methods ⇒ Array<String>
An HTTP method that you allow the origin to execute.
-
#allowed_origins ⇒ Array<String>
One or more origins you want customers to be able to access the bucket from.
-
#expose_headers ⇒ Array<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). -
#max_age_seconds ⇒ Integer
The time in seconds that your browser is to cache the preflight response for the specified resource.
Instance Attribute Details
#allowed_headers ⇒ Array<String>
Headers that are specified in the Access-Control-Request-Headers
header. These headers are allowed in a preflight OPTIONS request. In
response to any preflight OPTIONS request, Amazon S3 returns any
requested headers that are allowed.
#allowed_methods ⇒ Array<String>
An HTTP method that you allow the origin to execute. Valid values are
GET
, PUT
, HEAD
, POST
, and DELETE
.
#allowed_origins ⇒ Array<String>
One or more origins you want customers to be able to access the bucket from.
#expose_headers ⇒ Array<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).
#max_age_seconds ⇒ Integer
The time in seconds that your browser is to cache the preflight response for the specified resource.