Class CfnContainer
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IContainerRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
A container is similar to a bucket in Amazon S3.
When you create a container using 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();
- See Also:
-
Nested Class Summary
Nested 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.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.mediastore.IContainerRef
IContainerRef.Jsii$Default, IContainerRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnContainer(software.amazon.jsii.JsiiObjectRef objRef) CfnContainer(software.constructs.Construct scope, String id, CfnContainerProps props) Create a newAWS::MediaStore::Container. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForContainer(IContainerRef resource) The state of access logging on the container.The DNS endpoint of the container.The name for the container.A reference to a Container resource.The metric policy that is associated with the container.Creates an access policy for the specified container to restrict the users and clients that can access it.getTags()Tag Manager which manages the tags for this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnContainer.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) voidsetCorsPolicy(IResolvable value) voidsetLifecyclePolicy(String value) voidsetMetricPolicy(IResolvable value) The metric policy that is associated with the container.voidThe metric policy that is associated with the container.voidCreates an access policy for the specified container to restrict the users and clients that can access it.voidsetTagsRaw(List<CfnTag> value) Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnContainer
protected CfnContainer(software.amazon.jsii.JsiiObjectRef objRef) -
CfnContainer
protected CfnContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnContainer
@Stability(Stable) public CfnContainer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnContainerProps props) Create a newAWS::MediaStore::Container.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForContainer
- Parameters:
resource- This parameter is required.
-
isCfnContainer
Checks whether the given object is a CfnContainer.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrEndpoint
The 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.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getContainerRef
A reference to a Container resource.- Specified by:
getContainerRefin interfaceIContainerRef
-
getTags
Tag Manager which manages the tags for this resource. -
getContainerName
The name for the container. -
setContainerName
The name for the container. -
getAccessLoggingEnabled
The state of access logging on the container.Returns union: either
BooleanorIResolvable -
setAccessLoggingEnabled
The state of access logging on the container. -
setAccessLoggingEnabled
The state of access logging on the container. -
getCorsPolicy
End of support notice: On November 13, 2025, AWS will discontinue support for AWS Elemental MediaStore.
Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnContainer.CorsRuleProperty> -
setCorsPolicy
End of support notice: On November 13, 2025, AWS will discontinue support for AWS Elemental MediaStore.
-
setCorsPolicy
End of support notice: On November 13, 2025, AWS will discontinue support for AWS Elemental MediaStore.
-
getLifecyclePolicy
End of support notice: On November 13, 2025, AWS will discontinue support for AWS Elemental MediaStore.
-
setLifecyclePolicy
End of support notice: On November 13, 2025, AWS will discontinue support for AWS Elemental MediaStore.
-
getMetricPolicy
The metric policy that is associated with the container.Returns union: either
IResolvableorCfnContainer.MetricPolicyProperty -
setMetricPolicy
The metric policy that is associated with the container. -
setMetricPolicy
The metric policy that is associated with the container. -
getPolicy
Creates an access policy for the specified container to restrict the users and clients that can access it. -
setPolicy
Creates an access policy for the specified container to restrict the users and clients that can access it. -
getTagsRaw
-
setTagsRaw
-