Alibaba Cloud v3.38.0, Jun 2 23
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:
- Instance
Amount int The total number of instances that need to be reserved within the capacity reservation.
- Instance
Type string Instance type. Currently, you can only set the capacity reservation service for one instance type.
- Zone
Ids 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.
- Capacity
Reservation stringName Capacity reservation service name.
- Description string
description of the capacity reservation instance.
- Dry
Run bool Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- End
Time 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
- End
Time stringType 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 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
.- Resource
Group stringId The resource group id.
- Dictionary<string, object>
The tag of the resource.
- Instance
Amount int The total number of instances that need to be reserved within the capacity reservation.
- Instance
Type string Instance type. Currently, you can only set the capacity reservation service for one instance type.
- Zone
Ids []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 stringName Capacity reservation service name.
- Description string
description of the capacity reservation instance.
- Dry
Run bool Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- End
Time 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
- End
Time stringType 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 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
.- Resource
Group stringId The resource group id.
- map[string]interface{}
The tag of the resource.
- instance
Amount Integer The total number of instances that need to be reserved within the capacity reservation.
- instance
Type String Instance type. Currently, you can only set the capacity reservation service for one instance type.
- zone
Ids 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.
- capacity
Reservation StringName Capacity reservation service name.
- description String
description of the capacity reservation instance.
- dry
Run Boolean Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- end
Time 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
- end
Time StringType 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 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
.- resource
Group StringId The resource group id.
- Map<String,Object>
The tag of the resource.
- instance
Amount number The total number of instances that need to be reserved within the capacity reservation.
- instance
Type string Instance type. Currently, you can only set the capacity reservation service for one instance type.
- zone
Ids 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 stringName Capacity reservation service name.
- description string
description of the capacity reservation instance.
- dry
Run boolean Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- end
Time 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
- end
Time stringType 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 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
.- resource
Group stringId The resource group id.
- {[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_ strname 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
andfalse
.- 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_ strtype 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_ strid The resource group id.
- Mapping[str, Any]
The tag of the resource.
- instance
Amount Number The total number of instances that need to be reserved within the capacity reservation.
- instance
Type String Instance type. Currently, you can only set the capacity reservation service for one instance type.
- zone
Ids 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.
- capacity
Reservation StringName Capacity reservation service name.
- description String
description of the capacity reservation instance.
- dry
Run Boolean Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- end
Time 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
- end
Time StringType 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 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
.- resource
Group StringId The resource group id.
- 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.
- Payment
Type string The payment type of the resource
- Start
Time string time of the capacity reservation which become active.
- Start
Time stringType 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.
- Time
Slot string This parameter is under test and is not yet open for use.
- Id string
The provider-assigned unique ID for this managed resource.
- Payment
Type string The payment type of the resource
- Start
Time string time of the capacity reservation which become active.
- Start
Time stringType 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.
- Time
Slot string This parameter is under test and is not yet open for use.
- id String
The provider-assigned unique ID for this managed resource.
- payment
Type String The payment type of the resource
- start
Time String time of the capacity reservation which become active.
- start
Time StringType 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.
- time
Slot String This parameter is under test and is not yet open for use.
- id string
The provider-assigned unique ID for this managed resource.
- payment
Type string The payment type of the resource
- start
Time string time of the capacity reservation which become active.
- start
Time stringType 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.
- time
Slot 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_ strtype 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.
- payment
Type String The payment type of the resource
- start
Time String time of the capacity reservation which become active.
- start
Time StringType 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.
- time
Slot 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.
- Capacity
Reservation stringName Capacity reservation service name.
- Description string
description of the capacity reservation instance.
- Dry
Run bool Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- End
Time 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
- End
Time stringType 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 string Instance type. Currently, you can only set the capacity reservation service for one instance type.
- Match
Criteria 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
- Payment
Type string The payment type of the resource
- Platform string
platform of the capacity reservation, value range
windows
,linux
.- Resource
Group stringId The resource group id.
- Start
Time string time of the capacity reservation which become active.
- Start
Time stringType 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.
- Dictionary<string, object>
The tag of the resource.
- Time
Slot string This parameter is under test and is not yet open for use.
- Zone
Ids 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.
- Capacity
Reservation stringName Capacity reservation service name.
- Description string
description of the capacity reservation instance.
- Dry
Run bool Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- End
Time 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
- End
Time stringType 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 string Instance type. Currently, you can only set the capacity reservation service for one instance type.
- Match
Criteria 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
- Payment
Type string The payment type of the resource
- Platform string
platform of the capacity reservation, value range
windows
,linux
.- Resource
Group stringId The resource group id.
- Start
Time string time of the capacity reservation which become active.
- Start
Time stringType 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.
- map[string]interface{}
The tag of the resource.
- Time
Slot string This parameter is under test and is not yet open for use.
- Zone
Ids []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 StringName Capacity reservation service name.
- description String
description of the capacity reservation instance.
- dry
Run Boolean Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- end
Time 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
- end
Time StringType 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 Integer The total number of instances that need to be reserved within the capacity reservation.
- instance
Type String Instance type. Currently, you can only set the capacity reservation service for one instance type.
- match
Criteria 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
- payment
Type String The payment type of the resource
- platform String
platform of the capacity reservation, value range
windows
,linux
.- resource
Group StringId The resource group id.
- start
Time String time of the capacity reservation which become active.
- start
Time StringType 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.
- Map<String,Object>
The tag of the resource.
- time
Slot String This parameter is under test and is not yet open for use.
- zone
Ids 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.
- capacity
Reservation stringName Capacity reservation service name.
- description string
description of the capacity reservation instance.
- dry
Run boolean Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- end
Time 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
- end
Time stringType 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 number The total number of instances that need to be reserved within the capacity reservation.
- instance
Type string Instance type. Currently, you can only set the capacity reservation service for one instance type.
- match
Criteria 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
- payment
Type string The payment type of the resource
- platform string
platform of the capacity reservation, value range
windows
,linux
.- resource
Group stringId The resource group id.
- start
Time string time of the capacity reservation which become active.
- start
Time stringType 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.
- {[key: string]: any}
The tag of the resource.
- time
Slot string This parameter is under test and is not yet open for use.
- zone
Ids 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_ strname 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
andfalse
.- 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_ strtype 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_ strid The resource group id.
- start_
time str time of the capacity reservation which become active.
- start_
time_ strtype 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.
- 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.
- capacity
Reservation StringName Capacity reservation service name.
- description String
description of the capacity reservation instance.
- dry
Run Boolean Specifies whether to pre-check the API request. Valid values:
true
andfalse
.- end
Time 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
- end
Time StringType 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 Number The total number of instances that need to be reserved within the capacity reservation.
- instance
Type String Instance type. Currently, you can only set the capacity reservation service for one instance type.
- match
Criteria 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
- payment
Type String The payment type of the resource
- platform String
platform of the capacity reservation, value range
windows
,linux
.- resource
Group StringId The resource group id.
- start
Time String time of the capacity reservation which become active.
- start
Time StringType 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.
- Map<Any>
The tag of the resource.
- time
Slot String This parameter is under test and is not yet open for use.
- zone
Ids 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.