1. Packages
  2. Alicloud Provider
  3. API Docs
  4. ecs
  5. ElasticityAssurance
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.ecs.ElasticityAssurance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.resourcemanager.getResourceGroups({
        status: "OK",
    });
    const defaultGetZones = alicloud.getZones({
        availableResourceCreation: "Instance",
    });
    const defaultGetInstanceTypes = alicloud.ecs.getInstanceTypes({
        instanceTypeFamily: "ecs.c6",
    });
    const defaultElasticityAssurance = new alicloud.ecs.ElasticityAssurance("default", {
        instanceAmount: 1,
        description: "before",
        zoneIds: [defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[2]?.id)],
        privatePoolOptionsName: "test_before",
        period: 1,
        privatePoolOptionsMatchCriteria: "Open",
        instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
        periodUnit: "Month",
        assuranceTimes: "Unlimited",
        resourceGroupId: _default.then(_default => _default.ids?.[0]),
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.resourcemanager.get_resource_groups(status="OK")
    default_get_zones = alicloud.get_zones(available_resource_creation="Instance")
    default_get_instance_types = alicloud.ecs.get_instance_types(instance_type_family="ecs.c6")
    default_elasticity_assurance = alicloud.ecs.ElasticityAssurance("default",
        instance_amount=1,
        description="before",
        zone_ids=[default_get_zones.zones[2].id],
        private_pool_options_name="test_before",
        period=1,
        private_pool_options_match_criteria="Open",
        instance_type=default_get_instance_types.instance_types[0].id,
        period_unit="Month",
        assurance_times="Unlimited",
        resource_group_id=default.ids[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
    			Status: pulumi.StringRef("OK"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("Instance"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			InstanceTypeFamily: pulumi.StringRef("ecs.c6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewElasticityAssurance(ctx, "default", &ecs.ElasticityAssuranceArgs{
    			InstanceAmount: pulumi.Int(1),
    			Description:    pulumi.String("before"),
    			ZoneIds: pulumi.StringArray{
    				pulumi.String(defaultGetZones.Zones[2].Id),
    			},
    			PrivatePoolOptionsName:          pulumi.String("test_before"),
    			Period:                          pulumi.Int(1),
    			PrivatePoolOptionsMatchCriteria: pulumi.String("Open"),
    			InstanceType:                    pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
    			PeriodUnit:                      pulumi.String("Month"),
    			AssuranceTimes:                  pulumi.String("Unlimited"),
    			ResourceGroupId:                 pulumi.String(_default.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
        {
            Status = "OK",
        });
    
        var defaultGetZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "Instance",
        });
    
        var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            InstanceTypeFamily = "ecs.c6",
        });
    
        var defaultElasticityAssurance = new AliCloud.Ecs.ElasticityAssurance("default", new()
        {
            InstanceAmount = 1,
            Description = "before",
            ZoneIds = new[]
            {
                defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[2]?.Id),
            },
            PrivatePoolOptionsName = "test_before",
            Period = 1,
            PrivatePoolOptionsMatchCriteria = "Open",
            InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            PeriodUnit = "Month",
            AssuranceTimes = "Unlimited",
            ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
        });
    
    });
    
    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 default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
                .status("OK")
                .build());
    
            final var defaultGetZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("Instance")
                .build());
    
            final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .instanceTypeFamily("ecs.c6")
                .build());
    
            var defaultElasticityAssurance = new ElasticityAssurance("defaultElasticityAssurance", ElasticityAssuranceArgs.builder()
                .instanceAmount(1)
                .description("before")
                .zoneIds(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[2].id()))
                .privatePoolOptionsName("test_before")
                .period(1)
                .privatePoolOptionsMatchCriteria("Open")
                .instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .periodUnit("Month")
                .assuranceTimes("Unlimited")
                .resourceGroupId(default_.ids()[0])
                .build());
    
        }
    }
    
    resources:
      defaultElasticityAssurance:
        type: alicloud:ecs:ElasticityAssurance
        name: default
        properties:
          instanceAmount: 1
          description: before
          zoneIds:
            - ${defaultGetZones.zones[2].id}
          privatePoolOptionsName: test_before
          period: 1
          privatePoolOptionsMatchCriteria: Open
          instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
          periodUnit: Month
          assuranceTimes: Unlimited
          resourceGroupId: ${default.ids[0]}
    variables:
      default:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments:
            status: OK
      defaultGetZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: Instance
      defaultGetInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            instanceTypeFamily: ecs.c6
    

    Create ElasticityAssurance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ElasticityAssurance(name: string, args: ElasticityAssuranceArgs, opts?: CustomResourceOptions);
    @overload
    def ElasticityAssurance(resource_name: str,
                            args: ElasticityAssuranceArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ElasticityAssurance(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            instance_amount: Optional[int] = None,
                            instance_type: Optional[str] = None,
                            zone_ids: Optional[Sequence[str]] = None,
                            assurance_times: Optional[str] = None,
                            description: Optional[str] = None,
                            period: Optional[int] = None,
                            period_unit: Optional[str] = None,
                            private_pool_options_match_criteria: Optional[str] = None,
                            private_pool_options_name: Optional[str] = None,
                            resource_group_id: Optional[str] = None,
                            start_time: Optional[str] = None,
                            tags: Optional[Mapping[str, str]] = None)
    func NewElasticityAssurance(ctx *Context, name string, args ElasticityAssuranceArgs, opts ...ResourceOption) (*ElasticityAssurance, error)
    public ElasticityAssurance(string name, ElasticityAssuranceArgs args, CustomResourceOptions? opts = null)
    public ElasticityAssurance(String name, ElasticityAssuranceArgs args)
    public ElasticityAssurance(String name, ElasticityAssuranceArgs args, CustomResourceOptions options)
    
    type: alicloud:ecs:ElasticityAssurance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ElasticityAssuranceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ElasticityAssuranceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ElasticityAssuranceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ElasticityAssuranceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ElasticityAssuranceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var elasticityAssuranceResource = new AliCloud.Ecs.ElasticityAssurance("elasticityAssuranceResource", new()
    {
        InstanceAmount = 0,
        InstanceType = "string",
        ZoneIds = new[]
        {
            "string",
        },
        AssuranceTimes = "string",
        Description = "string",
        Period = 0,
        PeriodUnit = "string",
        PrivatePoolOptionsMatchCriteria = "string",
        PrivatePoolOptionsName = "string",
        ResourceGroupId = "string",
        StartTime = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := ecs.NewElasticityAssurance(ctx, "elasticityAssuranceResource", &ecs.ElasticityAssuranceArgs{
    	InstanceAmount: pulumi.Int(0),
    	InstanceType:   pulumi.String("string"),
    	ZoneIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AssuranceTimes:                  pulumi.String("string"),
    	Description:                     pulumi.String("string"),
    	Period:                          pulumi.Int(0),
    	PeriodUnit:                      pulumi.String("string"),
    	PrivatePoolOptionsMatchCriteria: pulumi.String("string"),
    	PrivatePoolOptionsName:          pulumi.String("string"),
    	ResourceGroupId:                 pulumi.String("string"),
    	StartTime:                       pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var elasticityAssuranceResource = new ElasticityAssurance("elasticityAssuranceResource", ElasticityAssuranceArgs.builder()
        .instanceAmount(0)
        .instanceType("string")
        .zoneIds("string")
        .assuranceTimes("string")
        .description("string")
        .period(0)
        .periodUnit("string")
        .privatePoolOptionsMatchCriteria("string")
        .privatePoolOptionsName("string")
        .resourceGroupId("string")
        .startTime("string")
        .tags(Map.of("string", "string"))
        .build());
    
    elasticity_assurance_resource = alicloud.ecs.ElasticityAssurance("elasticityAssuranceResource",
        instance_amount=0,
        instance_type="string",
        zone_ids=["string"],
        assurance_times="string",
        description="string",
        period=0,
        period_unit="string",
        private_pool_options_match_criteria="string",
        private_pool_options_name="string",
        resource_group_id="string",
        start_time="string",
        tags={
            "string": "string",
        })
    
    const elasticityAssuranceResource = new alicloud.ecs.ElasticityAssurance("elasticityAssuranceResource", {
        instanceAmount: 0,
        instanceType: "string",
        zoneIds: ["string"],
        assuranceTimes: "string",
        description: "string",
        period: 0,
        periodUnit: "string",
        privatePoolOptionsMatchCriteria: "string",
        privatePoolOptionsName: "string",
        resourceGroupId: "string",
        startTime: "string",
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:ecs:ElasticityAssurance
    properties:
        assuranceTimes: string
        description: string
        instanceAmount: 0
        instanceType: string
        period: 0
        periodUnit: string
        privatePoolOptionsMatchCriteria: string
        privatePoolOptionsName: string
        resourceGroupId: string
        startTime: string
        tags:
            string: string
        zoneIds:
            - string
    

    ElasticityAssurance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ElasticityAssurance resource accepts the following input properties:

    InstanceAmount int
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    InstanceType string
    Instance type. Currently, only one instance type is supported.
    ZoneIds List<string>
    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.
    AssuranceTimes string
    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.
    Description string
    Description of flexible guarantee service.
    Period int
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    PeriodUnit string
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    PrivatePoolOptionsMatchCriteria string
    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.
    PrivatePoolOptionsName string
    The name of the flexible protection service.
    ResourceGroupId string
    The ID of the resource group.
    StartTime string
    Flexible guarantee service effective time.
    Tags Dictionary<string, string>
    The tag key-value pair information bound by the elastic guarantee service.
    InstanceAmount int
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    InstanceType string
    Instance type. Currently, only one instance type is supported.
    ZoneIds []string
    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.
    AssuranceTimes string
    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.
    Description string
    Description of flexible guarantee service.
    Period int
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    PeriodUnit string
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    PrivatePoolOptionsMatchCriteria string
    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.
    PrivatePoolOptionsName string
    The name of the flexible protection service.
    ResourceGroupId string
    The ID of the resource group.
    StartTime string
    Flexible guarantee service effective time.
    Tags map[string]string
    The tag key-value pair information bound by the elastic guarantee service.
    instanceAmount Integer
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    instanceType String
    Instance type. Currently, only one instance type is supported.
    zoneIds List<String>
    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.
    assuranceTimes String
    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.
    description String
    Description of flexible guarantee service.
    period Integer
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    periodUnit String
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    privatePoolOptionsMatchCriteria String
    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.
    privatePoolOptionsName String
    The name of the flexible protection service.
    resourceGroupId String
    The ID of the resource group.
    startTime String
    Flexible guarantee service effective time.
    tags Map<String,String>
    The tag key-value pair information bound by the elastic guarantee service.
    instanceAmount number
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    instanceType string
    Instance type. Currently, only one instance type is supported.
    zoneIds string[]
    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.
    assuranceTimes string
    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.
    description string
    Description of flexible guarantee service.
    period number
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    periodUnit string
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    privatePoolOptionsMatchCriteria string
    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.
    privatePoolOptionsName string
    The name of the flexible protection service.
    resourceGroupId string
    The ID of the resource group.
    startTime string
    Flexible guarantee service effective time.
    tags {[key: string]: string}
    The tag key-value pair information bound by the elastic guarantee service.
    instance_amount int
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    instance_type str
    Instance type. Currently, only one instance type is supported.
    zone_ids Sequence[str]
    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.
    assurance_times str
    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.
    description str
    Description of flexible guarantee service.
    period int
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    period_unit str
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    private_pool_options_match_criteria str
    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.
    private_pool_options_name str
    The name of the flexible protection service.
    resource_group_id str
    The ID of the resource group.
    start_time str
    Flexible guarantee service effective time.
    tags Mapping[str, str]
    The tag key-value pair information bound by the elastic guarantee service.
    instanceAmount Number
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    instanceType String
    Instance type. Currently, only one instance type is supported.
    zoneIds List<String>
    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.
    assuranceTimes String
    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.
    description String
    Description of flexible guarantee service.
    period Number
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    periodUnit String
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    privatePoolOptionsMatchCriteria String
    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.
    privatePoolOptionsName String
    The name of the flexible protection service.
    resourceGroupId String
    The ID of the resource group.
    startTime String
    Flexible guarantee service effective time.
    tags Map<String>
    The tag key-value pair information bound by the elastic guarantee service.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ElasticityAssurance resource produces the following output properties:

    ElasticityAssuranceId string
    The first ID of the resource
    EndTime string
    Flexible guarantee service failure time.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceChargeType string
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    StartTimeType string
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    Status string
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    UsedAssuranceTimes int
    This parameter is not yet available.
    ElasticityAssuranceId string
    The first ID of the resource
    EndTime string
    Flexible guarantee service failure time.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceChargeType string
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    StartTimeType string
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    Status string
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    UsedAssuranceTimes int
    This parameter is not yet available.
    elasticityAssuranceId String
    The first ID of the resource
    endTime String
    Flexible guarantee service failure time.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceChargeType String
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    startTimeType String
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    status String
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    usedAssuranceTimes Integer
    This parameter is not yet available.
    elasticityAssuranceId string
    The first ID of the resource
    endTime string
    Flexible guarantee service failure time.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceChargeType string
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    startTimeType string
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    status string
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    usedAssuranceTimes number
    This parameter is not yet available.
    elasticity_assurance_id str
    The first ID of the resource
    end_time str
    Flexible guarantee service failure time.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_charge_type str
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    start_time_type str
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    status str
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    used_assurance_times int
    This parameter is not yet available.
    elasticityAssuranceId String
    The first ID of the resource
    endTime String
    Flexible guarantee service failure time.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceChargeType String
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    startTimeType String
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    status String
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    usedAssuranceTimes Number
    This parameter is not yet available.

    Look up Existing ElasticityAssurance Resource

    Get an existing ElasticityAssurance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ElasticityAssuranceState, opts?: CustomResourceOptions): ElasticityAssurance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            assurance_times: Optional[str] = None,
            description: Optional[str] = None,
            elasticity_assurance_id: Optional[str] = None,
            end_time: Optional[str] = None,
            instance_amount: Optional[int] = None,
            instance_charge_type: Optional[str] = None,
            instance_type: Optional[str] = None,
            period: Optional[int] = None,
            period_unit: Optional[str] = None,
            private_pool_options_match_criteria: Optional[str] = None,
            private_pool_options_name: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            start_time: Optional[str] = None,
            start_time_type: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            used_assurance_times: Optional[int] = None,
            zone_ids: Optional[Sequence[str]] = None) -> ElasticityAssurance
    func GetElasticityAssurance(ctx *Context, name string, id IDInput, state *ElasticityAssuranceState, opts ...ResourceOption) (*ElasticityAssurance, error)
    public static ElasticityAssurance Get(string name, Input<string> id, ElasticityAssuranceState? state, CustomResourceOptions? opts = null)
    public static ElasticityAssurance get(String name, Output<String> id, ElasticityAssuranceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AssuranceTimes string
    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.
    Description string
    Description of flexible guarantee service.
    ElasticityAssuranceId string
    The first ID of the resource
    EndTime string
    Flexible guarantee service failure time.
    InstanceAmount int
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    InstanceChargeType string
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    InstanceType string
    Instance type. Currently, only one instance type is supported.
    Period int
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    PeriodUnit string
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    PrivatePoolOptionsMatchCriteria string
    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.
    PrivatePoolOptionsName string
    The name of the flexible protection service.
    ResourceGroupId string
    The ID of the resource group.
    StartTime string
    Flexible guarantee service effective time.
    StartTimeType string
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    Status string
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    Tags Dictionary<string, string>
    The tag key-value pair information bound by the elastic guarantee service.
    UsedAssuranceTimes int
    This parameter is not yet available.
    ZoneIds List<string>
    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.
    AssuranceTimes string
    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.
    Description string
    Description of flexible guarantee service.
    ElasticityAssuranceId string
    The first ID of the resource
    EndTime string
    Flexible guarantee service failure time.
    InstanceAmount int
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    InstanceChargeType string
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    InstanceType string
    Instance type. Currently, only one instance type is supported.
    Period int
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    PeriodUnit string
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    PrivatePoolOptionsMatchCriteria string
    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.
    PrivatePoolOptionsName string
    The name of the flexible protection service.
    ResourceGroupId string
    The ID of the resource group.
    StartTime string
    Flexible guarantee service effective time.
    StartTimeType string
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    Status string
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    Tags map[string]string
    The tag key-value pair information bound by the elastic guarantee service.
    UsedAssuranceTimes int
    This parameter is not yet available.
    ZoneIds []string
    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.
    assuranceTimes String
    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.
    description String
    Description of flexible guarantee service.
    elasticityAssuranceId String
    The first ID of the resource
    endTime String
    Flexible guarantee service failure time.
    instanceAmount Integer
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    instanceChargeType String
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    instanceType String
    Instance type. Currently, only one instance type is supported.
    period Integer
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    periodUnit String
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    privatePoolOptionsMatchCriteria String
    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.
    privatePoolOptionsName String
    The name of the flexible protection service.
    resourceGroupId String
    The ID of the resource group.
    startTime String
    Flexible guarantee service effective time.
    startTimeType String
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    status String
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    tags Map<String,String>
    The tag key-value pair information bound by the elastic guarantee service.
    usedAssuranceTimes Integer
    This parameter is not yet available.
    zoneIds List<String>
    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.
    assuranceTimes string
    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.
    description string
    Description of flexible guarantee service.
    elasticityAssuranceId string
    The first ID of the resource
    endTime string
    Flexible guarantee service failure time.
    instanceAmount number
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    instanceChargeType string
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    instanceType string
    Instance type. Currently, only one instance type is supported.
    period number
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    periodUnit string
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    privatePoolOptionsMatchCriteria string
    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.
    privatePoolOptionsName string
    The name of the flexible protection service.
    resourceGroupId string
    The ID of the resource group.
    startTime string
    Flexible guarantee service effective time.
    startTimeType string
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    status string
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    tags {[key: string]: string}
    The tag key-value pair information bound by the elastic guarantee service.
    usedAssuranceTimes number
    This parameter is not yet available.
    zoneIds string[]
    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.
    assurance_times str
    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.
    description str
    Description of flexible guarantee service.
    elasticity_assurance_id str
    The first ID of the resource
    end_time str
    Flexible guarantee service failure time.
    instance_amount int
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    instance_charge_type str
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    instance_type str
    Instance type. Currently, only one instance type is supported.
    period int
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    period_unit str
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    private_pool_options_match_criteria str
    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.
    private_pool_options_name str
    The name of the flexible protection service.
    resource_group_id str
    The ID of the resource group.
    start_time str
    Flexible guarantee service effective time.
    start_time_type str
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    status str
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    tags Mapping[str, str]
    The tag key-value pair information bound by the elastic guarantee service.
    used_assurance_times int
    This parameter is not yet available.
    zone_ids Sequence[str]
    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.
    assuranceTimes String
    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.
    description String
    Description of flexible guarantee service.
    elasticityAssuranceId String
    The first ID of the resource
    endTime String
    Flexible guarantee service failure time.
    instanceAmount Number
    The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
    instanceChargeType String
    The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
    instanceType String
    Instance type. Currently, only one instance type is supported.
    period Number
    Length of purchase. The unit of duration is determined by the 'period_unit' parameter. Default value: 1.

    • When the period_unit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
    • When the period_unit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.
    periodUnit String
    Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
    privatePoolOptionsMatchCriteria String
    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.
    privatePoolOptionsName String
    The name of the flexible protection service.
    resourceGroupId String
    The ID of the resource group.
    startTime String
    Flexible guarantee service effective time.
    startTimeType String
    Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.
    status String
    The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.
    tags Map<String>
    The tag key-value pair information bound by the elastic guarantee service.
    usedAssuranceTimes Number
    This parameter is not yet available.
    zoneIds List<String>
    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.

    Import

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

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi