Struct aws_sdk_s3::model::CorsRule
source · [−]#[non_exhaustive]pub struct CorsRule {
pub id: Option<String>,
pub allowed_headers: Option<Vec<String>>,
pub allowed_methods: Option<Vec<String>>,
pub allowed_origins: Option<Vec<String>>,
pub expose_headers: Option<Vec<String>>,
pub max_age_seconds: i32,
}
Expand description
Specifies a cross-origin access rule for an Amazon S3 bucket.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: Option<String>
Unique identifier for the rule. The value cannot be longer than 255 characters.
allowed_headers: Option<Vec<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: Option<Vec<String>>
An HTTP method that you allow the origin to execute. Valid values are GET
, PUT
, HEAD
, POST
, and DELETE
.
allowed_origins: Option<Vec<String>>
One or more origins you want customers to be able to access the bucket from.
expose_headers: Option<Vec<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: i32
The time in seconds that your browser is to cache the preflight response for the specified resource.
Implementations
sourceimpl 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.
Trait Implementations
impl StructuralPartialEq for CorsRule
Auto Trait Implementations
impl RefUnwindSafe for CorsRule
impl Send for CorsRule
impl Sync for CorsRule
impl Unpin for CorsRule
impl UnwindSafe for CorsRule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more