1. Packages
  2. Azure Native v2
  3. API Docs
  4. compute
  5. getCapacityReservationGroup
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.compute.getCapacityReservationGroup

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

The operation that retrieves information about a capacity reservation group. Azure REST API version: 2023-03-01.

Other available API versions: 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01.

Using getCapacityReservationGroup

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCapacityReservationGroup(args: GetCapacityReservationGroupArgs, opts?: InvokeOptions): Promise<GetCapacityReservationGroupResult>
function getCapacityReservationGroupOutput(args: GetCapacityReservationGroupOutputArgs, opts?: InvokeOptions): Output<GetCapacityReservationGroupResult>
Copy
def get_capacity_reservation_group(capacity_reservation_group_name: Optional[str] = None,
                                   expand: Optional[str] = None,
                                   resource_group_name: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetCapacityReservationGroupResult
def get_capacity_reservation_group_output(capacity_reservation_group_name: Optional[pulumi.Input[str]] = None,
                                   expand: Optional[pulumi.Input[str]] = None,
                                   resource_group_name: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetCapacityReservationGroupResult]
Copy
func LookupCapacityReservationGroup(ctx *Context, args *LookupCapacityReservationGroupArgs, opts ...InvokeOption) (*LookupCapacityReservationGroupResult, error)
func LookupCapacityReservationGroupOutput(ctx *Context, args *LookupCapacityReservationGroupOutputArgs, opts ...InvokeOption) LookupCapacityReservationGroupResultOutput
Copy

> Note: This function is named LookupCapacityReservationGroup in the Go SDK.

public static class GetCapacityReservationGroup 
{
    public static Task<GetCapacityReservationGroupResult> InvokeAsync(GetCapacityReservationGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetCapacityReservationGroupResult> Invoke(GetCapacityReservationGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCapacityReservationGroupResult> getCapacityReservationGroup(GetCapacityReservationGroupArgs args, InvokeOptions options)
public static Output<GetCapacityReservationGroupResult> getCapacityReservationGroup(GetCapacityReservationGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:compute:getCapacityReservationGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CapacityReservationGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the capacity reservation group.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Expand string
The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.
CapacityReservationGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the capacity reservation group.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Expand string
The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.
capacityReservationGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the capacity reservation group.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
expand String
The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.
capacityReservationGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the capacity reservation group.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
expand string
The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.
capacity_reservation_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the capacity reservation group.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
expand str
The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.
capacityReservationGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the capacity reservation group.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
expand String
The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.

getCapacityReservationGroup Result

The following output properties are available:

CapacityReservations List<Pulumi.AzureNative.Compute.Outputs.SubResourceReadOnlyResponse>
A list of all capacity reservation resource ids that belong to capacity reservation group.
Id string
Resource Id
InstanceView Pulumi.AzureNative.Compute.Outputs.CapacityReservationGroupInstanceViewResponse
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.
Location string
Resource location
Name string
Resource name
Type string
Resource type
VirtualMachinesAssociated List<Pulumi.AzureNative.Compute.Outputs.SubResourceReadOnlyResponse>
A list of references to all virtual machines associated to the capacity reservation group.
Tags 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.
CapacityReservations []SubResourceReadOnlyResponse
A list of all capacity reservation resource ids that belong to capacity reservation group.
Id string
Resource Id
InstanceView CapacityReservationGroupInstanceViewResponse
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.
Location string
Resource location
Name string
Resource name
Type string
Resource type
VirtualMachinesAssociated []SubResourceReadOnlyResponse
A list of references to all virtual machines associated to the capacity reservation group.
Tags 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.
capacityReservations List<SubResourceReadOnlyResponse>
A list of all capacity reservation resource ids that belong to capacity reservation group.
id String
Resource Id
instanceView CapacityReservationGroupInstanceViewResponse
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.
location String
Resource location
name String
Resource name
type String
Resource type
virtualMachinesAssociated List<SubResourceReadOnlyResponse>
A list of references to all virtual machines associated to the capacity reservation group.
tags 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.
capacityReservations SubResourceReadOnlyResponse[]
A list of all capacity reservation resource ids that belong to capacity reservation group.
id string
Resource Id
instanceView CapacityReservationGroupInstanceViewResponse
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.
location string
Resource location
name string
Resource name
type string
Resource type
virtualMachinesAssociated SubResourceReadOnlyResponse[]
A list of references to all virtual machines associated to the capacity reservation group.
tags {[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.
capacity_reservations Sequence[SubResourceReadOnlyResponse]
A list of all capacity reservation resource ids that belong to capacity reservation group.
id str
Resource Id
instance_view CapacityReservationGroupInstanceViewResponse
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.
location str
Resource location
name str
Resource name
type str
Resource type
virtual_machines_associated Sequence[SubResourceReadOnlyResponse]
A list of references to all virtual machines associated to the capacity reservation group.
tags 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.
capacityReservations List<Property Map>
A list of all capacity reservation resource ids that belong to capacity reservation group.
id String
Resource Id
instanceView 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.
location String
Resource location
name String
Resource name
type String
Resource type
virtualMachinesAssociated List<Property Map>
A list of references to all virtual machines associated to the capacity reservation group.
tags 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.

Supporting Types

CapacityReservationGroupInstanceViewResponse

CapacityReservations This property is required. List<Pulumi.AzureNative.Compute.Inputs.CapacityReservationInstanceViewWithNameResponse>
List of instance view of the capacity reservations under the capacity reservation group.
CapacityReservations This property is required. []CapacityReservationInstanceViewWithNameResponse
List of instance view of the capacity reservations under the capacity reservation group.
capacityReservations This property is required. List<CapacityReservationInstanceViewWithNameResponse>
List of instance view of the capacity reservations under the capacity reservation group.
capacityReservations This property is required. CapacityReservationInstanceViewWithNameResponse[]
List of instance view of the capacity reservations under the capacity reservation group.
capacity_reservations This property is required. Sequence[CapacityReservationInstanceViewWithNameResponse]
List of instance view of the capacity reservations under the capacity reservation group.
capacityReservations This property is required. List<Property Map>
List of instance view of the capacity reservations under the capacity reservation group.

CapacityReservationInstanceViewWithNameResponse

Name This property is required. string
The name of the capacity reservation.
Statuses List<Pulumi.AzureNative.Compute.Inputs.InstanceViewStatusResponse>
The resource status information.
UtilizationInfo Pulumi.AzureNative.Compute.Inputs.CapacityReservationUtilizationResponse
Unutilized capacity of the capacity reservation.
Name This property is required. string
The name of the capacity reservation.
Statuses []InstanceViewStatusResponse
The resource status information.
UtilizationInfo CapacityReservationUtilizationResponse
Unutilized capacity of the capacity reservation.
name This property is required. String
The name of the capacity reservation.
statuses List<InstanceViewStatusResponse>
The resource status information.
utilizationInfo CapacityReservationUtilizationResponse
Unutilized capacity of the capacity reservation.
name This property is required. string
The name of the capacity reservation.
statuses InstanceViewStatusResponse[]
The resource status information.
utilizationInfo CapacityReservationUtilizationResponse
Unutilized capacity of the capacity reservation.
name This property is required. str
The name of the capacity reservation.
statuses Sequence[InstanceViewStatusResponse]
The resource status information.
utilization_info CapacityReservationUtilizationResponse
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.
utilizationInfo Property Map
Unutilized capacity of the capacity reservation.

CapacityReservationUtilizationResponse

CurrentCapacity 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.
VirtualMachinesAllocated This property is required. List<Pulumi.AzureNative.Compute.Inputs.SubResourceReadOnlyResponse>
A list of all virtual machines resource ids allocated against the capacity reservation.
CurrentCapacity 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.
VirtualMachinesAllocated This property is required. []SubResourceReadOnlyResponse
A list of all virtual machines resource ids allocated against the capacity reservation.
currentCapacity 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.
virtualMachinesAllocated This property is required. List<SubResourceReadOnlyResponse>
A list of all virtual machines resource ids allocated against the capacity reservation.
currentCapacity 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.
virtualMachinesAllocated This property is required. SubResourceReadOnlyResponse[]
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[SubResourceReadOnlyResponse]
A list of all virtual machines resource ids allocated against the capacity reservation.
currentCapacity 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.
virtualMachinesAllocated This property is required. List<Property Map>
A list of all virtual machines resource ids allocated against the capacity reservation.

InstanceViewStatusResponse

Code string
The status code.
DisplayStatus 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.
DisplayStatus 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.
displayStatus 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.
displayStatus 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.
displayStatus 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

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi