amazonka-mediastore-1.6.0: Amazon Elemental MediaStore SDK.

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

Network.AWS.MediaStore.PutCORSPolicy

Contents

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.

Synopsis

Creating a Request

putCORSPolicy Source #

Creates a value of PutCORSPolicy with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • pcpContainerName - The name of the container that you want to assign the CORS policy to.
  • pcpCORSPolicy - The CORS policy to apply to the container.

data PutCORSPolicy Source #

See: putCORSPolicy smart constructor.

Instances

Eq PutCORSPolicy Source # 
Data PutCORSPolicy Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutCORSPolicy -> c PutCORSPolicy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutCORSPolicy #

toConstr :: PutCORSPolicy -> Constr #

dataTypeOf :: PutCORSPolicy -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PutCORSPolicy) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutCORSPolicy) #

gmapT :: (forall b. Data b => b -> b) -> PutCORSPolicy -> PutCORSPolicy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutCORSPolicy -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutCORSPolicy -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutCORSPolicy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutCORSPolicy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutCORSPolicy -> m PutCORSPolicy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutCORSPolicy -> m PutCORSPolicy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutCORSPolicy -> m PutCORSPolicy #

Read PutCORSPolicy Source # 
Show PutCORSPolicy Source # 
Generic PutCORSPolicy Source # 

Associated Types

type Rep PutCORSPolicy :: * -> * #

Hashable PutCORSPolicy Source # 
ToJSON PutCORSPolicy Source # 
NFData PutCORSPolicy Source # 

Methods

rnf :: PutCORSPolicy -> () #

AWSRequest PutCORSPolicy Source # 
ToHeaders PutCORSPolicy Source # 
ToPath PutCORSPolicy Source # 
ToQuery PutCORSPolicy Source # 
type Rep PutCORSPolicy Source # 
type Rep PutCORSPolicy = D1 * (MetaData "PutCORSPolicy" "Network.AWS.MediaStore.PutCORSPolicy" "amazonka-mediastore-1.6.0-A5BXmXPQvTC35jIUjzEuvm" False) (C1 * (MetaCons "PutCORSPolicy'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_pcpContainerName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_pcpCORSPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (List1 CORSRule)))))
type Rs PutCORSPolicy Source # 

Request Lenses

pcpContainerName :: Lens' PutCORSPolicy Text Source #

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

pcpCORSPolicy :: Lens' PutCORSPolicy (NonEmpty CORSRule) Source #

The CORS policy to apply to the container.

Destructuring the Response

putCORSPolicyResponse Source #

Creates a value of PutCORSPolicyResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data PutCORSPolicyResponse Source #

See: putCORSPolicyResponse smart constructor.

Instances

Eq PutCORSPolicyResponse Source # 
Data PutCORSPolicyResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutCORSPolicyResponse -> c PutCORSPolicyResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutCORSPolicyResponse #

toConstr :: PutCORSPolicyResponse -> Constr #

dataTypeOf :: PutCORSPolicyResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PutCORSPolicyResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutCORSPolicyResponse) #

gmapT :: (forall b. Data b => b -> b) -> PutCORSPolicyResponse -> PutCORSPolicyResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutCORSPolicyResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutCORSPolicyResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutCORSPolicyResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutCORSPolicyResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutCORSPolicyResponse -> m PutCORSPolicyResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutCORSPolicyResponse -> m PutCORSPolicyResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutCORSPolicyResponse -> m PutCORSPolicyResponse #

Read PutCORSPolicyResponse Source # 
Show PutCORSPolicyResponse Source # 
Generic PutCORSPolicyResponse Source # 
NFData PutCORSPolicyResponse Source # 

Methods

rnf :: PutCORSPolicyResponse -> () #

type Rep PutCORSPolicyResponse Source # 
type Rep PutCORSPolicyResponse = D1 * (MetaData "PutCORSPolicyResponse" "Network.AWS.MediaStore.PutCORSPolicy" "amazonka-mediastore-1.6.0-A5BXmXPQvTC35jIUjzEuvm" True) (C1 * (MetaCons "PutCORSPolicyResponse'" PrefixI True) (S1 * (MetaSel (Just Symbol "_pcorsprsResponseStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int)))

Response Lenses