Class CfnContainer
- All Implemented Interfaces:
IInspectable
,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 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();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnContainer
.static interface
A rule for a CORS policy.static interface
The metric policy that is associated with the container.static interface
A setting that enables metrics at the object level.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnContainer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnContainer
(software.amazon.jsii.JsiiObjectRef objRef) CfnContainer
(software.constructs.Construct scope, String id, CfnContainerProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe state of access logging on the container.The DNS endpoint of the container.The name for the container.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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAccessLoggingEnabled
(Boolean value) The state of access logging on the container.void
The state of access logging on the container.void
setContainerName
(String value) The name for the container.void
setCorsPolicy
(List<Object> value) void
setCorsPolicy
(IResolvable value) void
setLifecyclePolicy
(String value) void
setMetricPolicy
(IResolvable value) The metric policy that is associated with the container.void
The metric policy that is associated with the container.void
Creates an access policy for the specified container to restrict the users and clients that can access it.void
setTagsRaw
(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, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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) - 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
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in 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:
getCfnProperties
in classCfnResource
-
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. -
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.
-
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. -
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
-