@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
113 lines (112 loc) • 3.78 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The `vsphere.getDatastore` data source can be used to discover the ID of a
* vSphere datastore object. This can then be used with resources or data sources
* that require a datastore. For example, to create virtual machines in using the
* `vsphere.VirtualMachine` resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const datacenter = vsphere.getDatacenter({
* name: "dc-01",
* });
* const datastore = datacenter.then(datacenter => vsphere.getDatastore({
* name: "datastore-01",
* datacenterId: datacenter.id,
* }));
* ```
*/
export declare function getDatastore(args: GetDatastoreArgs, opts?: pulumi.InvokeOptions): Promise<GetDatastoreResult>;
/**
* A collection of arguments for invoking getDatastore.
*/
export interface GetDatastoreArgs {
/**
* The managed object reference ID
* of the datacenter the datastore is located in. This can be omitted if the
* search path used in `name` is an absolute path. For default datacenters, use
* the `id` attribute from an empty `vsphere.Datacenter` data source.
*/
datacenterId?: string;
/**
* The name of the datastore. This can be a name or path.
*/
name: string;
/**
* The disk space usage statistics for the specific datastore. The
* total datastore capacity is represented as `capacity` and the free remaining
* disk is represented as `free`.
*/
stats?: {
[key: string]: string;
};
}
/**
* A collection of values returned by getDatastore.
*/
export interface GetDatastoreResult {
readonly datacenterId?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name: string;
/**
* The disk space usage statistics for the specific datastore. The
* total datastore capacity is represented as `capacity` and the free remaining
* disk is represented as `free`.
*/
readonly stats?: {
[key: string]: string;
};
}
/**
* The `vsphere.getDatastore` data source can be used to discover the ID of a
* vSphere datastore object. This can then be used with resources or data sources
* that require a datastore. For example, to create virtual machines in using the
* `vsphere.VirtualMachine` resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const datacenter = vsphere.getDatacenter({
* name: "dc-01",
* });
* const datastore = datacenter.then(datacenter => vsphere.getDatastore({
* name: "datastore-01",
* datacenterId: datacenter.id,
* }));
* ```
*/
export declare function getDatastoreOutput(args: GetDatastoreOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDatastoreResult>;
/**
* A collection of arguments for invoking getDatastore.
*/
export interface GetDatastoreOutputArgs {
/**
* The managed object reference ID
* of the datacenter the datastore is located in. This can be omitted if the
* search path used in `name` is an absolute path. For default datacenters, use
* the `id` attribute from an empty `vsphere.Datacenter` data source.
*/
datacenterId?: pulumi.Input<string>;
/**
* The name of the datastore. This can be a name or path.
*/
name: pulumi.Input<string>;
/**
* The disk space usage statistics for the specific datastore. The
* total datastore capacity is represented as `capacity` and the free remaining
* disk is represented as `free`.
*/
stats?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}