alicloud logo
Alibaba Cloud v3.30.0, Feb 1 23

alicloud.ecs.CapacityReservation

Provides a Ecs Capacity Reservation resource.

For information about Ecs Capacity Reservation and how to use it, see What is Capacity Reservation.

NOTE: Available in v1.195.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var defaultZones = AliCloud.GetZones.Invoke(new()
    {
        AvailableResourceCreation = "Instance",
    });

    var defaultResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
    {
        Status = "OK",
    });

    var defaultCapacityReservation = new AliCloud.Ecs.CapacityReservation("defaultCapacityReservation", new()
    {
        Description = @var.Name,
        Platform = "linux",
        CapacityReservationName = @var.Name,
        EndTimeType = "Unlimited",
        ResourceGroupId = defaultResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0]),
        InstanceAmount = 1,
        InstanceType = "ecs.c5.2xlarge",
        MatchCriteria = "Open",
        Tags = 
        {
            { "Created", "tfTestAcc0" },
            { "For", "Tftestacc 0" },
        },
        ZoneIds = new[]
        {
            defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        },
    });

});
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 {
		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("Instance"),
		}, nil)
		if err != nil {
			return err
		}
		defaultResourceGroups, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
			Status: pulumi.StringRef("OK"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = ecs.NewCapacityReservation(ctx, "defaultCapacityReservation", &ecs.CapacityReservationArgs{
			Description:             pulumi.Any(_var.Name),
			Platform:                pulumi.String("linux"),
			CapacityReservationName: pulumi.Any(_var.Name),
			EndTimeType:             pulumi.String("Unlimited"),
			ResourceGroupId:         *pulumi.String(defaultResourceGroups.Ids[0]),
			InstanceAmount:          pulumi.Int(1),
			InstanceType:            pulumi.String("ecs.c5.2xlarge"),
			MatchCriteria:           pulumi.String("Open"),
			Tags: pulumi.AnyMap{
				"Created": pulumi.Any("tfTestAcc0"),
				"For":     pulumi.Any("Tftestacc 0"),
			},
			ZoneIds: pulumi.StringArray{
				*pulumi.String(defaultZones.Zones[0].Id),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.ecs.CapacityReservation;
import com.pulumi.alicloud.ecs.CapacityReservationArgs;
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 defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableResourceCreation("Instance")
            .build());

        final var defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
            .status("OK")
            .build());

        var defaultCapacityReservation = new CapacityReservation("defaultCapacityReservation", CapacityReservationArgs.builder()        
            .description(var_.name())
            .platform("linux")
            .capacityReservationName(var_.name())
            .endTimeType("Unlimited")
            .resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
            .instanceAmount(1)
            .instanceType("ecs.c5.2xlarge")
            .matchCriteria("Open")
            .tags(Map.ofEntries(
                Map.entry("Created", "tfTestAcc0"),
                Map.entry("For", "Tftestacc 0")
            ))
            .zoneIds(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_zones = alicloud.get_zones(available_resource_creation="Instance")
default_resource_groups = alicloud.resourcemanager.get_resource_groups(status="OK")
default_capacity_reservation = alicloud.ecs.CapacityReservation("defaultCapacityReservation",
    description=var["name"],
    platform="linux",
    capacity_reservation_name=var["name"],
    end_time_type="Unlimited",
    resource_group_id=default_resource_groups.ids[0],
    instance_amount=1,
    instance_type="ecs.c5.2xlarge",
    match_criteria="Open",
    tags={
        "Created": "tfTestAcc0",
        "For": "Tftestacc 0",
    },
    zone_ids=[default_zones.zones[0].id])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultZones = alicloud.getZones({
    availableResourceCreation: "Instance",
});
const defaultResourceGroups = alicloud.resourcemanager.getResourceGroups({
    status: "OK",
});
const defaultCapacityReservation = new alicloud.ecs.CapacityReservation("defaultCapacityReservation", {
    description: _var.name,
    platform: "linux",
    capacityReservationName: _var.name,
    endTimeType: "Unlimited",
    resourceGroupId: defaultResourceGroups.then(defaultResourceGroups => defaultResourceGroups.ids?.[0]),
    instanceAmount: 1,
    instanceType: "ecs.c5.2xlarge",
    matchCriteria: "Open",
    tags: {
        Created: "tfTestAcc0",
        For: "Tftestacc 0",
    },
    zoneIds: [defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id)],
});
resources:
  defaultCapacityReservation:
    type: alicloud:ecs:CapacityReservation
    properties:
      description: ${var.name}
      platform: linux
      capacityReservationName: ${var.name}
      endTimeType: Unlimited
      resourceGroupId: ${defaultResourceGroups.ids[0]}
      instanceAmount: 1
      instanceType: ecs.c5.2xlarge
      matchCriteria: Open
      tags:
        Created: tfTestAcc0
        For: Tftestacc 0
      zoneIds:
        - ${defaultZones.zones[0].id}
variables:
  defaultZones:
    fn::invoke:
      Function: alicloud:getZones
      Arguments:
        availableResourceCreation: Instance
  defaultResourceGroups:
    fn::invoke:
      Function: alicloud:resourcemanager:getResourceGroups
      Arguments:
        status: OK

Create CapacityReservation Resource

new CapacityReservation(name: string, args: CapacityReservationArgs, opts?: CustomResourceOptions);
@overload
def CapacityReservation(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        capacity_reservation_name: Optional[str] = None,
                        description: Optional[str] = None,
                        dry_run: Optional[bool] = None,
                        end_time: Optional[str] = None,
                        end_time_type: Optional[str] = None,
                        instance_amount: Optional[int] = None,
                        instance_type: Optional[str] = None,
                        match_criteria: Optional[str] = None,
                        platform: Optional[str] = None,
                        resource_group_id: Optional[str] = None,
                        tags: Optional[Mapping[str, Any]] = None,
                        zone_ids: Optional[Sequence[str]] = None)
@overload
def CapacityReservation(resource_name: str,
                        args: CapacityReservationArgs,
                        opts: Optional[ResourceOptions] = None)
func NewCapacityReservation(ctx *Context, name string, args CapacityReservationArgs, opts ...ResourceOption) (*CapacityReservation, error)
public CapacityReservation(string name, CapacityReservationArgs args, CustomResourceOptions? opts = null)
public CapacityReservation(String name, CapacityReservationArgs args)
public CapacityReservation(String name, CapacityReservationArgs args, CustomResourceOptions options)
type: alicloud:ecs:CapacityReservation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CapacityReservationArgs
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 CapacityReservationArgs
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 CapacityReservationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CapacityReservationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CapacityReservationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CapacityReservation 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 CapacityReservation resource accepts the following input properties:

InstanceAmount int

The total number of instances that need to be reserved within the capacity reservation.

InstanceType string

Instance type. Currently, you can only set the capacity reservation service for one instance type.

ZoneIds List<string>

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

CapacityReservationName string

Capacity reservation service name.

Description string

description of the capacity reservation instance.

DryRun bool

Specifies whether to pre-check the API request. Valid values: true and false.

EndTime string

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

EndTimeType string

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

MatchCriteria string

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

Platform string

platform of the capacity reservation, value range windows, linux.

ResourceGroupId string

The resource group id.

Tags Dictionary<string, object>

The tag of the resource.

InstanceAmount int

The total number of instances that need to be reserved within the capacity reservation.

InstanceType string

Instance type. Currently, you can only set the capacity reservation service for one instance type.

ZoneIds []string

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

CapacityReservationName string

Capacity reservation service name.

Description string

description of the capacity reservation instance.

DryRun bool

Specifies whether to pre-check the API request. Valid values: true and false.

EndTime string

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

EndTimeType string

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

MatchCriteria string

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

Platform string

platform of the capacity reservation, value range windows, linux.

ResourceGroupId string

The resource group id.

Tags map[string]interface{}

The tag of the resource.

instanceAmount Integer

The total number of instances that need to be reserved within the capacity reservation.

instanceType String

Instance type. Currently, you can only set the capacity reservation service for one instance type.

zoneIds List<String>

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

capacityReservationName String

Capacity reservation service name.

description String

description of the capacity reservation instance.

dryRun Boolean

Specifies whether to pre-check the API request. Valid values: true and false.

endTime String

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

endTimeType String

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

matchCriteria String

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

platform String

platform of the capacity reservation, value range windows, linux.

resourceGroupId String

The resource group id.

tags Map<String,Object>

The tag of the resource.

instanceAmount number

The total number of instances that need to be reserved within the capacity reservation.

instanceType string

Instance type. Currently, you can only set the capacity reservation service for one instance type.

zoneIds string[]

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

capacityReservationName string

Capacity reservation service name.

description string

description of the capacity reservation instance.

dryRun boolean

Specifies whether to pre-check the API request. Valid values: true and false.

endTime string

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

endTimeType string

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

matchCriteria string

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

platform string

platform of the capacity reservation, value range windows, linux.

resourceGroupId string

The resource group id.

tags {[key: string]: any}

The tag of the resource.

instance_amount int

The total number of instances that need to be reserved within the capacity reservation.

instance_type str

Instance type. Currently, you can only set the capacity reservation service for one instance type.

zone_ids Sequence[str]

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

capacity_reservation_name str

Capacity reservation service name.

description str

description of the capacity reservation instance.

dry_run bool

Specifies whether to pre-check the API request. Valid values: true and false.

end_time str

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

end_time_type str

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

match_criteria str

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

platform str

platform of the capacity reservation, value range windows, linux.

resource_group_id str

The resource group id.

tags Mapping[str, Any]

The tag of the resource.

instanceAmount Number

The total number of instances that need to be reserved within the capacity reservation.

instanceType String

Instance type. Currently, you can only set the capacity reservation service for one instance type.

zoneIds List<String>

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

capacityReservationName String

Capacity reservation service name.

description String

description of the capacity reservation instance.

dryRun Boolean

Specifies whether to pre-check the API request. Valid values: true and false.

endTime String

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

endTimeType String

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

matchCriteria String

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

platform String

platform of the capacity reservation, value range windows, linux.

resourceGroupId String

The resource group id.

tags Map<Any>

The tag of the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the CapacityReservation resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

PaymentType string

The payment type of the resource

StartTime string

time of the capacity reservation which become active.

StartTimeType string

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

Status string

The status of the capacity reservation.

TimeSlot string

This parameter is under test and is not yet open for use.

Id string

The provider-assigned unique ID for this managed resource.

PaymentType string

The payment type of the resource

StartTime string

time of the capacity reservation which become active.

StartTimeType string

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

Status string

The status of the capacity reservation.

TimeSlot string

This parameter is under test and is not yet open for use.

id String

The provider-assigned unique ID for this managed resource.

paymentType String

The payment type of the resource

startTime String

time of the capacity reservation which become active.

startTimeType String

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status String

The status of the capacity reservation.

timeSlot String

This parameter is under test and is not yet open for use.

id string

The provider-assigned unique ID for this managed resource.

paymentType string

The payment type of the resource

startTime string

time of the capacity reservation which become active.

startTimeType string

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status string

The status of the capacity reservation.

timeSlot string

This parameter is under test and is not yet open for use.

id str

The provider-assigned unique ID for this managed resource.

payment_type str

The payment type of the resource

start_time str

time of the capacity reservation which become active.

start_time_type str

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status str

The status of the capacity reservation.

time_slot str

This parameter is under test and is not yet open for use.

id String

The provider-assigned unique ID for this managed resource.

paymentType String

The payment type of the resource

startTime String

time of the capacity reservation which become active.

startTimeType String

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status String

The status of the capacity reservation.

timeSlot String

This parameter is under test and is not yet open for use.

Look up Existing CapacityReservation Resource

Get an existing CapacityReservation 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?: CapacityReservationState, opts?: CustomResourceOptions): CapacityReservation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        capacity_reservation_name: Optional[str] = None,
        description: Optional[str] = None,
        dry_run: Optional[bool] = None,
        end_time: Optional[str] = None,
        end_time_type: Optional[str] = None,
        instance_amount: Optional[int] = None,
        instance_type: Optional[str] = None,
        match_criteria: Optional[str] = None,
        payment_type: Optional[str] = None,
        platform: 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, Any]] = None,
        time_slot: Optional[str] = None,
        zone_ids: Optional[Sequence[str]] = None) -> CapacityReservation
