Class CfnContainerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnContainerProps>
- Enclosing interface:
CfnContainerProps
CfnContainerProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessLoggingEnabled
(Boolean accessLoggingEnabled) Sets the value ofCfnContainerProps.getAccessLoggingEnabled()
accessLoggingEnabled
(IResolvable accessLoggingEnabled) Sets the value ofCfnContainerProps.getAccessLoggingEnabled()
build()
Builds the configured instance.containerName
(String containerName) Sets the value ofCfnContainerProps.getContainerName()
corsPolicy
(List<? extends Object> corsPolicy) Sets the value ofCfnContainerProps.getCorsPolicy()
corsPolicy
(IResolvable corsPolicy) Sets the value ofCfnContainerProps.getCorsPolicy()
lifecyclePolicy
(String lifecyclePolicy) Sets the value ofCfnContainerProps.getLifecyclePolicy()
metricPolicy
(IResolvable metricPolicy) Sets the value ofCfnContainerProps.getMetricPolicy()
metricPolicy
(CfnContainer.MetricPolicyProperty metricPolicy) Sets the value ofCfnContainerProps.getMetricPolicy()
Sets the value ofCfnContainerProps.getPolicy()
Sets the value ofCfnContainerProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerName
Sets the value ofCfnContainerProps.getContainerName()
- Parameters:
containerName
- The name for the container. This parameter is required. 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.- Returns:
this
-
accessLoggingEnabled
@Stability(Stable) public CfnContainerProps.Builder accessLoggingEnabled(Boolean accessLoggingEnabled) Sets the value ofCfnContainerProps.getAccessLoggingEnabled()
- Parameters:
accessLoggingEnabled
- 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.- Returns:
this
-
accessLoggingEnabled
@Stability(Stable) public CfnContainerProps.Builder accessLoggingEnabled(IResolvable accessLoggingEnabled) Sets the value ofCfnContainerProps.getAccessLoggingEnabled()
- Parameters:
accessLoggingEnabled
- 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.- Returns:
this
-
corsPolicy
Sets the value ofCfnContainerProps.getCorsPolicy()
- Parameters:
corsPolicy
- 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 .
- Returns:
this
-
corsPolicy
Sets the value ofCfnContainerProps.getCorsPolicy()
- Parameters:
corsPolicy
- 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 .
- Returns:
this
-
lifecyclePolicy
Sets the value ofCfnContainerProps.getLifecyclePolicy()
- Parameters:
lifecyclePolicy
- 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 .
- Returns:
this
-
metricPolicy
Sets the value ofCfnContainerProps.getMetricPolicy()
- Parameters:
metricPolicy
- The metric policy that is associated with the container. A metric policy allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. In the policy, you must indicate whether you want MediaStore to send container-level metrics. You can also include rules to define groups of objects that you want MediaStore to send object-level metrics for.To view examples of how to construct a metric policy for your use case, see Example Metric Policies .
- Returns:
this
-
metricPolicy
@Stability(Stable) public CfnContainerProps.Builder metricPolicy(CfnContainer.MetricPolicyProperty metricPolicy) Sets the value ofCfnContainerProps.getMetricPolicy()
- Parameters:
metricPolicy
- The metric policy that is associated with the container. A metric policy allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. In the policy, you must indicate whether you want MediaStore to send container-level metrics. You can also include rules to define groups of objects that you want MediaStore to send object-level metrics for.To view examples of how to construct a metric policy for your use case, see Example Metric Policies .
- Returns:
this
-
policy
Sets the value ofCfnContainerProps.getPolicy()
- Parameters:
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.- Returns:
this
-
tags
Sets the value ofCfnContainerProps.getTags()
- Parameters:
tags
- the value to be set.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnContainerProps>
- Returns:
- a new instance of
CfnContainerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-