@pulumi/docker
Version:
A Pulumi package for interacting with Docker in Pulumi programs
79 lines • 3.75 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, Object.assign(Object.assign({}, 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 ? state.alias : undefined;
resourceInputs["enableTimeout"] = state ? state.enableTimeout : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["envs"] = state ? state.envs : undefined;
resourceInputs["forceDestroy"] = state ? state.forceDestroy : undefined;
resourceInputs["forceDisable"] = state ? state.forceDisable : undefined;
resourceInputs["grantAllPermissions"] = state ? state.grantAllPermissions : undefined;
resourceInputs["grantPermissions"] = state ? state.grantPermissions : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["pluginReference"] = state ? state.pluginReference : undefined;
}
else {
const args = argsOrState;
resourceInputs["alias"] = args ? args.alias : undefined;
resourceInputs["enableTimeout"] = args ? args.enableTimeout : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["envs"] = args ? args.envs : undefined;
resourceInputs["forceDestroy"] = args ? args.forceDestroy : undefined;
resourceInputs["forceDisable"] = args ? args.forceDisable : undefined;
resourceInputs["grantAllPermissions"] = args ? args.grantAllPermissions : undefined;
resourceInputs["grantPermissions"] = args ? args.grantPermissions : undefined;
resourceInputs["name"] = args ? args.name : undefined;
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