Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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
- putCORSPolicy :: Text -> NonEmpty CORSRule -> PutCORSPolicy
- data PutCORSPolicy
- pcpContainerName :: Lens' PutCORSPolicy Text
- pcpCORSPolicy :: Lens' PutCORSPolicy (NonEmpty CORSRule)
- putCORSPolicyResponse :: Int -> PutCORSPolicyResponse
- data PutCORSPolicyResponse
- pcorsprsResponseStatus :: Lens' PutCORSPolicyResponse Int
Creating a Request
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
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:
pcorsprsResponseStatus
- -- | The response status code.
data PutCORSPolicyResponse Source #
See: putCORSPolicyResponse
smart constructor.
Instances
Response Lenses
pcorsprsResponseStatus :: Lens' PutCORSPolicyResponse Int Source #
- - | The response status code.