Class CfnCapacityProvider.ManagedInstancesProviderProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnCapacityProvider.ManagedInstancesProviderProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCapacityProvider.ManagedInstancesProviderProperty>
- Enclosing interface:
CfnCapacityProvider.ManagedInstancesProviderProperty
@Stability(Stable)
public static final class CfnCapacityProvider.ManagedInstancesProviderProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCapacityProvider.ManagedInstancesProviderProperty>
A builder for
CfnCapacityProvider.ManagedInstancesProviderProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.infrastructureOptimization(IResolvable infrastructureOptimization) infrastructureOptimization(CfnCapacityProvider.InfrastructureOptimizationProperty infrastructureOptimization) infrastructureRoleArn(String infrastructureRoleArn) instanceLaunchTemplate(IResolvable instanceLaunchTemplate) instanceLaunchTemplate(CfnCapacityProvider.InstanceLaunchTemplateProperty instanceLaunchTemplate) propagateTags(String propagateTags) Sets the value ofCfnCapacityProvider.ManagedInstancesProviderProperty.getPropagateTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
infrastructureRoleArn
@Stability(Stable) public CfnCapacityProvider.ManagedInstancesProviderProperty.Builder infrastructureRoleArn(String infrastructureRoleArn) - Parameters:
infrastructureRoleArn- The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS assumes to manage instances. This parameter is required. This role must include permissions for Amazon EC2 instance lifecycle management, networking, and any additional AWS services required for your workloads.For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide .
- Returns:
this
-
instanceLaunchTemplate
@Stability(Stable) public CfnCapacityProvider.ManagedInstancesProviderProperty.Builder instanceLaunchTemplate(IResolvable instanceLaunchTemplate) - Parameters:
instanceLaunchTemplate- The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances. This parameter is required. This includes the instance profile for your tasks, network and storage configuration, and instance requirements that determine which Amazon EC2 instance types can be used.For more information, see Store instance launch parameters in Amazon EC2 launch templates in the Amazon EC2 User Guide .
- Returns:
this
-
instanceLaunchTemplate
@Stability(Stable) public CfnCapacityProvider.ManagedInstancesProviderProperty.Builder instanceLaunchTemplate(CfnCapacityProvider.InstanceLaunchTemplateProperty instanceLaunchTemplate) - Parameters:
instanceLaunchTemplate- The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances. This parameter is required. This includes the instance profile for your tasks, network and storage configuration, and instance requirements that determine which Amazon EC2 instance types can be used.For more information, see Store instance launch parameters in Amazon EC2 launch templates in the Amazon EC2 User Guide .
- Returns:
this
-
infrastructureOptimization
@Stability(Stable) public CfnCapacityProvider.ManagedInstancesProviderProperty.Builder infrastructureOptimization(IResolvable infrastructureOptimization) Sets the value ofCfnCapacityProvider.ManagedInstancesProviderProperty.getInfrastructureOptimization()- Parameters:
infrastructureOptimization- Defines how Amazon ECS Managed Instances optimizes the infrastructure in your capacity provider. Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle EC2 instances optimization delay.- Returns:
this
-
infrastructureOptimization
@Stability(Stable) public CfnCapacityProvider.ManagedInstancesProviderProperty.Builder infrastructureOptimization(CfnCapacityProvider.InfrastructureOptimizationProperty infrastructureOptimization) Sets the value ofCfnCapacityProvider.ManagedInstancesProviderProperty.getInfrastructureOptimization()- Parameters:
infrastructureOptimization- Defines how Amazon ECS Managed Instances optimizes the infrastructure in your capacity provider. Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle EC2 instances optimization delay.- Returns:
this
-
propagateTags
@Stability(Stable) public CfnCapacityProvider.ManagedInstancesProviderProperty.Builder propagateTags(String propagateTags) Sets the value ofCfnCapacityProvider.ManagedInstancesProviderProperty.getPropagateTags()- Parameters:
propagateTags- Determines whether tags from the capacity provider are automatically applied to Amazon ECS Managed Instances. This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCapacityProvider.ManagedInstancesProviderProperty>- Returns:
- a new instance of
CfnCapacityProvider.ManagedInstancesProviderProperty - Throws:
NullPointerException- if any required attribute was not provided
-