Class CfnContainer
- All Implemented Interfaces:
- IConstruct,- IDependable,- IInspectable,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct
AWS::MediaStore::Container.
 The AWS::MediaStore::Container resource specifies a storage container to hold objects. A container is similar to a bucket in Amazon S3.
When you create a container using AWS CloudFormation , the template manages data for five API actions: creating a container, setting access logging, updating the default container policy, adding a cross-origin resource sharing (CORS) policy, and adding an object lifecycle policy.
Example:
 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.mediastore.*;
 CfnContainer cfnContainer = CfnContainer.Builder.create(this, "MyCfnContainer")
         .containerName("containerName")
         // the properties below are optional
         .accessLoggingEnabled(false)
         .corsPolicy(List.of(CorsRuleProperty.builder()
                 .allowedHeaders(List.of("allowedHeaders"))
                 .allowedMethods(List.of("allowedMethods"))
                 .allowedOrigins(List.of("allowedOrigins"))
                 .exposeHeaders(List.of("exposeHeaders"))
                 .maxAgeSeconds(123)
                 .build()))
         .lifecyclePolicy("lifecyclePolicy")
         .metricPolicy(MetricPolicyProperty.builder()
                 .containerLevelMetrics("containerLevelMetrics")
                 // the properties below are optional
                 .metricPolicyRules(List.of(MetricPolicyRuleProperty.builder()
                         .objectGroup("objectGroup")
                         .objectGroupName("objectGroupName")
                         .build()))
                 .build())
         .policy("policy")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 - 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnContainer.static interfaceA rule for a CORS policy.static interfaceThe metric policy that is associated with the container.static interfaceA setting that enables metrics at the object level.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstructIConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionCfnContainer(Construct scope, String id, CfnContainerProps props) Create a newAWS::MediaStore::Container.protectedCfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnContainer(software.amazon.jsii.JsiiObjectRef objRef) 
- 
Method SummaryModifier and TypeMethodDescriptionThe state of access logging on the container.The DNS endpoint of the container.The name for the container.Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests.Writes an object lifecycle policy to a container.AWS::MediaStore::Container.MetricPolicy.Creates an access policy for the specified container to restrict the users and clients that can access it.getTags()AWS::MediaStore::Container.Tags.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAccessLoggingEnabled(Boolean value) The state of access logging on the container.voidThe state of access logging on the container.voidsetContainerName(String value) The name for the container.voidsetCorsPolicy(List<Object> value) Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests.voidsetCorsPolicy(IResolvable value) Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests.voidsetLifecyclePolicy(String value) Writes an object lifecycle policy to a container.voidsetMetricPolicy(IResolvable value) AWS::MediaStore::Container.MetricPolicy.voidAWS::MediaStore::Container.MetricPolicy.voidCreates an access policy for the specified container to restrict the users and clients that can access it.Methods inherited from class software.amazon.awscdk.core.CfnResourceaddDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.core.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.ConstructgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnContainerprotected CfnContainer(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnContainerprotected CfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
CfnContainer@Stability(Stable) public CfnContainer(@NotNull Construct scope, @NotNull String id, @NotNull CfnContainerProps props) Create a newAWS::MediaStore::Container.- Parameters:
- scope-- scope in which this resource is defined.
 
- id-- scoped id of the resource.
 
- props-- resource properties.
 
 
 
- 
- 
Method Details- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin interface- IInspectable
- Parameters:
- inspector-- tree inspector to collect and process attributes.
 
 
- 
renderProperties@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
- renderPropertiesin class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getAttrEndpointThe DNS endpoint of the container.Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change. 
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getTagsAWS::MediaStore::Container.Tags.
- 
getContainerNameThe 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 moviesin every region, as long as you don’t have an existing container with that name.
- 
setContainerNameThe 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 moviesin every region, as long as you don’t have an existing container with that name.
- 
getAccessLoggingEnabledThe state of access logging on the container.This value is falseby 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.
- 
setAccessLoggingEnabledThe state of access logging on the container.This value is falseby 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.
- 
setAccessLoggingEnabledThe state of access logging on the container.This value is falseby 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.
- 
getCorsPolicySets 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 . 
- 
setCorsPolicySets 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 . 
- 
setCorsPolicySets 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 . 
- 
getLifecyclePolicyWrites 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 . 
- 
setLifecyclePolicyWrites 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 . 
- 
getMetricPolicyAWS::MediaStore::Container.MetricPolicy.
- 
setMetricPolicyAWS::MediaStore::Container.MetricPolicy.
- 
setMetricPolicyAWS::MediaStore::Container.MetricPolicy.
- 
getPolicyCreates 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 PutContainerPolicytwice, the second command modifies the existing policy.
- 
setPolicyCreates 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 PutContainerPolicytwice, the second command modifies the existing policy.
 
-