func GetCapacityReservation(ctx *Context, name string, id IDInput, state *CapacityReservationState, opts ...ResourceOption) (*CapacityReservation, error)
public static CapacityReservation Get(string name, Input<string> id, CapacityReservationState? state, CustomResourceOptions? opts = null)
public static CapacityReservation get(String name, Output<String> id, CapacityReservationState 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.
The following state arguments are supported:
CapacityReservationName string

Capacity reservation service name.

Description string

description of the capacity reservation instance.

DryRun bool

Specifies whether to pre-check the API request. Valid values: true and false.

EndTime string

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

EndTimeType string

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

InstanceAmount int

The total number of instances that need to be reserved within the capacity reservation.

InstanceType string

Instance type. Currently, you can only set the capacity reservation service for one instance type.

MatchCriteria string

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

PaymentType string

The payment type of the resource

Platform string

platform of the capacity reservation, value range windows, linux.

ResourceGroupId string

The resource group id.

StartTime string

time of the capacity reservation which become active.

StartTimeType string

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

Status string

The status of the capacity reservation.

Tags Dictionary<string, object>

The tag of the resource.

TimeSlot string

This parameter is under test and is not yet open for use.

ZoneIds List<string>

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

CapacityReservationName string

Capacity reservation service name.

Description string

description of the capacity reservation instance.

DryRun bool

Specifies whether to pre-check the API request. Valid values: true and false.

EndTime string

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

EndTimeType string

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

InstanceAmount int

The total number of instances that need to be reserved within the capacity reservation.

InstanceType string

Instance type. Currently, you can only set the capacity reservation service for one instance type.

MatchCriteria string

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

PaymentType string

The payment type of the resource

Platform string

platform of the capacity reservation, value range windows, linux.

ResourceGroupId string

The resource group id.

StartTime string

time of the capacity reservation which become active.

StartTimeType string

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

Status string

The status of the capacity reservation.

Tags map[string]interface{}

The tag of the resource.

TimeSlot string

This parameter is under test and is not yet open for use.

ZoneIds []string

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

capacityReservationName String

Capacity reservation service name.

description String

description of the capacity reservation instance.

dryRun Boolean

Specifies whether to pre-check the API request. Valid values: true and false.

endTime String

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

endTimeType String

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

instanceAmount Integer

The total number of instances that need to be reserved within the capacity reservation.

instanceType String

Instance type. Currently, you can only set the capacity reservation service for one instance type.

matchCriteria String

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

paymentType String

The payment type of the resource

platform String

platform of the capacity reservation, value range windows, linux.

resourceGroupId String

The resource group id.

startTime String

time of the capacity reservation which become active.

startTimeType String

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status String

The status of the capacity reservation.

tags Map<String,Object>

The tag of the resource.

timeSlot String

This parameter is under test and is not yet open for use.

zoneIds List<String>

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

capacityReservationName string

Capacity reservation service name.

description string

description of the capacity reservation instance.

dryRun boolean

Specifies whether to pre-check the API request. Valid values: true and false.

endTime string

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

endTimeType string

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

instanceAmount number

The total number of instances that need to be reserved within the capacity reservation.

instanceType string

Instance type. Currently, you can only set the capacity reservation service for one instance type.

matchCriteria string

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

paymentType string

The payment type of the resource

platform string

platform of the capacity reservation, value range windows, linux.

resourceGroupId string

The resource group id.

startTime string

time of the capacity reservation which become active.

startTimeType string

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status string

The status of the capacity reservation.

tags {[key: string]: any}

The tag of the resource.

timeSlot string

This parameter is under test and is not yet open for use.

zoneIds string[]

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

capacity_reservation_name str

Capacity reservation service name.

description str

description of the capacity reservation instance.

dry_run bool

Specifies whether to pre-check the API request. Valid values: true and false.

end_time str

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

end_time_type str

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

instance_amount int

The total number of instances that need to be reserved within the capacity reservation.

instance_type str

Instance type. Currently, you can only set the capacity reservation service for one instance type.

match_criteria str

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

payment_type str

The payment type of the resource

platform str

platform of the capacity reservation, value range windows, linux.

resource_group_id str

The resource group id.

start_time str

time of the capacity reservation which become active.

start_time_type str

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status str

The status of the capacity reservation.

tags Mapping[str, Any]

The tag of the resource.

time_slot str

This parameter is under test and is not yet open for use.

zone_ids Sequence[str]

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

capacityReservationName String

Capacity reservation service name.

description String

description of the capacity reservation instance.

dryRun Boolean

Specifies whether to pre-check the API request. Valid values: true and false.

endTime String

end time of the capacity reservation. the capacity reservation will be released at the end time automatically if set. otherwise it will last until manually released

endTimeType String

Release mode of capacity reservation service. Value range:Limited: release at specified time. The EndTime parameter must be specified at the same time.Unlimited: manual release. No time limit.

instanceAmount Number

The total number of instances that need to be reserved within the capacity reservation.

instanceType String

Instance type. Currently, you can only set the capacity reservation service for one instance type.

matchCriteria String

The type of private resource pool generated after the capacity reservation service takes effect. Value range:Open: Open mode.Target: dedicated mode.Default value: Open

paymentType String

The payment type of the resource

platform String

platform of the capacity reservation, value range windows, linux.

resourceGroupId String

The resource group id.

startTime String

time of the capacity reservation which become active.

startTimeType String

The capacity is scheduled to take effect. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status String

The status of the capacity reservation.

tags Map<Any>

The tag of the resource.

timeSlot String

This parameter is under test and is not yet open for use.

zoneIds List<String>

The ID of the zone in the region to which the capacity reservation service belongs. Currently, it is only supported to create a capacity reservation service in one zone.

Import

Ecs Capacity Reservation can be imported using the id, e.g.

 $ pulumi import alicloud:ecs/capacityReservation:CapacityReservation example <id>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.