alicloud logo
Alibaba Cloud v3.38.0, Jun 2 23

alicloud.ecs.CapacityReservation

Explore with Pulumi AI

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 System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var defaultInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
    {
        InstanceTypeFamily = "ecs.g5",
    });

    var defaultZones = AliCloud.GetZones.Invoke(new()
    {
        AvailableResourceCreation = "Instance",
        AvailableInstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.Ids[0]),
    });

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

    var defaultCapacityReservation = new AliCloud.Ecs.CapacityReservation("defaultCapacityReservation", new()
    {
        Description = "terraform-example",
        Platform = "linux",
        CapacityReservationName = "terraform-example",
        EndTimeType = "Unlimited",
        ResourceGroupId = defaultResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0]),
        InstanceAmount = 1,
        InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.Ids[0]),
        MatchCriteria = "Open",
        Tags = 
        {
            { "Created", "terraform-example" },
        },
        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 {
		defaultInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
			InstanceTypeFamily: pulumi.StringRef("ecs.g5"),
		}, nil)
		if err != nil {
			return err
		}
		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("Instance"),
			AvailableInstanceType:     pulumi.StringRef(defaultInstanceTypes.Ids[0]),
		}, 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.String("terraform-example"),
			Platform:                pulumi.String("linux"),
			CapacityReservationName: pulumi.String("terraform-example"),
			EndTimeType:             pulumi.String("Unlimited"),
			ResourceGroupId:         *pulumi.String(defaultResourceGroups.Ids[0]),
			InstanceAmount:          pulumi.Int(1),
			InstanceType:            *pulumi.String(defaultInstanceTypes.Ids[0]),
			MatchCriteria:           pulumi.String("Open"),
			Tags: pulumi.AnyMap{
				"Created": pulumi.Any("terraform-example"),
			},
			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.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
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 defaultInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
            .instanceTypeFamily("ecs.g5")
            .build());

        final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableResourceCreation("Instance")
            .availableInstanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.ids()[0]))
            .build());

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

        var defaultCapacityReservation = new CapacityReservation("defaultCapacityReservation", CapacityReservationArgs.builder()        
            .description("terraform-example")
            .platform("linux")
            .capacityReservationName("terraform-example")
            .endTimeType("Unlimited")
            .resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
            .instanceAmount(1)
            .instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.ids()[0]))
            .matchCriteria("Open")
            .tags(Map.of("Created", "terraform-example"))
            .zoneIds(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_instance_types = alicloud.ecs.get_instance_types(instance_type_family="ecs.g5")
default_zones = alicloud.get_zones(available_resource_creation="Instance",
    available_instance_type=default_instance_types.ids[0])
default_resource_groups = alicloud.resourcemanager.get_resource_groups(status="OK")
default_capacity_reservation = alicloud.ecs.CapacityReservation("defaultCapacityReservation",
    description="terraform-example",
    platform="linux",
    capacity_reservation_name="terraform-example",
    end_time_type="Unlimited",
    resource_group_id=default_resource_groups.ids[0],
    instance_amount=1,
    instance_type=default_instance_types.ids[0],
    match_criteria="Open",
    tags={
        "Created": "terraform-example",
    },
    zone_ids=[default_zones.zones[0].id])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultInstanceTypes = alicloud.ecs.getInstanceTypes({
    instanceTypeFamily: "ecs.g5",
});
const defaultZones = defaultInstanceTypes.then(defaultInstanceTypes => alicloud.getZones({
    availableResourceCreation: "Instance",
    availableInstanceType: defaultInstanceTypes.ids?.[0],
}));
const defaultResourceGroups = alicloud.resourcemanager.getResourceGroups({
    status: "OK",
});
const defaultCapacityReservation = new alicloud.ecs.CapacityReservation("defaultCapacityReservation", {
    description: "terraform-example",
    platform: "linux",
    capacityReservationName: "terraform-example",
    endTimeType: "Unlimited",
    resourceGroupId: defaultResourceGroups.then(defaultResourceGroups => defaultResourceGroups.ids?.[0]),
    instanceAmount: 1,
    instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.ids?.[0]),
    matchCriteria: "Open",
    tags: {
        Created: "terraform-example",
    },
    zoneIds: [defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id)],
});
resources:
  defaultCapacityReservation:
    type: alicloud:ecs:CapacityReservation
    properties:
      description: terraform-example
      platform: linux
      capacityReservationName: terraform-example
      endTimeType: Unlimited
      resourceGroupId: ${defaultResourceGroups.ids[0]}
      instanceAmount: 1
      instanceType: ${defaultInstanceTypes.ids[0]}
      matchCriteria: Open
      tags:
        Created: terraform-example
      zoneIds:
        - ${defaultZones.zones[0].id}
variables:
  defaultInstanceTypes:
    fn::invoke:
      Function: alicloud:ecs:getInstanceTypes
      Arguments:
        instanceTypeFamily: ecs.g5
  defaultZones:
    fn::invoke:
      Function: alicloud:getZones
      Arguments:
        availableResourceCreation: Instance
        availableInstanceType: ${defaultInstanceTypes.ids[0]}
  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.