Class ReservedInstance
Provides an Reserved Instance resource.
NOTE: Available in 1.65.0+
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var @default = new AliCloud.Ecs.ReservedInstance("default", new AliCloud.Ecs.ReservedInstanceArgs
{
InstanceType = "ecs.g6.large",
InstanceAmount = "1",
PeriodUnit = "Year",
OfferingType = "All Upfront",
Description = "ReservedInstance",
ZoneId = "cn-shanghai-g",
Scope = "Zone",
Period = "1",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.Ecs
Assembly: Pulumi.AliCloud.dll
Syntax
public class ReservedInstance : CustomResource
Constructors
View SourceReservedInstance(String, ReservedInstanceArgs, CustomResourceOptions)
Create a ReservedInstance resource with the given unique name, arguments, and options.
Declaration
public ReservedInstance(string name, ReservedInstanceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ReservedInstanceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDescription
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceAmount
Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
Declaration
public Output<int> InstanceAmount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
InstanceType
Instance type of the RI. For more information, see Instance type families.
Declaration
public Output<string> InstanceType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Name of the RI. The name must be a string of 2 to 128 characters in length and can contain letters, numbers, colons (:), underscores (_), and hyphens. It must start with a letter. It cannot start with http:// or https://.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OfferingType
Payment type of the RI. Optional values: No Upfront: No upfront payment is required., Partial Upfront: A portion of upfront payment is required.All Upfront: Full upfront payment is required.
Declaration
public Output<string> OfferingType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Period
Declaration
public Output<int?> Period { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
PeriodUnit
Term unit. Optional value: Year.
Declaration
public Output<string> PeriodUnit { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Platform
The operating system type of the image used by the instance. Optional values: Windows, Linux. Default is Linux.
Declaration
public Output<string> Platform { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupId
Resource group ID.
Declaration
public Output<string> ResourceGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Scope
Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.
Declaration
public Output<string> Scope { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ZoneId
ID of the zone to which the RI belongs. When Scope is set to Zone, this parameter is required. For information about the zone list, see DescribeZones.
Declaration
public Output<string> ZoneId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ReservedInstanceState, CustomResourceOptions)
Get an existing ReservedInstance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ReservedInstance Get(string name, Input<string> id, ReservedInstanceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ReservedInstanceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ReservedInstance |