CfnContainerProps
- class aws_cdk.aws_mediastore.CfnContainerProps(*, container_name, access_logging_enabled=None, cors_policy=None, lifecycle_policy=None, metric_policy=None, policy=None, tags=None)
Bases:
object
Properties for defining a
CfnContainer
.- Parameters:
container_name (
str
) – The name for the container. The name must be from 1 to 255 characters. Container names must be unique to your AWS account within a specific region. As an example, you could create a container namedmovies
in every region, as long as you don’t have an existing container with that name.access_logging_enabled (
Union
[bool
,IResolvable
,None
]) – The state of access logging on the container. This value isfalse
by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value totrue
, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.cors_policy (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,CorsRuleProperty
,Dict
[str
,Any
]]],None
]) – 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 .lifecycle_policy (
Optional
[str
]) – Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect. For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy .metric_policy (
Union
[IResolvable
,MetricPolicyProperty
,Dict
[str
,Any
],None
]) –AWS::MediaStore::Container.MetricPolicy
.policy (
Optional
[str
]) – 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 enterPutContainerPolicy
twice, the second command modifies the existing policy.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) –AWS::MediaStore::Container.Tags
.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediastore-container.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_mediastore as mediastore cfn_container_props = mediastore.CfnContainerProps( container_name="containerName", # the properties below are optional access_logging_enabled=False, cors_policy=[mediastore.CfnContainer.CorsRuleProperty( allowed_headers=["allowedHeaders"], allowed_methods=["allowedMethods"], allowed_origins=["allowedOrigins"], expose_headers=["exposeHeaders"], max_age_seconds=123 )], lifecycle_policy="lifecyclePolicy", metric_policy=mediastore.CfnContainer.MetricPolicyProperty( container_level_metrics="containerLevelMetrics", # the properties below are optional metric_policy_rules=[mediastore.CfnContainer.MetricPolicyRuleProperty( object_group="objectGroup", object_group_name="objectGroupName" )] ), policy="policy", tags=[CfnTag( key="key", value="value" )] )
Attributes
- access_logging_enabled
The state of access logging on the container.
This value is
false
by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value totrue
, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.
- container_name
The name for the container.
The name must be from 1 to 255 characters. Container names must be unique to your AWS account within a specific region. As an example, you could create a container named
movies
in every region, as long as you don’t have an existing container with that name.
- cors_policy
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 .
- lifecycle_policy
Writes an object lifecycle policy to a container.
If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect.
For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy .
- metric_policy
AWS::MediaStore::Container.MetricPolicy
.
- policy
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.
- tags
AWS::MediaStore::Container.Tags
.