UNPKG

@pulumi/command

Version:

[![Actions Status](https://github.com/pulumi/pulumi-command/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-command/actions) [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM version](https://bad

79 lines 4.08 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.CopyFile = void 0; const pulumi = require("@pulumi/pulumi"); const inputs = require("../types/input"); const utilities = require("../utilities"); /** * Copy a local file to a remote host. * * @deprecated This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead. */ class CopyFile extends pulumi.CustomResource { /** * Get an existing CopyFile 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { pulumi.log.warn("CopyFile is deprecated: This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead."); return new CopyFile(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of CopyFile. 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'] === CopyFile.__pulumiType; } /** * Create a CopyFile resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ /** @deprecated This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead. */ constructor(name, args, opts) { pulumi.log.warn("CopyFile is deprecated: This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead."); let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if ((!args || args.connection === undefined) && !opts.urn) { throw new Error("Missing required property 'connection'"); } if ((!args || args.localPath === undefined) && !opts.urn) { throw new Error("Missing required property 'localPath'"); } if ((!args || args.remotePath === undefined) && !opts.urn) { throw new Error("Missing required property 'remotePath'"); } resourceInputs["connection"] = (args === null || args === void 0 ? void 0 : args.connection) ? pulumi.secret((args.connection ? pulumi.output(args.connection).apply(inputs.remote.connectionArgsProvideDefaults) : undefined)) : undefined; resourceInputs["localPath"] = args ? args.localPath : undefined; resourceInputs["remotePath"] = args ? args.remotePath : undefined; resourceInputs["triggers"] = args ? args.triggers : undefined; } else { resourceInputs["connection"] = undefined /*out*/; resourceInputs["localPath"] = undefined /*out*/; resourceInputs["remotePath"] = undefined /*out*/; resourceInputs["triggers"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["connection"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(CopyFile.__pulumiType, name, resourceInputs, opts); } } exports.CopyFile = CopyFile; /** @internal */ CopyFile.__pulumiType = 'command:remote:CopyFile'; //# sourceMappingURL=copyFile.js.map