Class CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCapacityProvider.InstanceLaunchTemplateProperty>
- Enclosing interface:
CfnCapacityProvider.InstanceLaunchTemplateProperty
@Stability(Stable)
public static final class CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCapacityProvider.InstanceLaunchTemplateProperty>
A builder for
CfnCapacityProvider.InstanceLaunchTemplateProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.capacityOptionType(String capacityOptionType) ec2InstanceProfileArn(String ec2InstanceProfileArn) instanceRequirements(IResolvable instanceRequirements) instanceRequirements(CfnCapacityProvider.InstanceRequirementsRequestProperty instanceRequirements) monitoring(String monitoring) Sets the value ofCfnCapacityProvider.InstanceLaunchTemplateProperty.getMonitoring()networkConfiguration(IResolvable networkConfiguration) networkConfiguration(CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty networkConfiguration) storageConfiguration(IResolvable storageConfiguration) storageConfiguration(CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty storageConfiguration)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
ec2InstanceProfileArn
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder ec2InstanceProfileArn(String ec2InstanceProfileArn) - Parameters:
ec2InstanceProfileArn- The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This parameter is required. This instance profile must include the necessary permissions for your tasks to access AWS services and resources.For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide .
- Returns:
this
-
networkConfiguration
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder networkConfiguration(IResolvable networkConfiguration) - Parameters:
networkConfiguration- The network configuration for Amazon ECS Managed Instances. This parameter is required. This specifies the subnets and security groups that instances use for network connectivity.- Returns:
this
-
networkConfiguration
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder networkConfiguration(CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty networkConfiguration) - Parameters:
networkConfiguration- The network configuration for Amazon ECS Managed Instances. This parameter is required. This specifies the subnets and security groups that instances use for network connectivity.- Returns:
this
-
capacityOptionType
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder capacityOptionType(String capacityOptionType) - Parameters:
capacityOptionType- The capacity option type. This determines whether Amazon ECS launches On-Demand or Spot Instances for your managed instance capacity provider.Valid values are:
ON_DEMAND- Launches standard On-Demand Instances. On-Demand Instances provide predictable pricing and availability.SPOT- Launches Spot Instances that use spare Amazon EC2 capacity at reduced cost. Spot Instances can be interrupted by Amazon EC2 with a two-minute notification when the capacity is needed back.
The default is On-Demand
For more information about Amazon EC2 capacity options, see Instance purchasing options in the Amazon EC2 User Guide .
- Returns:
this
-
instanceRequirements
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder instanceRequirements(IResolvable instanceRequirements) - Parameters:
instanceRequirements- The instance requirements. You can specify:.- The instance types
- Instance requirements such as vCPU count, memory, network performance, and accelerator specifications
Amazon ECS automatically selects the instances that match the specified criteria.
- Returns:
this
-
instanceRequirements
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder instanceRequirements(CfnCapacityProvider.InstanceRequirementsRequestProperty instanceRequirements) - Parameters:
instanceRequirements- The instance requirements. You can specify:.- The instance types
- Instance requirements such as vCPU count, memory, network performance, and accelerator specifications
Amazon ECS automatically selects the instances that match the specified criteria.
- Returns:
this
-
monitoring
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder monitoring(String monitoring) Sets the value ofCfnCapacityProvider.InstanceLaunchTemplateProperty.getMonitoring()- Parameters:
monitoring- CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.- Returns:
this
-
storageConfiguration
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder storageConfiguration(IResolvable storageConfiguration) - Parameters:
storageConfiguration- The storage configuration for Amazon ECS Managed Instances. This defines the root volume size and type for the instances.- Returns:
this
-
storageConfiguration
@Stability(Stable) public CfnCapacityProvider.InstanceLaunchTemplateProperty.Builder storageConfiguration(CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty storageConfiguration) - Parameters:
storageConfiguration- The storage configuration for Amazon ECS Managed Instances. This defines the root volume size and type for the instances.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCapacityProvider.InstanceLaunchTemplateProperty>- Returns:
- a new instance of
CfnCapacityProvider.InstanceLaunchTemplateProperty - Throws:
NullPointerException- if any required attribute was not provided
-