Class CfnContainer
A CloudFormation AWS::MediaStore::Container
.
Inherited Members
Namespace: Amazon.CDK.AWS.MediaStore
Assembly: Amazon.CDK.AWS.MediaStore.dll
Syntax (csharp)
public class CfnContainer : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnContainer
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::MediaStore::Container
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediastore-container.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaStore;
var cfnContainer = new CfnContainer(this, "MyCfnContainer", new CfnContainerProps {
ContainerName = "containerName",
// the properties below are optional
AccessLoggingEnabled = false,
CorsPolicy = new [] { new CorsRuleProperty {
AllowedHeaders = new [] { "allowedHeaders" },
AllowedMethods = new [] { "allowedMethods" },
AllowedOrigins = new [] { "allowedOrigins" },
ExposeHeaders = new [] { "exposeHeaders" },
MaxAgeSeconds = 123
} },
LifecyclePolicy = "lifecyclePolicy",
MetricPolicy = new MetricPolicyProperty {
ContainerLevelMetrics = "containerLevelMetrics",
// the properties below are optional
MetricPolicyRules = new [] { new MetricPolicyRuleProperty {
ObjectGroup = "objectGroup",
ObjectGroupName = "objectGroupName"
} }
},
Policy = "policy",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnContainer(Construct, String, ICfnContainerProps) | Create a new |
CfnContainer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnContainer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AccessLoggingEnabled | The state of access logging on the container. |
AttrEndpoint | The DNS endpoint of the container. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ContainerName | The name for the container. |
CorsPolicy | Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests. |
LifecyclePolicy | Writes an object lifecycle policy to a container. |
MetricPolicy |
|
Policy | Creates an access policy for the specified container to restrict the users and clients that can access it. |
Tags |
|
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnContainer(Construct, String, ICfnContainerProps)
Create a new AWS::MediaStore::Container
.
public CfnContainer(Construct scope, string id, ICfnContainerProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnContainerProps
- resource properties.
CfnContainer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnContainer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnContainer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnContainer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AccessLoggingEnabled
The state of access logging on the container.
public virtual object AccessLoggingEnabled { get; set; }
Property Value
System.Object
Remarks
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 to true
, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.
AttrEndpoint
The DNS endpoint of the container.
public virtual string AttrEndpoint { get; }
Property Value
System.String
Remarks
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.
CloudformationAttribute: Endpoint
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ContainerName
The name for the container.
public virtual string ContainerName { get; set; }
Property Value
System.String
Remarks
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.
CorsPolicy
Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests.
public virtual object CorsPolicy { get; set; }
Property Value
System.Object
Remarks
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 .
LifecyclePolicy
Writes an object lifecycle policy to a container.
public virtual string LifecyclePolicy { get; set; }
Property Value
System.String
Remarks
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 .
MetricPolicy
AWS::MediaStore::Container.MetricPolicy
.
public virtual object MetricPolicy { get; set; }
Property Value
System.Object
Remarks
Policy
Creates an access policy for the specified container to restrict the users and clients that can access it.
public virtual string Policy { get; set; }
Property Value
System.String
Remarks
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
.
public virtual TagManager Tags { get; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>