Show / Hide Table of Contents

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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
ReservedInstance
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.Ecs
Assembly: Pulumi.AliCloud.dll
Syntax
public class ReservedInstance : CustomResource

Constructors

View Source

ReservedInstance(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 Source

Description

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

Period

Declaration
public Output<int?> Period { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

PeriodUnit

Term unit. Optional value: Year.

Declaration
public Output<string> PeriodUnit { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

ResourceGroupId

Resource group ID.

Declaration
public Output<string> ResourceGroupId { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.