@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 5.94 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* The operation that retrieves information about the capacity reservation.
*
* Uses Azure REST API version 2024-11-01.
*
* Other available API versions: 2022-08-01, 2022-11-01, 2023-03-01, 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01, 2025-04-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native compute [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare function getCapacityReservation(args: GetCapacityReservationArgs, opts?: pulumi.InvokeOptions): Promise<GetCapacityReservationResult>;
export interface GetCapacityReservationArgs {
/**
* The name of the capacity reservation group.
*/
capacityReservationGroupName: string;
/**
* The name of the capacity reservation.
*/
capacityReservationName: string;
/**
* The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.
*/
expand?: string;
/**
* The name of the resource group. The name is case insensitive.
*/
resourceGroupName: string;
}
/**
* Specifies information about the capacity reservation.
*/
export interface GetCapacityReservationResult {
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: string;
/**
* Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
*/
readonly id: string;
/**
* The Capacity reservation instance view.
*/
readonly instanceView: outputs.compute.CapacityReservationInstanceViewResponse;
/**
* The geo-location where the resource lives
*/
readonly location: string;
/**
* The name of the resource
*/
readonly name: string;
/**
* Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01.
*/
readonly platformFaultDomainCount: number;
/**
* The provisioning state, which only appears in the response.
*/
readonly provisioningState: string;
/**
* The date time when the capacity reservation was last updated.
*/
readonly provisioningTime: string;
/**
* A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.
*/
readonly reservationId: string;
/**
* SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. For Block capacity reservations, sku.capacity can only accept values 1, 2, 4, 8, 16, 32, 64. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. When 'CapacityReservationSupported' is true, the SKU capability also specifies the 'SupportedCapacityReservationTypes', which lists the types of capacity reservations (such as Targeted or Block) that the SKU supports. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
*/
readonly sku: outputs.compute.SkuResponse;
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
readonly systemData: outputs.compute.SystemDataResponse;
/**
* Resource tags.
*/
readonly tags?: {
[key: string]: string;
};
/**
* Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01.
*/
readonly timeCreated: string;
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
readonly type: string;
/**
* A list of all virtual machine resource ids that are associated with the capacity reservation.
*/
readonly virtualMachinesAssociated: outputs.compute.SubResourceReadOnlyResponse[];
/**
* The availability zones.
*/
readonly zones?: string[];
}
/**
* The operation that retrieves information about the capacity reservation.
*
* Uses Azure REST API version 2024-11-01.
*
* Other available API versions: 2022-08-01, 2022-11-01, 2023-03-01, 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01, 2025-04-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native compute [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare function getCapacityReservationOutput(args: GetCapacityReservationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCapacityReservationResult>;
export interface GetCapacityReservationOutputArgs {
/**
* The name of the capacity reservation group.
*/
capacityReservationGroupName: pulumi.Input<string>;
/**
* The name of the capacity reservation.
*/
capacityReservationName: pulumi.Input<string>;
/**
* The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.
*/
expand?: pulumi.Input<string>;
/**
* The name of the resource group. The name is case insensitive.
*/
resourceGroupName: pulumi.Input<string>;
}