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,
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ecs.ReservedInstance("default",
instance_type="ecs.g6.large",
instance_amount="1",
period_unit="Year",
offering_type="All Upfront",
description="ReservedInstance",
zone_id="cn-shanghai-g",
scope="Zone",
period="1")import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.ecs.ReservedInstance("default", {
instanceType: "ecs.g6.large",
instanceAmount: "1",
periodUnit: "Year",
offeringType: "All Upfront",
description: "ReservedInstance",
zoneId: "cn-shanghai-g",
scope: "Zone",
period: "1",
});Create a ReservedInstance Resource
new ReservedInstance(name: string, args: ReservedInstanceArgs, opts?: CustomResourceOptions);def ReservedInstance(resource_name, opts=None, description=None, instance_amount=None, instance_type=None, name=None, offering_type=None, period=None, period_unit=None, platform=None, resource_group_id=None, scope=None, zone_id=None, __props__=None);func NewReservedInstance(ctx *Context, name string, args ReservedInstanceArgs, opts ...ResourceOption) (*ReservedInstance, error)public ReservedInstance(string name, ReservedInstanceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ReservedInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ReservedInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReservedInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ReservedInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ReservedInstance resource accepts the following input properties:
- Instance
Type string Instance type of the RI. For more information, see Instance type families.
- Description string
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
- Instance
Amount int Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
- Name string
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://.
- Offering
Type string 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.- Period int
- Period
Unit string Term unit. Optional value: Year.
- Platform string
The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.- Resource
Group stringId Resource group ID.
- Scope string
Scope of the RI. Optional values:
Region: region-level,Zone: zone-level. Default isRegion.- Zone
Id string 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.
- Instance
Type string Instance type of the RI. For more information, see Instance type families.
- Description string
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
- Instance
Amount int Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
- Name string
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://.
- Offering
Type string 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.- Period int
- Period
Unit string Term unit. Optional value: Year.
- Platform string
The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.- Resource
Group stringId Resource group ID.
- Scope string
Scope of the RI. Optional values:
Region: region-level,Zone: zone-level. Default isRegion.- Zone
Id string 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.
- instance
Type string Instance type of the RI. For more information, see Instance type families.
- description string
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
- instance
Amount number Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
- name string
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://.
- offering
Type string 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.- period number
- period
Unit string Term unit. Optional value: Year.
- platform string
The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.- resource
Group stringId Resource group ID.
- scope string
Scope of the RI. Optional values:
Region: region-level,Zone: zone-level. Default isRegion.- zone
Id string 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.
- instance_
type str Instance type of the RI. For more information, see Instance type families.
- description str
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
- instance_
amount float Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
- name str
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://.
- offering_
type str 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.- period float
- period_
unit str Term unit. Optional value: Year.
- platform str
The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.- resource_
group_ strid Resource group ID.
- scope str
Scope of the RI. Optional values:
Region: region-level,Zone: zone-level. Default isRegion.- zone_
id str 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the ReservedInstance resource produces the following output properties:
Look up an Existing ReservedInstance Resource
Get an existing ReservedInstance 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?: ReservedInstanceState, opts?: CustomResourceOptions): ReservedInstancestatic get(resource_name, id, opts=None, description=None, instance_amount=None, instance_type=None, name=None, offering_type=None, period=None, period_unit=None, platform=None, resource_group_id=None, scope=None, zone_id=None, __props__=None);func GetReservedInstance(ctx *Context, name string, id IDInput, state *ReservedInstanceState, opts ...ResourceOption) (*ReservedInstance, error)public static ReservedInstance Get(string name, Input<string> id, ReservedInstanceState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Description string
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
- Instance
Amount int Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
- Instance
Type string Instance type of the RI. For more information, see Instance type families.
- Name string
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://.
- Offering
Type string 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.- Period int
- Period
Unit string Term unit. Optional value: Year.
- Platform string
The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.- Resource
Group stringId Resource group ID.
- Scope string
Scope of the RI. Optional values:
Region: region-level,Zone: zone-level. Default isRegion.- Zone
Id string 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.
- Description string
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
- Instance
Amount int Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
- Instance
Type string Instance type of the RI. For more information, see Instance type families.
- Name string
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://.
- Offering
Type string 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.- Period int
- Period
Unit string Term unit. Optional value: Year.
- Platform string
The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.- Resource
Group stringId Resource group ID.
- Scope string
Scope of the RI. Optional values:
Region: region-level,Zone: zone-level. Default isRegion.- Zone
Id string 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.
- description string
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
- instance
Amount number Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
- instance
Type string Instance type of the RI. For more information, see Instance type families.
- name string
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://.
- offering
Type string 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.- period number
- period
Unit string Term unit. Optional value: Year.
- platform string
The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.- resource
Group stringId Resource group ID.
- scope string
Scope of the RI. Optional values:
Region: region-level,Zone: zone-level. Default isRegion.- zone
Id string 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.
- description str
Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
- instance_
amount float Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
- instance_
type str Instance type of the RI. For more information, see Instance type families.
- name str
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://.
- offering_
type str 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.- period float
- period_
unit str Term unit. Optional value: Year.
- platform str
The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.- resource_
group_ strid Resource group ID.
- scope str
Scope of the RI. Optional values:
Region: region-level,Zone: zone-level. Default isRegion.- zone_
id str 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.