libZSservicesZSamazonka-apigatewayv2ZSamazonka-apigatewayv2
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.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

  • maxAge :: Maybe Int

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

  • allowMethods :: Maybe [Text]

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

  • allowHeaders :: Maybe [Text]

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

  • exposeHeaders :: Maybe [Text]

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

  • allowOrigins :: Maybe [Text]

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

  • allowCredentials :: Maybe Bool

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

Instances

Instances details
Eq Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Methods

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

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

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 #

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 #

NFData Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Methods

rnf :: Cors -> () #

Hashable Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

Methods

hashWithSalt :: Int -> Cors -> Int #

hash :: Cors -> Int #

ToJSON Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

FromJSON Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

type Rep Cors Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.Types.Cors

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

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:maxAge:Cors', cors_maxAge - The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

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

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

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

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

$sel:allowCredentials:Cors', cors_allowCredentials - Specifies whether credentials are included in the CORS request. 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.

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

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

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

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

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

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

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

Represents a collection of allowed origins. 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.