libZSservicesZSamazonka-s3ZSamazonka-s3
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.S3.Types.CORSRule

Description

 
Synopsis

Documentation

data CORSRule Source #

Specifies a cross-origin access rule for an Amazon S3 bucket.

See: newCORSRule smart constructor.

Constructors

CORSRule' 

Fields

  • maxAgeSeconds :: Maybe Int

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

  • allowedHeaders :: Maybe [Text]

    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.

  • exposeHeaders :: Maybe [Text]

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

  • id :: Maybe Text

    Unique identifier for the rule. The value cannot be longer than 255 characters.

  • allowedMethods :: [Text]

    An HTTP method that you allow the origin to execute. Valid values are GET, PUT, HEAD, POST, and DELETE.

  • allowedOrigins :: [Text]

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

Instances

Instances details
Eq CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

Read CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

Show CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

Generic CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

Associated Types

type Rep CORSRule :: Type -> Type #

Methods

from :: CORSRule -> Rep CORSRule x #

to :: Rep CORSRule x -> CORSRule #

NFData CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

Methods

rnf :: CORSRule -> () #

Hashable CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

Methods

hashWithSalt :: Int -> CORSRule -> Int #

hash :: CORSRule -> Int #

FromXML CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

ToXML CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

Methods

toXML :: CORSRule -> XML #

type Rep CORSRule Source # 
Instance details

Defined in Amazonka.S3.Types.CORSRule

type Rep CORSRule = D1 ('MetaData "CORSRule" "Amazonka.S3.Types.CORSRule" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "CORSRule'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "maxAgeSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "allowedHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "exposeHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "allowedMethods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "allowedOrigins") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text])))))

newCORSRule :: CORSRule Source #

Create a value of CORSRule with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:maxAgeSeconds:CORSRule', cORSRule_maxAgeSeconds - The time in seconds that your browser is to cache the preflight response for the specified resource.

$sel:allowedHeaders:CORSRule', cORSRule_allowedHeaders - 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.

$sel:exposeHeaders:CORSRule', cORSRule_exposeHeaders - 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).

$sel:id:CORSRule', cORSRule_id - Unique identifier for the rule. The value cannot be longer than 255 characters.

$sel:allowedMethods:CORSRule', cORSRule_allowedMethods - An HTTP method that you allow the origin to execute. Valid values are GET, PUT, HEAD, POST, and DELETE.

$sel:allowedOrigins:CORSRule', cORSRule_allowedOrigins - One or more origins you want customers to be able to access the bucket from.

cORSRule_maxAgeSeconds :: Lens' CORSRule (Maybe Int) Source #

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

cORSRule_allowedHeaders :: Lens' CORSRule (Maybe [Text]) Source #

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.

cORSRule_exposeHeaders :: Lens' CORSRule (Maybe [Text]) Source #

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

cORSRule_id :: Lens' CORSRule (Maybe Text) Source #

Unique identifier for the rule. The value cannot be longer than 255 characters.

cORSRule_allowedMethods :: Lens' CORSRule [Text] Source #

An HTTP method that you allow the origin to execute. Valid values are GET, PUT, HEAD, POST, and DELETE.

cORSRule_allowedOrigins :: Lens' CORSRule [Text] Source #

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