UNPKG

@pulumi/docker

Version:

A Pulumi package for interacting with Docker in Pulumi programs

89 lines 3.02 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ServiceConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Import * * ### Example * * Assuming you created a `config` as follows * * #!/bin/bash * * printf '{"a":"b"}' | docker config create foo - * * prints the id * * 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d * * you provide the definition for the resource as follows * * terraform * * resource "docker_config" "foo" { * * name = "foo" * * data = base64encode("{\"a\": \"b\"}") * * } * * then the import command is as follows * * #!/bin/bash * * ```sh * $ pulumi import docker:index/serviceConfig:ServiceConfig foo 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d * ``` */ class ServiceConfig extends pulumi.CustomResource { /** * Get an existing ServiceConfig resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new ServiceConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ServiceConfig. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ServiceConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["data"] = state ? state.data : undefined; resourceInputs["name"] = state ? state.name : undefined; } else { const args = argsOrState; if ((!args || args.data === undefined) && !opts.urn) { throw new Error("Missing required property 'data'"); } resourceInputs["data"] = args ? args.data : undefined; resourceInputs["name"] = args ? args.name : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServiceConfig.__pulumiType, name, resourceInputs, opts); } } exports.ServiceConfig = ServiceConfig; /** @internal */ ServiceConfig.__pulumiType = 'docker:index/serviceConfig:ServiceConfig'; //# sourceMappingURL=serviceConfig.js.map