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

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);
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:

InstanceType 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://.

InstanceAmount 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://.

OfferingType 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
PeriodUnit string

Term unit. Optional value: Year.

Platform string

The operating system type of the image used by the instance. Optional values: Windows, Linux. Default is Linux.

ResourceGroupId string

Resource group ID.

Scope string

Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.

ZoneId 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.

InstanceType 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://.

InstanceAmount 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://.

OfferingType 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
PeriodUnit string

Term unit. Optional value: Year.

Platform string

The operating system type of the image used by the instance. Optional values: Windows, Linux. Default is Linux.

ResourceGroupId string

Resource group ID.

Scope string

Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.

ZoneId 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.

instanceType 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://.

instanceAmount 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://.

offeringType 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
periodUnit string

Term unit. Optional value: Year.

platform string

The operating system type of the image used by the instance. Optional values: Windows, Linux. Default is Linux.

resourceGroupId string

Resource group ID.

scope string

Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.

zoneId 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 is Linux.

resource_group_id str

Resource group ID.

scope str

Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.

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:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

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): ReservedInstance
static 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://.

InstanceAmount int

Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).

InstanceType 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://.

OfferingType 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
PeriodUnit string

Term unit. Optional value: Year.

Platform string

The operating system type of the image used by the instance. Optional values: Windows, Linux. Default is Linux.

ResourceGroupId string

Resource group ID.

Scope string

Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.

ZoneId 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://.

InstanceAmount int

Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).

InstanceType 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://.

OfferingType 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
PeriodUnit string

Term unit. Optional value: Year.

Platform string

The operating system type of the image used by the instance. Optional values: Windows, Linux. Default is Linux.

ResourceGroupId string

Resource group ID.

Scope string

Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.

ZoneId 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://.

instanceAmount number

Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).

instanceType 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://.

offeringType 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
periodUnit string

Term unit. Optional value: Year.

platform string

The operating system type of the image used by the instance. Optional values: Windows, Linux. Default is Linux.

resourceGroupId string

Resource group ID.

scope string

Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.

zoneId 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 is Linux.

resource_group_id str

Resource group ID.

scope str

Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is Region.

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 alicloud Terraform Provider.