ElasticityAssuranceArgs

data class ElasticityAssuranceArgs(val assuranceTimes: Output<String>? = null, val description: Output<String>? = null, val instanceAmount: Output<Int>? = null, val instanceType: Output<String>? = null, val period: Output<Int>? = null, val periodUnit: Output<String>? = null, val privatePoolOptionsMatchCriteria: Output<String>? = null, val privatePoolOptionsName: Output<String>? = null, val resourceGroupId: Output<String>? = null, val startTime: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val zoneIds: Output<List<String>>? = null) : ConvertibleToJava<ElasticityAssuranceArgs>

Provides a Ecs Elasticity Assurance resource. For information about Ecs Elasticity Assurance and how to use it, see What is Elasticity Assurance.

NOTE: Available in v1.196.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.ecs.ElasticityAssurance;
import com.pulumi.alicloud.ecs.ElasticityAssuranceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.status("OK")
.build());
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("Instance")
.build());
final var defaultInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.instanceTypeFamily("ecs.c6")
.build());
var defaultElasticityAssurance = new ElasticityAssurance("defaultElasticityAssurance", ElasticityAssuranceArgs.builder()
.instanceAmount(1)
.description("before")
.zoneIds(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.privatePoolOptionsName("test_before")
.period(1)
.privatePoolOptionsMatchCriteria("Open")
.instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
.periodUnit("Month")
.assuranceTimes("Unlimited")
.resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
.build());
}
}

Import

Ecs Elasticity Assurance can be imported using the id, e.g.

$ pulumi import alicloud:ecs/elasticityAssurance:ElasticityAssurance example <id>

Constructors

Link copied to clipboard
fun ElasticityAssuranceArgs(assuranceTimes: Output<String>? = null, description: Output<String>? = null, instanceAmount: Output<Int>? = null, instanceType: Output<String>? = null, period: Output<Int>? = null, periodUnit: Output<String>? = null, privatePoolOptionsMatchCriteria: Output<String>? = null, privatePoolOptionsName: Output<String>? = null, resourceGroupId: Output<String>? = null, startTime: Output<String>? = null, tags: Output<Map<String, Any>>? = null, zoneIds: Output<List<String>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ElasticityAssuranceArgs

Properties

Link copied to clipboard
val assuranceTimes: Output<String>? = null

The total number of times that the elasticity assurance can be applied. Set the value to Unlimited. This value indicates that the elasticity assurance can be applied an unlimited number of times within its effective duration. Default value: Unlimited.

Link copied to clipboard
val description: Output<String>? = null

Description of flexible guarantee service.

Link copied to clipboard
val instanceAmount: Output<Int>? = null

The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.

Link copied to clipboard
val instanceType: Output<String>? = null

Instance type. Currently, only one instance type is supported.

Link copied to clipboard
val period: Output<Int>? = null

Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

Link copied to clipboard
val periodUnit: Output<String>? = null

Duration unit. Value range:-Month: Month-Year: YearDefault value: Year

Link copied to clipboard

The matching mode of flexible guarantee service. Possible values:-Open: flexible guarantee service for Open mode.-Target: specifies the flexible guarantee service of the mode.

Link copied to clipboard
val privatePoolOptionsName: Output<String>? = null

The name of the flexible protection service.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the resource group.

Link copied to clipboard
val startTime: Output<String>? = null

Flexible guarantee service effective time.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

The tag key-value pair information bound by the elastic guarantee service.

Link copied to clipboard
val zoneIds: Output<List<String>>? = null

The zone ID of the region to which the elastic Protection Service belongs. Currently, only the creation of flexible protection services in one available area is supported.