@pulumi/docker
Version:
A Pulumi package for interacting with Docker in Pulumi programs
79 lines • 3.37 kB
JavaScript
// *** 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.Plugin = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* <!-- Bug: Type and Name are switched -->
* Manages the lifecycle of a Docker plugin.
*
* ## Import
*
* #!/bin/bash
*
* ```sh
* $ pulumi import docker:index/plugin:Plugin sample-volume-plugin "$(docker plugin inspect -f {{.ID}} tiborvass/sample-volume-plugin:latest)"
* ```
*/
class Plugin extends pulumi.CustomResource {
/**
* Get an existing Plugin 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 Plugin(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Plugin. 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'] === Plugin.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["alias"] = state?.alias;
resourceInputs["enableTimeout"] = state?.enableTimeout;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["envs"] = state?.envs;
resourceInputs["forceDestroy"] = state?.forceDestroy;
resourceInputs["forceDisable"] = state?.forceDisable;
resourceInputs["grantAllPermissions"] = state?.grantAllPermissions;
resourceInputs["grantPermissions"] = state?.grantPermissions;
resourceInputs["name"] = state?.name;
resourceInputs["pluginReference"] = state?.pluginReference;
}
else {
const args = argsOrState;
resourceInputs["alias"] = args?.alias;
resourceInputs["enableTimeout"] = args?.enableTimeout;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["envs"] = args?.envs;
resourceInputs["forceDestroy"] = args?.forceDestroy;
resourceInputs["forceDisable"] = args?.forceDisable;
resourceInputs["grantAllPermissions"] = args?.grantAllPermissions;
resourceInputs["grantPermissions"] = args?.grantPermissions;
resourceInputs["name"] = args?.name;
resourceInputs["pluginReference"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Plugin.__pulumiType, name, resourceInputs, opts);
}
}
exports.Plugin = Plugin;
/** @internal */
Plugin.__pulumiType = 'docker:index/plugin:Plugin';
//# sourceMappingURL=plugin.js.map
;