CmdID

CmdID / aws / aws mediastore

aws mediastore put-container-policy

Creates an access policy for the specified container to restrict the users and clients that can access it. AWS CLI reference

1 example 2 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To edit a container policy

The following put-container-policy example assigns a different policy to the specified container. In this example, the updated policy is defined in a file named LiveEventsContainerPolicy.json.

aws mediastore put-container-policy --container-name LiveEvents --policy file://LiveEventsContainerPolicy.jsonIdentify
--container-nameThe name of the container.
--policyThe contents of the policy, which includes the following: One Version tag One Statement tag that contains the standard tags for the policy.

Contents of LiveEventsContainerPolicy.json:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "MediaStoreFullAccess",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::123456789012:root"
            },
            "Action": "mediastore:*",
            "Resource": "arn:aws:mediastore:us-west-2:123456789012:container/LiveEvents/*",
            "Condition": {
                "Bool": {
                    "aws:SecureTransport": "true"
                }
            }
        }
    ]
}

This command produces no output.

Options

2 in the AWS CLI reference
--container-nameThe name of the container.
--policyThe contents of the policy, which includes the following: One Version tag One Statement tag that contains the standard tags for the policy.