libZSservicesZSamazonka-mediastoreZSamazonka-mediastore
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.MediaStore.PutCorsPolicy

Description

Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your AWS Elemental MediaStore container at my.example.container.com by using the browser's XMLHttpRequest capability.

To enable CORS on a container, you attach a CORS policy to the container. In the CORS policy, you configure rules that identify origins and the HTTP methods that can be executed on your container. The policy can contain up to 398,000 characters. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed.

To learn more about CORS, see Cross-Origin Resource Sharing (CORS) in AWS Elemental MediaStore.

Synopsis

Creating a Request

data PutCorsPolicy Source #

See: newPutCorsPolicy smart constructor.

Constructors

PutCorsPolicy' 

Fields

Instances

Instances details
Eq PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Read PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Show PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Generic PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Associated Types

type Rep PutCorsPolicy :: Type -> Type #

NFData PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Methods

rnf :: PutCorsPolicy -> () #

Hashable PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

ToJSON PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

AWSRequest PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Associated Types

type AWSResponse PutCorsPolicy #

ToHeaders PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

ToPath PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

ToQuery PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

type Rep PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

type Rep PutCorsPolicy = D1 ('MetaData "PutCorsPolicy" "Amazonka.MediaStore.PutCorsPolicy" "libZSservicesZSamazonka-mediastoreZSamazonka-mediastore" 'False) (C1 ('MetaCons "PutCorsPolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "containerName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "corsPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty CorsRule))))
type AWSResponse PutCorsPolicy Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

newPutCorsPolicy Source #

Create a value of PutCorsPolicy 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:containerName:PutCorsPolicy', putCorsPolicy_containerName - The name of the container that you want to assign the CORS policy to.

$sel:corsPolicy:PutCorsPolicy', putCorsPolicy_corsPolicy - The CORS policy to apply to the container.

Request Lenses

putCorsPolicy_containerName :: Lens' PutCorsPolicy Text Source #

The name of the container that you want to assign the CORS policy to.

putCorsPolicy_corsPolicy :: Lens' PutCorsPolicy (NonEmpty CorsRule) Source #

The CORS policy to apply to the container.

Destructuring the Response

data PutCorsPolicyResponse Source #

See: newPutCorsPolicyResponse smart constructor.

Constructors

PutCorsPolicyResponse' 

Fields

Instances

Instances details
Eq PutCorsPolicyResponse Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Read PutCorsPolicyResponse Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Show PutCorsPolicyResponse Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Generic PutCorsPolicyResponse Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Associated Types

type Rep PutCorsPolicyResponse :: Type -> Type #

NFData PutCorsPolicyResponse Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

Methods

rnf :: PutCorsPolicyResponse -> () #

type Rep PutCorsPolicyResponse Source # 
Instance details

Defined in Amazonka.MediaStore.PutCorsPolicy

type Rep PutCorsPolicyResponse = D1 ('MetaData "PutCorsPolicyResponse" "Amazonka.MediaStore.PutCorsPolicy" "libZSservicesZSamazonka-mediastoreZSamazonka-mediastore" 'False) (C1 ('MetaCons "PutCorsPolicyResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newPutCorsPolicyResponse Source #

Create a value of PutCorsPolicyResponse 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:httpStatus:PutCorsPolicyResponse', putCorsPolicyResponse_httpStatus - The response's http status code.

Response Lenses