@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
164 lines • 5.57 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Get information about a Google Compute Engine Reservation Block. Reservation blocks are automatically created by Google Cloud within reservations and represent a physical grouping of resources.
*
* For more information see the [official documentation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
* and the [API](https://cloud.google.com/compute/docs/reference/rest/v1/reservationBlocks).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const block = gcp.compute.getReservationBlock({
* name: "my-reservation-block",
* reservation: "my-reservation",
* zone: "us-central1-a",
* });
* export const blockStatus = block.then(block => block.status);
* export const blockInUseCount = block.then(block => block.inUseCount);
* ```
*/
export declare function getReservationBlock(args: GetReservationBlockArgs, opts?: pulumi.InvokeOptions): Promise<GetReservationBlockResult>;
/**
* A collection of arguments for invoking getReservationBlock.
*/
export interface GetReservationBlockArgs {
/**
* The name of the reservation block.
*/
name: string;
/**
* The project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
project?: string;
/**
* The name of the parent reservation.
*
* - - -
*/
reservation: string;
/**
* The zone where the reservation block resides.
*/
zone?: string;
}
/**
* A collection of values returned by getReservationBlock.
*/
export interface GetReservationBlockResult {
/**
* The number of resources that are allocated in this reservation block.
*/
readonly blockCount: number;
/**
* Creation timestamp in RFC3339 text format.
*/
readonly creationTimestamp: string;
/**
* Health information for the reservation block. Structure is documented below.
*/
readonly healthInfos: outputs.compute.GetReservationBlockHealthInfo[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The number of instances that are currently in use on this reservation block.
*/
readonly inUseCount: number;
/**
* Type of the resource. Always `compute#reservationBlock` for reservation blocks.
*/
readonly kind: string;
readonly name: string;
/**
* The physical topology of the reservation block. Structure is documented below.
*/
readonly physicalTopologies: outputs.compute.GetReservationBlockPhysicalTopology[];
readonly project: string;
readonly reservation: string;
/**
* Maintenance information for this reservation block. Structure is documented below.
*/
readonly reservationMaintenances: outputs.compute.GetReservationBlockReservationMaintenance[];
/**
* The number of reservation sub-blocks associated with this reservation block.
*/
readonly reservationSubBlockCount: number;
/**
* The number of in-use reservation sub-blocks associated with this reservation block.
*/
readonly reservationSubBlockInUseCount: number;
/**
* The unique identifier for the resource.
*/
readonly resourceId: string;
/**
* Server-defined fully-qualified URL for this resource.
*/
readonly selfLink: string;
/**
* Server-defined URL for this resource with the resource id.
*/
readonly selfLinkWithId: string;
/**
* Status of the reservation block.
*/
readonly status: string;
/**
* A List of all block sub-block names in the parent block.
*/
readonly subBlockNames: string[];
readonly zone?: string;
}
/**
* Get information about a Google Compute Engine Reservation Block. Reservation blocks are automatically created by Google Cloud within reservations and represent a physical grouping of resources.
*
* For more information see the [official documentation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
* and the [API](https://cloud.google.com/compute/docs/reference/rest/v1/reservationBlocks).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const block = gcp.compute.getReservationBlock({
* name: "my-reservation-block",
* reservation: "my-reservation",
* zone: "us-central1-a",
* });
* export const blockStatus = block.then(block => block.status);
* export const blockInUseCount = block.then(block => block.inUseCount);
* ```
*/
export declare function getReservationBlockOutput(args: GetReservationBlockOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetReservationBlockResult>;
/**
* A collection of arguments for invoking getReservationBlock.
*/
export interface GetReservationBlockOutputArgs {
/**
* The name of the reservation block.
*/
name: pulumi.Input<string>;
/**
* The project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* The name of the parent reservation.
*
* - - -
*/
reservation: pulumi.Input<string>;
/**
* The zone where the reservation block resides.
*/
zone?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=getReservationBlock.d.ts.map