put_container_policy
(**kwargs)¶Creates an access policy for the specified container to restrict the users and clients that can access it. For information about the data that is included in an access policy, see the AWS Identity and Access Management User Guide.
For this release of the REST API, you can create only one policy for a container. If you enter PutContainerPolicy
twice, the second command modifies the existing policy.
See also: AWS API Documentation
Request Syntax
response = client.put_container_policy(
ContainerName='string',
Policy='string'
)
[REQUIRED]
The name of the container.
[REQUIRED]
The contents of the policy, which includes the following:
Version
tagStatement
tag that contains the standard tags for the policy.dict
Response Syntax
{}
Response Structure
Exceptions
MediaStore.Client.exceptions.ContainerNotFoundException
MediaStore.Client.exceptions.ContainerInUseException
MediaStore.Client.exceptions.InternalServerError