AutoProvisioningGroup
- Implements: IAutoProvisioningGroup
This class encapsulates and extends the ROS resource type ALIYUN::ECS::AutoProvisioningGroup.
Initializers
import com.aliyun.ros.cdk.ecs.AutoProvisioningGroup;
AutoProvisioningGroup.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.totalTargetCapacity(java.lang.String)
.totalTargetCapacity(IResolvable)
// .autoProvisioningGroupName(java.lang.String)
// .autoProvisioningGroupName(IResolvable)
// .autoProvisioningGroupType(java.lang.String)
// .autoProvisioningGroupType(IResolvable)
// .checkExecutionStatus(java.lang.Boolean)
// .checkExecutionStatus(IResolvable)
// .dataDiskConfig(IResolvable)
// .dataDiskConfig(java.util.List<IResolvable)
// .dataDiskConfig(DataDiskConfigProperty>)
// .defaultTargetCapacityType(java.lang.String)
// .defaultTargetCapacityType(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .excessCapacityTerminationPolicy(java.lang.String)
// .excessCapacityTerminationPolicy(IResolvable)
// .launchConfiguration(IResolvable)
// .launchConfiguration(LaunchConfigurationProperty)
// .launchTemplateConfig(IResolvable)
// .launchTemplateConfig(java.util.List<IResolvable)
// .launchTemplateConfig(LaunchTemplateConfigProperty>)
// .launchTemplateId(java.lang.String)
// .launchTemplateId(IResolvable)
// .launchTemplateVersion(java.lang.String)
// .launchTemplateVersion(IResolvable)
// .maxSpotPrice(java.lang.Number)
// .maxSpotPrice(IResolvable)
// .minTargetCapacity(java.lang.String)
// .minTargetCapacity(IResolvable)
// .payAsYouGoAllocationStrategy(java.lang.String)
// .payAsYouGoAllocationStrategy(IResolvable)
// .payAsYouGoTargetCapacity(java.lang.String)
// .payAsYouGoTargetCapacity(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .resourcePoolOptions(IResolvable)
// .resourcePoolOptions(ResourcePoolOptionsProperty)
// .spotAllocationStrategy(java.lang.String)
// .spotAllocationStrategy(IResolvable)
// .spotInstanceInterruptionBehavior(java.lang.String)
// .spotInstanceInterruptionBehavior(IResolvable)
// .spotInstancePoolsToUseCount(java.lang.Number)
// .spotInstancePoolsToUseCount(IResolvable)
// .spotTargetCapacity(java.lang.String)
// .spotTargetCapacity(IResolvable)
// .systemDiskConfig(IResolvable)
// .systemDiskConfig(java.util.List<IResolvable)
// .systemDiskConfig(SystemDiskConfigProperty>)
// .terminateInstances(java.lang.Boolean)
// .terminateInstances(IResolvable)
// .terminateInstancesWithExpiration(java.lang.Boolean)
// .terminateInstancesWithExpiration(IResolvable)
// .validFrom(java.lang.String)
// .validFrom(IResolvable)
// .validUntil(java.lang.String)
// .validUntil(IResolvable)
.build();
| Name | Type | Description |
|---|---|---|
scope | com.aliyun.ros.cdk.core.Construct | No description. |
id | java.lang.String | No description. |
enableResourcePropertyConstraint | java.lang.Boolean | No description. |
totalTargetCapacity | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property totalTargetCapacity: The total target capacity of the auto provisioning group. |
autoProvisioningGroupName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoProvisioningGroupName: The name of the auto provisioning group to be created. |
autoProvisioningGroupType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property autoProvisioningGroupType: The delivery type of the auto provisioning group. |
checkExecutionStatus | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property checkExecutionStatus: Whether check execution status. |
dataDiskConfig | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property dataDiskConfig: List of instance data disk information. |
defaultTargetCapacityType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property defaultTargetCapacityType: Specifies the billing method for the capacity difference when the sum of PayAsYouGoTargetCapacity and SpotTargetCapacity is less than TotalTargetCapacity. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: The description of the auto provisioning group. |
excessCapacityTerminationPolicy | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property excessCapacityTerminationPolicy: Specifies whether to release instances when the real-time capacity of the auto provisioning group exceeds the target capacity and scale-in is triggered. |
launchConfiguration | com.aliyun.ros.cdk.core.IResolvable OR LaunchConfigurationProperty | Property launchConfiguration:. |
launchTemplateConfig | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property launchTemplateConfig:. |
launchTemplateId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property launchTemplateId: The ID of the instance launch template associated with the auto provisioning group. |
launchTemplateVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property launchTemplateVersion: The version of the launch template associated with the auto provisioning group. |
maxSpotPrice | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property maxSpotPrice: The global maximum price for preemptible instances in the auto provisioning group. |
minTargetCapacity | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property minTargetCapacity: The target minimum capacity of the elastic supply group. |
payAsYouGoAllocationStrategy | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property payAsYouGoAllocationStrategy: The scale-out policy for pay-as-you-go instances. |
payAsYouGoTargetCapacity | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property payAsYouGoTargetCapacity: The target capacity for pay-as-you-go instances in the auto provisioning group. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: The resource group ID. |
resourcePoolOptions | com.aliyun.ros.cdk.core.IResolvable OR ResourcePoolOptionsProperty | Property resourcePoolOptions: Resource pooling policy to use when creating an instance. |
spotAllocationStrategy | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property spotAllocationStrategy: The strategy for creating spot instances. |
spotInstanceInterruptionBehavior | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property spotInstanceInterruptionBehavior: The behavior when a spot instance is interrupted. |
spotInstancePoolsToUseCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property spotInstancePoolsToUseCount: Takes effect only when SpotAllocationStrategy is set to lowest-price. |
spotTargetCapacity | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property spotTargetCapacity: The target capacity for spot instances in the auto provisioning group. |
systemDiskConfig | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property systemDiskConfig: List of instance system disk information. |
terminateInstances | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property terminateInstances: Specifies whether to release instances in the group when you delete the auto provisioning group. |
terminateInstancesWithExpiration | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property terminateInstancesWithExpiration: Specifies whether to release instances in the group when the auto provisioning group expires. |
validFrom | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property validFrom: The start time of the auto provisioning group. |
validUntil | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property validUntil: The expiration time of the auto provisioning group. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
totalTargetCapacityRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property totalTargetCapacity: The total target capacity of the auto provisioning group.
Valid values: Positive integers. The total capacity must be greater than or equal to the sum of PayAsYouGoTargetCapacity (target capacity for pay-as-you-go instances) and SpotTargetCapacity (target capacity for spot instances).
autoProvisioningGroupNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoProvisioningGroupName: The name of the auto provisioning group to be created.
It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
autoProvisioningGroupTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoProvisioningGroupType: The delivery type of the auto provisioning group.
Valid values:
- request: One-time asynchronous delivery. The group delivers the instance cluster only at startup. If scheduling fails, no retry occurs.
- instant: One-time synchronous delivery. The group creates instances synchronously at startup and returns the list of successfully created instances and reasons for failures in the response.
- maintain: Continuous provisioning. The group attempts to deliver the instance cluster at startup and monitors real-time capacity. If the target capacity is not met, it continues creating ECS instances. Default value: maintain.
checkExecutionStatusOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property checkExecutionStatus: Whether check execution status.
If set true, ROS will check the state of AutoProvisioningGroup to be fulfilled. Otherwise ROS will regard AutoProvisioningGroup create failed.
dataDiskConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
DataDiskConfigProperty>
Property dataDiskConfig: List of instance data disk information.
defaultTargetCapacityTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property defaultTargetCapacityType: Specifies the billing method for the capacity difference when the sum of PayAsYouGoTargetCapacity and SpotTargetCapacity is less than TotalTargetCapacity.
Valid values:
- PayAsYouGo: Pay-as-you-go instances.
- Spot: Spot instances. Default value: Spot.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of the auto provisioning group.
excessCapacityTerminationPolicyOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property excessCapacityTerminationPolicy: Specifies whether to release instances when the real-time capacity of the auto provisioning group exceeds the target capacity and scale-in is triggered.
Valid values:
- termination: Releases scaled-in instances.
- no-termination: Only removes scaled-in instances from the auto provisioning group. Default value: no-termination.
launchConfigurationOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR LaunchConfigurationProperty
Property launchConfiguration:.
launchTemplateConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
LaunchTemplateConfigProperty>
Property launchTemplateConfig:.
launchTemplateIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property launchTemplateId: The ID of the instance launch template associated with the auto provisioning group.
You can call the DescribeLaunchTemplates operation to query available instance launch templates. An auto provisioning group can be associated with only one instance launch template. But you can configure multiple extended configurations for the launch template through the LaunchTemplateConfig parameter.
launchTemplateVersionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property launchTemplateVersion: The version of the launch template associated with the auto provisioning group.
Call DescribeLaunchTemplateVersions to query available launch template versions. Default value: The default version of the launch template.
maxSpotPriceOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property maxSpotPrice: The global maximum price for preemptible instances in the auto provisioning group.
If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
minTargetCapacityOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property minTargetCapacity: The target minimum capacity of the elastic supply group.
Value range: Positive integer. Once you have set this parameter, note that: Only create one-time synchronous delivery type elastic supply group (AutoProvisioningGroupType = instant), the parameters to take effect. If the inventory of instances in the current domain is less than this value, the call to the interface will fail and no instance will be created. If the instance inventory in the current domain is greater than the parameter value, the instance is created normally according to the other parameter values that have been set.
payAsYouGoAllocationStrategyOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property payAsYouGoAllocationStrategy: The scale-out policy for pay-as-you-go instances.
Valid values: lowest-price: The cost optimization policy the auto provisioning group follows to select instance types of the lowest cost to create instances. prioritized: The priority-based policy the auto provisioning group follows to create instances. The priority of an instance type is specified by the LaunchTemplateConfig.N.Priority parameter. Default value: lowest-price
payAsYouGoTargetCapacityOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property payAsYouGoTargetCapacity: The target capacity for pay-as-you-go instances in the auto provisioning group.
Valid values: Integers less than or equal to the value of TotalTargetCapacity.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The resource group ID.
resourcePoolOptionsOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR ResourcePoolOptionsProperty
Property resourcePoolOptions: Resource pooling policy to use when creating an instance.
Once you have set this parameter, note that: This parameter only applies if a pay-as-you-go instance is created. Only create one-time synchronous delivery type elastic supply group (AutoProvisioningGroupType = instant), the parameters to take effect.
spotAllocationStrategyOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property spotAllocationStrategy: The strategy for creating spot instances.
Valid values:
- lowest-price: Cost optimization strategy. Selects the instance type with the lowest price.
- diversified: Balanced zone distribution strategy. Creates instances across the zones specified in the launch template configurations and distributes them evenly.
- capacity-optimized: Capacity optimization strategy. Selects the optimal instance type and zone based on inventory availability. Default value: lowest-price.
spotInstanceInterruptionBehaviorOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property spotInstanceInterruptionBehavior: The behavior when a spot instance is interrupted.
Valid values:
- stop: Stops the instance.
- terminate: Releases the instance. Default value: terminate.
spotInstancePoolsToUseCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property spotInstancePoolsToUseCount: Takes effect only when SpotAllocationStrategy is set to lowest-price.
Specifies the number of lowest-priced instance types from which the auto provisioning group creates instances. Valid values: Less than the value of N in LaunchTemplateConfig.N.
spotTargetCapacityOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property spotTargetCapacity: The target capacity for spot instances in the auto provisioning group.
Valid values: Integers less than or equal to the value of TotalTargetCapacity.
systemDiskConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
SystemDiskConfigProperty>
Property systemDiskConfig: List of instance system disk information.
terminateInstancesOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property terminateInstances: Specifies whether to release instances in the group when you delete the auto provisioning group.
Valid values:
- true: Releases instances in the group.
- false: Retains instances in the group. Default value: false.
terminateInstancesWithExpirationOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property terminateInstancesWithExpiration: Specifies whether to release instances in the group when the auto provisioning group expires.
Valid values:
- true: Releases instances in the group.
- false: Only removes instances from the auto provisioning group. Default value: false.
validFromOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property validFrom: The start time of the auto provisioning group.
Used together with ValidUntil to define the validity period. Specify the time in ISO 8601 format using UTC+0 time. Format: yyyy-MM-ddTHH:mm:ssZ. Default value: The timestamp when the API call takes effect immediately.
validUntilOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property validUntil: The expiration time of the auto provisioning group.
Used together with ValidFrom to define the validity period. Specify the time in ISO 8601 format using UTC+0 time. Format: yyyy-MM-ddTHH:mm:ssZ. Default value: 2099-12-31T23:59:59Z.
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition | No description. |
addCount | No description. |
addDependency | No description. |
addResourceDesc | No description. |
applyRemovalPolicy | No description. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | No description. |
getAtt | No description. |
setMetadata | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.ecs.AutoProvisioningGroup;
AutoProvisioningGroup.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
ref | java.lang.String | No description. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
resource | com.aliyun.ros.cdk.core.RosResource | No description. |
attrAutoProvisioningGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AutoProvisioningGroupId: The ID of the auto provisioning group. |
attrAutoProvisioningGroupName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AutoProvisioningGroupName: The name of the auto provisioning group. |
props | AutoProvisioningGroupProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrAutoProvisioningGroupIdRequired
public java.lang.Object getAttrAutoProvisioningGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AutoProvisioningGroupId: The ID of the auto provisioning group.
attrAutoProvisioningGroupNameRequired
public java.lang.Object getAttrAutoProvisioningGroupName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AutoProvisioningGroupName: The name of the auto provisioning group.
propsRequired
public AutoProvisioningGroupProps getProps();