amazonka-apigatewayv2-2.0: Amazon ApiGatewayV2 SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.ApiGatewayV2.Types.Cors

Description

 
Synopsis

Documentation

data Cors Source #

Represents a CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

See: newCors smart constructor.

Constructors

Cors' 

Fields

  • allowCredentials :: Maybe Bool

    Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

  • allowHeaders :: Maybe [Text]

    Represents a collection of allowed headers. Supported only for HTTP APIs.

  • allowMethods :: Maybe [Text]

    Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

  • allowOrigins :: Maybe [Text]

    Represents a collection of allowed origins. Supported only for HTTP APIs.

  • exposeHeaders :: Maybe [Text]

    Represents a collection of exposed headers. Supported only for HTTP APIs.

  • maxAge :: Maybe Int

    The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

Instances

Instances details
FromJSON Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

ToJSON Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Generic Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Associated Types

type Rep Cors :: Type -> Type #

Methods

from :: Cors -> Rep Cors x #

to :: Rep Cors x -> Cors #

Read Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Show Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Methods

showsPrec :: Int -> Cors -> ShowS #

show :: Cors -> String #

showList :: [Cors] -> ShowS #

NFData Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Methods

rnf :: Cors -> () #

Eq Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Methods

(==) :: Cors -> Cors -> Bool #

(/=) :: Cors -> Cors -> Bool #

Hashable Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Methods

hashWithSalt :: Int -> Cors -> Int #

hash :: Cors -> Int #

type Rep Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

type Rep Cors = D1 ('MetaData "Cors" "Amazonka.ApiGatewayV2.Types.Cors" "amazonka-apigatewayv2-2.0-4MZ8oueToeLOWomgegceF" 'False) (C1 ('MetaCons "Cors'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "allowCredentials") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "allowHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "allowMethods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: (S1 ('MetaSel ('Just "allowOrigins") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "exposeHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "maxAge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))))))

newCors :: Cors Source #

Create a value of Cors 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:allowCredentials:Cors', cors_allowCredentials - Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

$sel:allowHeaders:Cors', cors_allowHeaders - Represents a collection of allowed headers. Supported only for HTTP APIs.

$sel:allowMethods:Cors', cors_allowMethods - Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

$sel:allowOrigins:Cors', cors_allowOrigins - Represents a collection of allowed origins. Supported only for HTTP APIs.

$sel:exposeHeaders:Cors', cors_exposeHeaders - Represents a collection of exposed headers. Supported only for HTTP APIs.

$sel:maxAge:Cors', cors_maxAge - The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

cors_allowCredentials :: Lens' Cors (Maybe Bool) Source #

Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

cors_allowHeaders :: Lens' Cors (Maybe [Text]) Source #

Represents a collection of allowed headers. Supported only for HTTP APIs.

cors_allowMethods :: Lens' Cors (Maybe [Text]) Source #

Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

cors_allowOrigins :: Lens' Cors (Maybe [Text]) Source #

Represents a collection of allowed origins. Supported only for HTTP APIs.

cors_exposeHeaders :: Lens' Cors (Maybe [Text]) Source #

Represents a collection of exposed headers. Supported only for HTTP APIs.

cors_maxAge :: Lens' Cors (Maybe Int) Source #

The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.