Struct aws_sdk_s3::model::CorsRule
source · #[non_exhaustive]pub struct CorsRule { /* private fields */ }
Expand description
Specifies a cross-origin access rule for an Amazon S3 bucket.
Implementations§
source§impl CorsRule
impl CorsRule
sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
Unique identifier for the rule. The value cannot be longer than 255 characters.
sourcepub fn allowed_headers(&self) -> Option<&[String]>
pub fn allowed_headers(&self) -> Option<&[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.
sourcepub fn allowed_methods(&self) -> Option<&[String]>
pub fn allowed_methods(&self) -> Option<&[String]>
An HTTP method that you allow the origin to execute. Valid values are GET
, PUT
, HEAD
, POST
, and DELETE
.
sourcepub fn allowed_origins(&self) -> Option<&[String]>
pub fn allowed_origins(&self) -> Option<&[String]>
One or more origins you want customers to be able to access the bucket from.
sourcepub fn expose_headers(&self) -> Option<&[String]>
pub fn expose_headers(&self) -> Option<&[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).
sourcepub fn max_age_seconds(&self) -> i32
pub fn max_age_seconds(&self) -> i32
The time in seconds that your browser is to cache the preflight response for the specified resource.