rough-oil-1458
09/02/2018, 4:04 PMrough-oil-1458
09/02/2018, 4:04 PMrough-oil-1458
09/02/2018, 4:04 PMrough-oil-1458
09/02/2018, 4:05 PMrough-oil-1458
09/02/2018, 4:06 PMstocky-spoon-28903
09/02/2018, 5:31 PMcreamy-potato-29402
09/02/2018, 5:32 PMcreamy-potato-29402
09/02/2018, 6:28 PMcreamy-potato-29402
09/02/2018, 6:28 PMrough-oil-1458
09/02/2018, 6:38 PMrough-oil-1458
09/02/2018, 6:51 PMcreamy-potato-29402
09/02/2018, 6:51 PMcreamy-potato-29402
09/02/2018, 6:51 PMrough-oil-1458
09/02/2018, 6:52 PMcreamy-potato-29402
09/02/2018, 6:53 PMrough-oil-1458
09/02/2018, 6:53 PMrough-oil-1458
09/02/2018, 6:54 PMlet datastore = vsphere.getDatastore({
name: "bdf1000-01",
datacenterId: "datacenter-21"
});
console.log(datastore.Id);
creamy-potato-29402
09/02/2018, 6:55 PMOutput<string>
, you’ll probably need to do something like datastore.Id.apply(console.log)
creamy-potato-29402
09/02/2018, 6:56 PMrough-oil-1458
09/02/2018, 7:00 PMrough-oil-1458
09/02/2018, 7:00 PMrough-oil-1458
09/02/2018, 7:02 PMrough-oil-1458
09/02/2018, 7:45 PMrough-oil-1458
09/02/2018, 7:45 PMexport declare function getDatacenter(args?: GetDatacenterArgs, opts?: pulumi.InvokeOptions): Promise<GetDatacenterResult>;
/**
* A collection of arguments for invoking getDatacenter.
*/
export interface GetDatacenterArgs {
/**
* The name of the datacenter. This can be a name or path.
* Can be omitted if there is only one datacenter in your inventory.
*/
readonly name?: string;
}
/**
* A collection of values returned by getDatacenter.
*/
export interface GetDatacenterResult {
/**
* id is the provider-assigned unique ID for this managed resource.
*/
readonly id: string;
}
rough-oil-1458
09/02/2018, 7:46 PMfunction getDatastore(args, opts) {
return pulumi.runtime.invoke("vsphere:index/getDatastore:getDatastore", {
"datacenterId": args.datacenterId,
"name": args.name,
}, opts);
}
exports.getDatastore = getDatastore;
big-piano-35669
await
or then
it.rough-oil-1458
09/02/2018, 7:46 PMrough-oil-1458
09/02/2018, 7:46 PMrough-oil-1458
09/02/2018, 7:46 PMbig-piano-35669
let datastore = vsphere.getDatastore({
name: "bdf1000-01",
datacenterId: "datacenter-21"
});
datastore.then(result => console.log(result.id));