azure-native-v2.compute.CapacityReservationGroup
Explore with Pulumi AI
Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group. Azure REST API version: 2023-03-01. Prior API version in Azure Native 1.x: 2021-04-01.
Other available API versions: 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01.
Create CapacityReservationGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CapacityReservationGroup(name: string, args: CapacityReservationGroupArgs, opts?: CustomResourceOptions);
@overload
def CapacityReservationGroup(resource_name: str,
args: CapacityReservationGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CapacityReservationGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
capacity_reservation_group_name: Optional[str] = None,
location: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
zones: Optional[Sequence[str]] = None)
func NewCapacityReservationGroup(ctx *Context, name string, args CapacityReservationGroupArgs, opts ...ResourceOption) (*CapacityReservationGroup, error)
public CapacityReservationGroup(string name, CapacityReservationGroupArgs args, CustomResourceOptions? opts = null)
public CapacityReservationGroup(String name, CapacityReservationGroupArgs args)
public CapacityReservationGroup(String name, CapacityReservationGroupArgs args, CustomResourceOptions options)
type: azure-native:compute:CapacityReservationGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. CapacityReservationGroupArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. CapacityReservationGroupArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. CapacityReservationGroupArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. CapacityReservationGroupArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. CapacityReservationGroupArgs - 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 capacityReservationGroupResource = new AzureNative.Compute.CapacityReservationGroup("capacityReservationGroupResource", new()
{
ResourceGroupName = "string",
CapacityReservationGroupName = "string",
Location = "string",
Tags =
{
{ "string", "string" },
},
Zones = new[]
{
"string",
},
});
example, err := compute.NewCapacityReservationGroup(ctx, "capacityReservationGroupResource", &compute.CapacityReservationGroupArgs{
ResourceGroupName: "string",
CapacityReservationGroupName: "string",
Location: "string",
Tags: map[string]interface{}{
"string": "string",
},
Zones: []string{
"string",
},
})
var capacityReservationGroupResource = new CapacityReservationGroup("capacityReservationGroupResource", CapacityReservationGroupArgs.builder()
.resourceGroupName("string")
.capacityReservationGroupName("string")
.location("string")
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.zones("string")
.build());
capacity_reservation_group_resource = azure_native.compute.CapacityReservationGroup("capacityReservationGroupResource",
resource_group_name=string,
capacity_reservation_group_name=string,
location=string,
tags={
string: string,
},
zones=[string])
const capacityReservationGroupResource = new azure_native.compute.CapacityReservationGroup("capacityReservationGroupResource", {
resourceGroupName: "string",
capacityReservationGroupName: "string",
location: "string",
tags: {
string: "string",
},
zones: ["string"],
});
type: azure-native:compute:CapacityReservationGroup
properties:
capacityReservationGroupName: string
location: string
resourceGroupName: string
tags:
string: string
zones:
- string
CapacityReservationGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CapacityReservationGroup resource accepts the following input properties:
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- Capacity
Reservation Group Name Changes to this property will trigger replacement.
- The name of the capacity reservation group.
- Location string
- Resource location
- Dictionary<string, string>
- Resource tags
- Zones List<string>
- Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- Capacity
Reservation Group Name Changes to this property will trigger replacement.
- The name of the capacity reservation group.
- Location string
- Resource location
- map[string]string
- Resource tags
- Zones []string
- Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- capacity
Reservation Group Name Changes to this property will trigger replacement.
- The name of the capacity reservation group.
- location String
- Resource location
- Map<String,String>
- Resource tags
- zones List<String>
- Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- capacity
Reservation Group Name Changes to this property will trigger replacement.
- The name of the capacity reservation group.
- location string
- Resource location
- {[key: string]: string}
- Resource tags
- zones string[]
- Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.
- resource_
group_ name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- capacity_
reservation_ group_ name Changes to this property will trigger replacement.
- The name of the capacity reservation group.
- location str
- Resource location
- Mapping[str, str]
- Resource tags
- zones Sequence[str]
- Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- capacity
Reservation Group Name Changes to this property will trigger replacement.
- The name of the capacity reservation group.
- location String
- Resource location
- Map<String>
- Resource tags
- zones List<String>
- Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.
Outputs
All input properties are implicitly available as output properties. Additionally, the CapacityReservationGroup resource produces the following output properties:
- Capacity
Reservations List<Pulumi.Azure Native. Compute. Outputs. Sub Resource Read Only Response> - A list of all capacity reservation resource ids that belong to capacity reservation group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
View Pulumi.Azure Native. Compute. Outputs. Capacity Reservation Group Instance View Response - The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.
- Name string
- Resource name
- Type string
- Resource type
- Virtual
Machines List<Pulumi.Associated Azure Native. Compute. Outputs. Sub Resource Read Only Response> - A list of references to all virtual machines associated to the capacity reservation group.
- Capacity
Reservations []SubResource Read Only Response - A list of all capacity reservation resource ids that belong to capacity reservation group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
View CapacityReservation Group Instance View Response - The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.
- Name string
- Resource name
- Type string
- Resource type
- Virtual
Machines []SubAssociated Resource Read Only Response - A list of references to all virtual machines associated to the capacity reservation group.
- capacity
Reservations List<SubResource Read Only Response> - A list of all capacity reservation resource ids that belong to capacity reservation group.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
View CapacityReservation Group Instance View Response - The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.
- name String
- Resource name
- type String
- Resource type
- virtual
Machines List<SubAssociated Resource Read Only Response> - A list of references to all virtual machines associated to the capacity reservation group.
- capacity
Reservations SubResource Read Only Response[] - A list of all capacity reservation resource ids that belong to capacity reservation group.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
View CapacityReservation Group Instance View Response - The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.
- name string
- Resource name
- type string
- Resource type
- virtual
Machines SubAssociated Resource Read Only Response[] - A list of references to all virtual machines associated to the capacity reservation group.
- capacity_
reservations Sequence[SubResource Read Only Response] - A list of all capacity reservation resource ids that belong to capacity reservation group.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
view CapacityReservation Group Instance View Response - The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.
- name str
- Resource name
- type str
- Resource type
- virtual_
machines_ Sequence[Subassociated Resource Read Only Response] - A list of references to all virtual machines associated to the capacity reservation group.
- capacity
Reservations List<Property Map> - A list of all capacity reservation resource ids that belong to capacity reservation group.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
View Property Map - The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.
- name String
- Resource name
- type String
- Resource type
- virtual
Machines List<Property Map>Associated - A list of references to all virtual machines associated to the capacity reservation group.
Supporting Types
CapacityReservationGroupInstanceViewResponse, CapacityReservationGroupInstanceViewResponseArgs
- Capacity
Reservations This property is required. List<Pulumi.Azure Native. Compute. Inputs. Capacity Reservation Instance View With Name Response> - List of instance view of the capacity reservations under the capacity reservation group.
- Capacity
Reservations This property is required. []CapacityReservation Instance View With Name Response - List of instance view of the capacity reservations under the capacity reservation group.
- capacity
Reservations This property is required. List<CapacityReservation Instance View With Name Response> - List of instance view of the capacity reservations under the capacity reservation group.
- capacity
Reservations This property is required. CapacityReservation Instance View With Name Response[] - List of instance view of the capacity reservations under the capacity reservation group.
- capacity_
reservations This property is required. Sequence[CapacityReservation Instance View With Name Response] - List of instance view of the capacity reservations under the capacity reservation group.
- capacity
Reservations This property is required. List<Property Map> - List of instance view of the capacity reservations under the capacity reservation group.
CapacityReservationInstanceViewWithNameResponse, CapacityReservationInstanceViewWithNameResponseArgs
- Name
This property is required. string - The name of the capacity reservation.
- Statuses
List<Pulumi.
Azure Native. Compute. Inputs. Instance View Status Response> - The resource status information.
- Utilization
Info Pulumi.Azure Native. Compute. Inputs. Capacity Reservation Utilization Response - Unutilized capacity of the capacity reservation.
- Name
This property is required. string - The name of the capacity reservation.
- Statuses
[]Instance
View Status Response - The resource status information.
- Utilization
Info CapacityReservation Utilization Response - Unutilized capacity of the capacity reservation.
- name
This property is required. String - The name of the capacity reservation.
- statuses
List<Instance
View Status Response> - The resource status information.
- utilization
Info CapacityReservation Utilization Response - Unutilized capacity of the capacity reservation.
- name
This property is required. string - The name of the capacity reservation.
- statuses
Instance
View Status Response[] - The resource status information.
- utilization
Info CapacityReservation Utilization Response - Unutilized capacity of the capacity reservation.
- name
This property is required. str - The name of the capacity reservation.
- statuses
Sequence[Instance
View Status Response] - The resource status information.
- utilization_
info CapacityReservation Utilization Response - Unutilized capacity of the capacity reservation.
- name
This property is required. String - The name of the capacity reservation.
- statuses List<Property Map>
- The resource status information.
- utilization
Info Property Map - Unutilized capacity of the capacity reservation.
CapacityReservationUtilizationResponse, CapacityReservationUtilizationResponseArgs
- Current
Capacity This property is required. int - The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.
- Virtual
Machines Allocated This property is required. List<Pulumi.Azure Native. Compute. Inputs. Sub Resource Read Only Response> - A list of all virtual machines resource ids allocated against the capacity reservation.
- Current
Capacity This property is required. int - The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.
- Virtual
Machines Allocated This property is required. []SubResource Read Only Response - A list of all virtual machines resource ids allocated against the capacity reservation.
- current
Capacity This property is required. Integer - The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.
- virtual
Machines Allocated This property is required. List<SubResource Read Only Response> - A list of all virtual machines resource ids allocated against the capacity reservation.
- current
Capacity This property is required. number - The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.
- virtual
Machines Allocated This property is required. SubResource Read Only Response[] - A list of all virtual machines resource ids allocated against the capacity reservation.
- current_
capacity This property is required. int - The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.
- virtual_
machines_ allocated This property is required. Sequence[SubResource Read Only Response] - A list of all virtual machines resource ids allocated against the capacity reservation.
- current
Capacity This property is required. Number - The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.
- virtual
Machines Allocated This property is required. List<Property Map> - A list of all virtual machines resource ids allocated against the capacity reservation.
InstanceViewStatusResponse, InstanceViewStatusResponseArgs
- Code string
- The status code.
- Display
Status string - The short localizable label for the status.
- Level string
- The level code.
- Message string
- The detailed status message, including for alerts and error messages.
- Time string
- The time of the status.
- Code string
- The status code.
- Display
Status string - The short localizable label for the status.
- Level string
- The level code.
- Message string
- The detailed status message, including for alerts and error messages.
- Time string
- The time of the status.
- code String
- The status code.
- display
Status String - The short localizable label for the status.
- level String
- The level code.
- message String
- The detailed status message, including for alerts and error messages.
- time String
- The time of the status.
- code string
- The status code.
- display
Status string - The short localizable label for the status.
- level string
- The level code.
- message string
- The detailed status message, including for alerts and error messages.
- time string
- The time of the status.
- code str
- The status code.
- display_
status str - The short localizable label for the status.
- level str
- The level code.
- message str
- The detailed status message, including for alerts and error messages.
- time str
- The time of the status.
- code String
- The status code.
- display
Status String - The short localizable label for the status.
- level String
- The level code.
- message String
- The detailed status message, including for alerts and error messages.
- time String
- The time of the status.
SubResourceReadOnlyResponse, SubResourceReadOnlyResponseArgs
- Id
This property is required. string - Resource Id
- Id
This property is required. string - Resource Id
- id
This property is required. String - Resource Id
- id
This property is required. string - Resource Id
- id
This property is required. str - Resource Id
- id
This property is required. String - Resource Id
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:compute:CapacityReservationGroup myCapacityReservationGroup /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v2 pulumi/pulumi-azure-native
- License
- Apache-2.0