@pulumi/hcloud
Version:
A Pulumi package for creating and managing hcloud cloud resources.
72 lines • 2.15 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getServerOutput = exports.getServer = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const s1 = hcloud.getServer({
* name: "my-server",
* });
* const s2 = hcloud.getServer({
* id: 123,
* });
* const s3 = hcloud.getServer({
* withSelector: "key=value",
* });
* ```
*/
function getServer(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("hcloud:index/getServer:getServer", {
"id": args.id,
"name": args.name,
"networks": args.networks,
"placementGroupId": args.placementGroupId,
"selector": args.selector,
"withSelector": args.withSelector,
"withStatuses": args.withStatuses,
}, opts);
}
exports.getServer = getServer;
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const s1 = hcloud.getServer({
* name: "my-server",
* });
* const s2 = hcloud.getServer({
* id: 123,
* });
* const s3 = hcloud.getServer({
* withSelector: "key=value",
* });
* ```
*/
function getServerOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("hcloud:index/getServer:getServer", {
"id": args.id,
"name": args.name,
"networks": args.networks,
"placementGroupId": args.placementGroupId,
"selector": args.selector,
"withSelector": args.withSelector,
"withStatuses": args.withStatuses,
}, opts);
}
exports.getServerOutput = getServerOutput;
//# sourceMappingURL=getServer.js.map