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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.ecs.getInstanceTypes({
instanceTypeFamily: "ecs.g5",
});
const defaultGetZones = _default.then(_default => alicloud.getZones({
availableResourceCreation: "Instance",
availableInstanceType: _default.ids?.[0],
}));
const defaultGetResourceGroups = alicloud.resourcemanager.getResourceGroups({
status: "OK",
});
const defaultCapacityReservation = new alicloud.ecs.CapacityReservation("default", {
description: "terraform-example",
platform: "linux",
capacityReservationName: "terraform-example",
endTimeType: "Unlimited",
resourceGroupId: defaultGetResourceGroups.then(defaultGetResourceGroups => defaultGetResourceGroups.ids?.[0]),
instanceAmount: 1,
instanceType: _default.then(_default => _default.ids?.[0]),
matchCriteria: "Open",
tags: {
Created: "terraform-example",
},
zoneIds: [defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id)],
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ecs.get_instance_types(instance_type_family="ecs.g5")
default_get_zones = alicloud.get_zones(available_resource_creation="Instance",
available_instance_type=default.ids[0])
default_get_resource_groups = alicloud.resourcemanager.get_resource_groups(status="OK")
default_capacity_reservation = alicloud.ecs.CapacityReservation("default",
description="terraform-example",
platform="linux",
capacity_reservation_name="terraform-example",
end_time_type="Unlimited",
resource_group_id=default_get_resource_groups.ids[0],
instance_amount=1,
instance_type=default.ids[0],
match_criteria="Open",
tags={
"Created": "terraform-example",
},
zone_ids=[default_get_zones.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 {
_default, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
InstanceTypeFamily: pulumi.StringRef("ecs.g5"),
}, nil)
if err != nil {
return err
}
defaultGetZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("Instance"),
AvailableInstanceType: pulumi.StringRef(_default.Ids[0]),
}, nil)
if err != nil {
return err
}
defaultGetResourceGroups, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
Status: pulumi.StringRef("OK"),
}, nil)
if err != nil {
return err
}
_, err = ecs.NewCapacityReservation(ctx, "default", &ecs.CapacityReservationArgs{
Description: pulumi.String("terraform-example"),
Platform: pulumi.String("linux"),
CapacityReservationName: pulumi.String("terraform-example"),
EndTimeType: pulumi.String("Unlimited"),
ResourceGroupId: pulumi.String(defaultGetResourceGroups.Ids[0]),
InstanceAmount: pulumi.Int(1),
InstanceType: pulumi.String(_default.Ids[0]),
MatchCriteria: pulumi.String("Open"),
Tags: pulumi.Map{
"Created": pulumi.Any("terraform-example"),
},
ZoneIds: pulumi.StringArray{
pulumi.String(defaultGetZones.Zones[0].Id),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
InstanceTypeFamily = "ecs.g5",
});
var defaultGetZones = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "Instance",
AvailableInstanceType = @default.Apply(getInstanceTypesResult => getInstanceTypesResult.Ids[0]),
});
var defaultGetResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
{
Status = "OK",
});
var defaultCapacityReservation = new AliCloud.Ecs.CapacityReservation("default", new()
{
Description = "terraform-example",
Platform = "linux",
CapacityReservationName = "terraform-example",
EndTimeType = "Unlimited",
ResourceGroupId = defaultGetResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0]),
InstanceAmount = 1,
InstanceType = @default.Apply(@default => @default.Apply(getInstanceTypesResult => getInstanceTypesResult.Ids[0])),
MatchCriteria = "Open",
Tags =
{
{ "Created", "terraform-example" },
},
ZoneIds = new[]
{
defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
},
});
});
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 default = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.instanceTypeFamily("ecs.g5")
.build());
final var defaultGetZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("Instance")
.availableInstanceType(default_.ids()[0])
.build());
final var defaultGetResourceGroups = 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(defaultGetResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
.instanceAmount(1)
.instanceType(default_.ids()[0])
.matchCriteria("Open")
.tags(Map.of("Created", "terraform-example"))
.zoneIds(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
}
}
resources:
defaultCapacityReservation:
type: alicloud:ecs:CapacityReservation
name: default
properties:
description: terraform-example
platform: linux
capacityReservationName: terraform-example
endTimeType: Unlimited
resourceGroupId: ${defaultGetResourceGroups.ids[0]}
instanceAmount: 1
instanceType: ${default.ids[0]}
matchCriteria: Open
tags:
Created: terraform-example
zoneIds:
- ${defaultGetZones.zones[0].id}
variables:
default:
fn::invoke:
Function: alicloud:ecs:getInstanceTypes
Arguments:
instanceTypeFamily: ecs.g5
defaultGetZones:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: Instance
availableInstanceType: ${default.ids[0]}
defaultGetResourceGroups:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments:
status: OK
Create CapacityReservation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CapacityReservation(name: string, args: CapacityReservationArgs, opts?: CustomResourceOptions);
@overload
def CapacityReservation(resource_name: str,
args: CapacityReservationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CapacityReservation(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_amount: Optional[int] = None,
instance_type: Optional[str] = None,
zone_ids: Optional[Sequence[str]] = 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,
match_criteria: Optional[str] = None,
platform: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var capacityReservationResource = new AliCloud.Ecs.CapacityReservation("capacityReservationResource", new()
{
InstanceAmount = 0,
InstanceType = "string",
ZoneIds = new[]
{
"string",
},
CapacityReservationName = "string",
Description = "string",
DryRun = false,
EndTime = "string",
EndTimeType = "string",
MatchCriteria = "string",
Platform = "string",
ResourceGroupId = "string",
Tags =
{
{ "string", "any" },
},
});
example, err := ecs.NewCapacityReservation(ctx, "capacityReservationResource", &ecs.CapacityReservationArgs{
InstanceAmount: pulumi.Int(0),
InstanceType: pulumi.String("string"),
ZoneIds: pulumi.StringArray{
pulumi.String("string"),
},
CapacityReservationName: pulumi.String("string"),
Description: pulumi.String("string"),
DryRun: pulumi.Bool(false),
EndTime: pulumi.String("string"),
EndTimeType: pulumi.String("string"),
MatchCriteria: pulumi.String("string"),
Platform: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
Tags: pulumi.Map{
"string": pulumi.Any("any"),
},
})
var capacityReservationResource = new CapacityReservation("capacityReservationResource", CapacityReservationArgs.builder()
.instanceAmount(0)
.instanceType("string")
.zoneIds("string")
.capacityReservationName("string")
.description("string")
.dryRun(false)
.endTime("string")
.endTimeType("string")
.matchCriteria("string")
.platform("string")
.resourceGroupId("string")
.tags(Map.of("string", "any"))
.build());
capacity_reservation_resource = alicloud.ecs.CapacityReservation("capacityReservationResource",
instance_amount=0,
instance_type="string",
zone_ids=["string"],
capacity_reservation_name="string",
description="string",
dry_run=False,
end_time="string",
end_time_type="string",
match_criteria="string",
platform="string",
resource_group_id="string",
tags={
"string": "any",
})
const capacityReservationResource = new alicloud.ecs.CapacityReservation("capacityReservationResource", {
instanceAmount: 0,
instanceType: "string",
zoneIds: ["string"],
capacityReservationName: "string",
description: "string",
dryRun: false,
endTime: "string",
endTimeType: "string",
matchCriteria: "string",
platform: "string",
resourceGroupId: "string",
tags: {
string: "any",
},
});
type: alicloud:ecs:CapacityReservation
properties:
capacityReservationName: string
description: string
dryRun: false
endTime: string
endTimeType: string
instanceAmount: 0
instanceType: string
matchCriteria: string
platform: string
resourceGroupId: string
tags:
string: any
zoneIds:
- string
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>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.