alicloud.ecs.ElasticityAssurance
Explore with Pulumi AI
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:
- 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 string - Instance type. Currently, only one instance type is supported.
- Zone
Ids 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.
- Assurance
Times 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.
- When the
- Period
Unit string - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- Private
Pool stringOptions Match Criteria - 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 stringOptions Name - The name of the flexible protection service.
- Resource
Group stringId - The ID of the resource group.
- Start
Time string - Flexible guarantee service effective time.
- Dictionary<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 string - Instance type. Currently, only one instance type is supported.
- Zone
Ids []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 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.
- When the
- Period
Unit string - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- Private
Pool stringOptions Match Criteria - 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 stringOptions Name - The name of the flexible protection service.
- Resource
Group stringId - The ID of the resource group.
- Start
Time string - Flexible guarantee service effective time.
- map[string]string
- The tag key-value pair information bound by the elastic guarantee service.
- instance
Amount Integer - The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
- instance
Type String - Instance type. Currently, only one instance type is supported.
- zone
Ids 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.
- assurance
Times 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.
- When the
- period
Unit String - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- private
Pool StringOptions Match Criteria - 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 StringOptions Name - The name of the flexible protection service.
- resource
Group StringId - The ID of the resource group.
- start
Time String - Flexible guarantee service effective time.
- Map<String,String>
- The tag key-value pair information bound by the elastic guarantee service.
- instance
Amount number - The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
- instance
Type string - Instance type. Currently, only one instance type is supported.
- zone
Ids 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 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.
- When the
- period
Unit string - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- private
Pool stringOptions Match Criteria - 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 stringOptions Name - The name of the flexible protection service.
- resource
Group stringId - The ID of the resource group.
- start
Time string - Flexible guarantee service effective time.
- {[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.
- When the
- period_
unit str - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- private_
pool_ stroptions_ match_ criteria - 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_ stroptions_ name - The name of the flexible protection service.
- resource_
group_ strid - The ID of the resource group.
- start_
time str - Flexible guarantee service effective time.
- Mapping[str, str]
- The tag key-value pair information bound by the elastic guarantee service.
- instance
Amount Number - The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
- instance
Type String - Instance type. Currently, only one instance type is supported.
- zone
Ids 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.
- assurance
Times 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.
- When the
- period
Unit String - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- private
Pool StringOptions Match Criteria - 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 StringOptions Name - The name of the flexible protection service.
- resource
Group StringId - The ID of the resource group.
- start
Time String - Flexible guarantee service effective time.
- 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:
- Elasticity
Assurance stringId - The first ID of the resource
- End
Time string - Flexible guarantee service failure time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Charge stringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- Start
Time stringType - 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.
- Used
Assurance intTimes - This parameter is not yet available.
- Elasticity
Assurance stringId - The first ID of the resource
- End
Time string - Flexible guarantee service failure time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Charge stringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- Start
Time stringType - 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.
- Used
Assurance intTimes - This parameter is not yet available.
- elasticity
Assurance StringId - The first ID of the resource
- end
Time String - Flexible guarantee service failure time.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Charge StringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- start
Time StringType - 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.
- used
Assurance IntegerTimes - This parameter is not yet available.
- elasticity
Assurance stringId - The first ID of the resource
- end
Time string - Flexible guarantee service failure time.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Charge stringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- start
Time stringType - 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.
- used
Assurance numberTimes - This parameter is not yet available.
- elasticity_
assurance_ strid - 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_ strtype - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- start_
time_ strtype - 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_ inttimes - This parameter is not yet available.
- elasticity
Assurance StringId - The first ID of the resource
- end
Time String - Flexible guarantee service failure time.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Charge StringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- start
Time StringType - 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.
- used
Assurance NumberTimes - 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.
- Assurance
Times 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.
- Elasticity
Assurance stringId - The first ID of the resource
- End
Time string - 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 stringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- Instance
Type 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.
- When the
- Period
Unit string - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- Private
Pool stringOptions Match Criteria - 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 stringOptions Name - The name of the flexible protection service.
- Resource
Group stringId - The ID of the resource group.
- Start
Time string - Flexible guarantee service effective time.
- Start
Time stringType - 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.
- Dictionary<string, string>
- The tag key-value pair information bound by the elastic guarantee service.
- Used
Assurance intTimes - This parameter is not yet available.
- Zone
Ids 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.
- Assurance
Times 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.
- Elasticity
Assurance stringId - The first ID of the resource
- End
Time string - 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 stringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- Instance
Type 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.
- When the
- Period
Unit string - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- Private
Pool stringOptions Match Criteria - 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 stringOptions Name - The name of the flexible protection service.
- Resource
Group stringId - The ID of the resource group.
- Start
Time string - Flexible guarantee service effective time.
- Start
Time stringType - 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.
- map[string]string
- The tag key-value pair information bound by the elastic guarantee service.
- Used
Assurance intTimes - This parameter is not yet available.
- Zone
Ids []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 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.
- elasticity
Assurance StringId - The first ID of the resource
- end
Time String - Flexible guarantee service failure time.
- instance
Amount Integer - The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
- instance
Charge StringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- instance
Type 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.
- When the
- period
Unit String - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- private
Pool StringOptions Match Criteria - 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 StringOptions Name - The name of the flexible protection service.
- resource
Group StringId - The ID of the resource group.
- start
Time String - Flexible guarantee service effective time.
- start
Time StringType - 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.
- Map<String,String>
- The tag key-value pair information bound by the elastic guarantee service.
- used
Assurance IntegerTimes - This parameter is not yet available.
- zone
Ids 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.
- assurance
Times 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.
- elasticity
Assurance stringId - The first ID of the resource
- end
Time string - Flexible guarantee service failure time.
- instance
Amount number - The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
- instance
Charge stringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- instance
Type 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.
- When the
- period
Unit string - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- private
Pool stringOptions Match Criteria - 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 stringOptions Name - The name of the flexible protection service.
- resource
Group stringId - The ID of the resource group.
- start
Time string - Flexible guarantee service effective time.
- start
Time stringType - 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.
- {[key: string]: string}
- The tag key-value pair information bound by the elastic guarantee service.
- used
Assurance numberTimes - This parameter is not yet available.
- zone
Ids 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_ strid - 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_ strtype - 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.
- When the
- period_
unit str - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- private_
pool_ stroptions_ match_ criteria - 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_ stroptions_ name - The name of the flexible protection service.
- resource_
group_ strid - The ID of the resource group.
- start_
time str - Flexible guarantee service effective time.
- start_
time_ strtype - 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.
- Mapping[str, str]
- The tag key-value pair information bound by the elastic guarantee service.
- used_
assurance_ inttimes - 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.
- assurance
Times 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.
- elasticity
Assurance StringId - The first ID of the resource
- end
Time String - Flexible guarantee service failure time.
- instance
Amount Number - The total number of instances for which to reserve the capacity of an instance type. Valid values: 1 to 1000.
- instance
Charge StringType - The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.
- instance
Type 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.
- When the
- period
Unit String - Duration unit. Value range:-Month: Month-Year: YearDefault value: Year
- private
Pool StringOptions Match Criteria - 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 StringOptions Name - The name of the flexible protection service.
- resource
Group StringId - The ID of the resource group.
- start
Time String - Flexible guarantee service effective time.
- start
Time StringType - 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.
- Map<String>
- The tag key-value pair information bound by the elastic guarantee service.
- used
Assurance NumberTimes - This parameter is not yet available.
- zone
Ids 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.