AutoProvisioningGroup
This class encapsulates and extends the ROS resource type ALIYUN::ECS::AutoProvisioningGroup, which is used to create an auto provisioning group.
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)
// .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)
// .payAsYouGoAllocationStrategy(java.lang.String)
// .payAsYouGoAllocationStrategy(IResolvable)
// .payAsYouGoTargetCapacity(java.lang.String)
// .payAsYouGoTargetCapacity(IResolvable)
// .spotAllocationStrategy(java.lang.String)
// .spotAllocationStrategy(IResolvable)
// .spotInstanceInterruptionBehavior(java.lang.String)
// .spotInstanceInterruptionBehavior(IResolvable)
// .spotInstancePoolsToUseCount(java.lang.Number)
// .spotInstancePoolsToUseCount(IResolvable)
// .spotTargetCapacity(java.lang.String)
// .spotTargetCapacity(IResolvable)
// .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 type of the auto provisioning group. |
checkExecutionStatus |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property checkExecutionStatus: Whether check execution status. |
defaultTargetCapacityType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property defaultTargetCapacityType: The type of supplemental instances. |
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: The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. |
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 instance 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. |
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 of pay-as-you-go instances in the auto provisioning group. |
spotAllocationStrategy |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property spotAllocationStrategy: The scale-out policy for preemptible instances. |
spotInstanceInterruptionBehavior |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property spotInstanceInterruptionBehavior: The default behavior after preemptible instances are shut down. |
spotInstancePoolsToUseCount |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property spotInstancePoolsToUseCount: This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. |
spotTargetCapacity |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property spotTargetCapacity: The target capacity of preemptible instances in the auto provisioning group. |
terminateInstances |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property terminateInstances: Specifies whether to release instances of the auto provisioning group. |
terminateInstancesWithExpiration |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property terminateInstancesWithExpiration: The shutdown policy for preemptible instances when the auto provisioning group expires. |
validFrom |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property validFrom: The time when the auto provisioning group is started. |
validUntil |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property validUntil: The time when the auto provisioning group expires. |
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.
The target capacity consists of the following three parts: The target capacity of pay-as-you-go instances specified by the PayAsYouGoTargetCapacity parameter The target capacity of preemptible instances specified by the SpotTargetCapacity parameter The supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity
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 type of the auto provisioning group.
Valid values: request: One-time delivery. After the auto provisioning group is started, it only attempts to create an instance cluster once. If the cluster fails to be created, the group does not try again. maintain: The continuous delivery and maintain capacity type. After the auto provisioning group is started, it continuously attempts to create and maintain the instance cluster. The auto provisioning group compares the real-time and target capacity of the cluster. If the cluster does not meet the target capacity, the group will create instances until the cluster meets the target capacity. 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.
defaultTargetCapacityTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property defaultTargetCapacityType: The type of supplemental instances.
When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values: PayAsYouGo: Pay-as-you-go instances. Spot: Preemptible 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: The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity.
Valid values: no-termination: Excess preemptible instances are not shut down. termination: Excess preemptible instances are to be shut down. The action to be performed on these shutdown instances is specified by the SpotInstanceInterruptionBehavior parameter. 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 instance launch template associated with the auto provisioning group.
You can call the DescribeLaunchTemplateVersions operation to query the versions of available instance launch templates.
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.
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 of pay-as-you-go instances in the auto provisioning group.
spotAllocationStrategyOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property spotAllocationStrategy: The scale-out policy for preemptible 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. diversified: The distribution balancing policy the auto provisioning group follows to evenly create instances across zones specified in multiple extended template configurations. Default value: lowest-price
spotInstanceInterruptionBehaviorOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property spotInstanceInterruptionBehavior: The default behavior after preemptible instances are shut down.
Value values: stop: stops preemptible instances. terminate: releases preemptible instances. Default value: stop
spotInstancePoolsToUseCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property spotInstancePoolsToUseCount: This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price.
The auto provisioning group selects instance types of the lowest cost to create instances.
spotTargetCapacityOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property spotTargetCapacity: The target capacity of preemptible instances in the auto provisioning group.
terminateInstancesOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property terminateInstances: Specifies whether to release instances of the auto provisioning group.
Valid values: true false Default: false
terminateInstancesWithExpirationOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property terminateInstancesWithExpiration: The shutdown policy for preemptible instances when the auto provisioning group expires.
Valid values: true: shuts down preemptible instances. The action to be performed on these shutdown instances is specified by the SpotInstanceInterruptionBehavior parameter. false: does not shut down preemptible instances. Default: false
validFromOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property validFrom: The time when the auto provisioning group is started.
The period of time between this point in time and the point in time specified by the ValidUntil parameter is the effective time period of the auto provisioning group. By default, an auto provisioning group is immediately started after creation.
validUntilOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property validUntil: The time when the auto provisioning group expires.
The period of time between this point in time and the point in time specified by the ValidFrom parameter is the effective time period of the auto provisioning group. By default, an auto provisioning group never expires.
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. |
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
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. |
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 |
com.aliyun.ros.cdk.core.IResolvable |
Attribute AutoProvisioningGroupId: The ID of the auto provisioning group. |
attrAutoProvisioningGroupName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute AutoProvisioningGroupName: The name of the auto provisioning group. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
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 IResolvable getAttrAutoProvisioningGroupId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute AutoProvisioningGroupId: The ID of the auto provisioning group.
attrAutoProvisioningGroupNameRequired
public IResolvable getAttrAutoProvisioningGroupName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute AutoProvisioningGroupName: The name of the auto provisioning group.