Command v0.11.1 published on Friday, May 17, 2024 by Pulumi
command.remote.CopyFile
Explore with Pulumi AI
Copy a local file to a remote host.
Create CopyFile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CopyFile(name: string, args: CopyFileArgs, opts?: CustomResourceOptions);
@overload
def CopyFile(resource_name: str,
args: CopyFileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CopyFile(resource_name: str,
opts: Optional[ResourceOptions] = None,
connection: Optional[ConnectionArgs] = None,
local_path: Optional[str] = None,
remote_path: Optional[str] = None,
triggers: Optional[Sequence[Any]] = None)
func NewCopyFile(ctx *Context, name string, args CopyFileArgs, opts ...ResourceOption) (*CopyFile, error)
public CopyFile(string name, CopyFileArgs args, CustomResourceOptions? opts = null)
public CopyFile(String name, CopyFileArgs args)
public CopyFile(String name, CopyFileArgs args, CustomResourceOptions options)
type: command:remote:CopyFile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CopyFileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CopyFileArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CopyFileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CopyFileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CopyFileArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var copyFileResource = new Command.Remote.CopyFile("copyFileResource", new()
{
Connection = new Command.Remote.Inputs.ConnectionArgs
{
Host = "string",
AgentSocketPath = "string",
DialErrorLimit = 0,
Password = "string",
PerDialTimeout = 0,
Port = 0,
PrivateKey = "string",
PrivateKeyPassword = "string",
Proxy = new Command.Remote.Inputs.ProxyConnectionArgs
{
Host = "string",
AgentSocketPath = "string",
DialErrorLimit = 0,
Password = "string",
PerDialTimeout = 0,
Port = 0,
PrivateKey = "string",
PrivateKeyPassword = "string",
User = "string",
},
User = "string",
},
LocalPath = "string",
RemotePath = "string",
Triggers = new[]
{
"any",
},
});
example, err := remote.NewCopyFile(ctx, "copyFileResource", &remote.CopyFileArgs{
Connection: &remote.ConnectionArgs{
Host: pulumi.String("string"),
AgentSocketPath: pulumi.String("string"),
DialErrorLimit: pulumi.Int(0),
Password: pulumi.String("string"),
PerDialTimeout: pulumi.Int(0),
Port: pulumi.Float64(0),
PrivateKey: pulumi.String("string"),
PrivateKeyPassword: pulumi.String("string"),
Proxy: &remote.ProxyConnectionArgs{
Host: pulumi.String("string"),
AgentSocketPath: pulumi.String("string"),
DialErrorLimit: pulumi.Int(0),
Password: pulumi.String("string"),
PerDialTimeout: pulumi.Int(0),
Port: pulumi.Float64(0),
PrivateKey: pulumi.String("string"),
PrivateKeyPassword: pulumi.String("string"),
User: pulumi.String("string"),
},
User: pulumi.String("string"),
},
LocalPath: pulumi.String("string"),
RemotePath: pulumi.String("string"),
Triggers: pulumi.Array{
pulumi.Any("any"),
},
})
var copyFileResource = new CopyFile("copyFileResource", CopyFileArgs.builder()
.connection(ConnectionArgs.builder()
.host("string")
.agentSocketPath("string")
.dialErrorLimit(0)
.password("string")
.perDialTimeout(0)
.port(0)
.privateKey("string")
.privateKeyPassword("string")
.proxy(ProxyConnectionArgs.builder()
.host("string")
.agentSocketPath("string")
.dialErrorLimit(0)
.password("string")
.perDialTimeout(0)
.port(0)
.privateKey("string")
.privateKeyPassword("string")
.user("string")
.build())
.user("string")
.build())
.localPath("string")
.remotePath("string")
.triggers("any")
.build());
copy_file_resource = command.remote.CopyFile("copyFileResource",
connection=command.remote.ConnectionArgs(
host="string",
agent_socket_path="string",
dial_error_limit=0,
password="string",
per_dial_timeout=0,
port=0,
private_key="string",
private_key_password="string",
proxy=command.remote.ProxyConnectionArgs(
host="string",
agent_socket_path="string",
dial_error_limit=0,
password="string",
per_dial_timeout=0,
port=0,
private_key="string",
private_key_password="string",
user="string",
),
user="string",
),
local_path="string",
remote_path="string",
triggers=["any"])
const copyFileResource = new command.remote.CopyFile("copyFileResource", {
connection: {
host: "string",
agentSocketPath: "string",
dialErrorLimit: 0,
password: "string",
perDialTimeout: 0,
port: 0,
privateKey: "string",
privateKeyPassword: "string",
proxy: {
host: "string",
agentSocketPath: "string",
dialErrorLimit: 0,
password: "string",
perDialTimeout: 0,
port: 0,
privateKey: "string",
privateKeyPassword: "string",
user: "string",
},
user: "string",
},
localPath: "string",
remotePath: "string",
triggers: ["any"],
});
type: command:remote:CopyFile
properties:
connection:
agentSocketPath: string
dialErrorLimit: 0
host: string
password: string
perDialTimeout: 0
port: 0
privateKey: string
privateKeyPassword: string
proxy:
agentSocketPath: string
dialErrorLimit: 0
host: string
password: string
perDialTimeout: 0
port: 0
privateKey: string
privateKeyPassword: string
user: string
user: string
localPath: string
remotePath: string
triggers:
- any
CopyFile Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CopyFile resource accepts the following input properties:
- Connection Connection
- The parameters with which to connect to the remote host.
- Local
Path string - The path of the file to be copied.
- Remote
Path string - The destination path in the remote host.
- Triggers List<object>
- Trigger replacements on changes to this input.
- Connection
Connection
Args - The parameters with which to connect to the remote host.
- Local
Path string - The path of the file to be copied.
- Remote
Path string - The destination path in the remote host.
- Triggers []interface{}
- Trigger replacements on changes to this input.
- connection Connection
- The parameters with which to connect to the remote host.
- local
Path String - The path of the file to be copied.
- remote
Path String - The destination path in the remote host.
- triggers List<Object>
- Trigger replacements on changes to this input.
- connection Connection
- The parameters with which to connect to the remote host.
- local
Path string - The path of the file to be copied.
- remote
Path string - The destination path in the remote host.
- triggers any[]
- Trigger replacements on changes to this input.
- connection
Connection
Args - The parameters with which to connect to the remote host.
- local_
path str - The path of the file to be copied.
- remote_
path str - The destination path in the remote host.
- triggers Sequence[Any]
- Trigger replacements on changes to this input.
- connection Property Map
- The parameters with which to connect to the remote host.
- local
Path String - The path of the file to be copied.
- remote
Path String - The destination path in the remote host.
- triggers List<Any>
- Trigger replacements on changes to this input.
Outputs
All input properties are implicitly available as output properties. Additionally, the CopyFile resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
Connection, ConnectionArgs
- Host string
- The address of the resource to connect to.
- Agent
Socket stringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- Dial
Error intLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- Password string
- The password we should use for the connection.
- Per
Dial intTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- Port double
- The port to connect to.
- Private
Key string - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- Private
Key stringPassword - The password to use in case the private key is encrypted.
- Proxy
Proxy
Connection - The connection settings for the bastion/proxy host.
- User string
- The user that we should use for the connection.
- Host string
- The address of the resource to connect to.
- Agent
Socket stringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- Dial
Error intLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- Password string
- The password we should use for the connection.
- Per
Dial intTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- Port float64
- The port to connect to.
- Private
Key string - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- Private
Key stringPassword - The password to use in case the private key is encrypted.
- Proxy
Proxy
Connection - The connection settings for the bastion/proxy host.
- User string
- The user that we should use for the connection.
- host String
- The address of the resource to connect to.
- agent
Socket StringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- dial
Error IntegerLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- password String
- The password we should use for the connection.
- per
Dial IntegerTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- port Double
- The port to connect to.
- private
Key String - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- private
Key StringPassword - The password to use in case the private key is encrypted.
- proxy
Proxy
Connection - The connection settings for the bastion/proxy host.
- user String
- The user that we should use for the connection.
- host string
- The address of the resource to connect to.
- agent
Socket stringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- dial
Error numberLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- password string
- The password we should use for the connection.
- per
Dial numberTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- port number
- The port to connect to.
- private
Key string - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- private
Key stringPassword - The password to use in case the private key is encrypted.
- proxy
Proxy
Connection - The connection settings for the bastion/proxy host.
- user string
- The user that we should use for the connection.
- host str
- The address of the resource to connect to.
- agent_
socket_ strpath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- dial_
error_ intlimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- password str
- The password we should use for the connection.
- per_
dial_ inttimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- port float
- The port to connect to.
- private_
key str - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- private_
key_ strpassword - The password to use in case the private key is encrypted.
- proxy
Proxy
Connection - The connection settings for the bastion/proxy host.
- user str
- The user that we should use for the connection.
- host String
- The address of the resource to connect to.
- agent
Socket StringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- dial
Error NumberLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- password String
- The password we should use for the connection.
- per
Dial NumberTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- port Number
- The port to connect to.
- private
Key String - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- private
Key StringPassword - The password to use in case the private key is encrypted.
- proxy Property Map
- The connection settings for the bastion/proxy host.
- user String
- The user that we should use for the connection.
ProxyConnection, ProxyConnectionArgs
- Host string
- The address of the bastion host to connect to.
- Agent
Socket stringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- Dial
Error intLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- Password string
- The password we should use for the connection to the bastion host.
- Per
Dial intTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- Port double
- The port of the bastion host to connect to.
- Private
Key string - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- Private
Key stringPassword - The password to use in case the private key is encrypted.
- User string
- The user that we should use for the connection to the bastion host.
- Host string
- The address of the bastion host to connect to.
- Agent
Socket stringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- Dial
Error intLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- Password string
- The password we should use for the connection to the bastion host.
- Per
Dial intTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- Port float64
- The port of the bastion host to connect to.
- Private
Key string - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- Private
Key stringPassword - The password to use in case the private key is encrypted.
- User string
- The user that we should use for the connection to the bastion host.
- host String
- The address of the bastion host to connect to.
- agent
Socket StringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- dial
Error IntegerLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- password String
- The password we should use for the connection to the bastion host.
- per
Dial IntegerTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- port Double
- The port of the bastion host to connect to.
- private
Key String - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- private
Key StringPassword - The password to use in case the private key is encrypted.
- user String
- The user that we should use for the connection to the bastion host.
- host string
- The address of the bastion host to connect to.
- agent
Socket stringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- dial
Error numberLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- password string
- The password we should use for the connection to the bastion host.
- per
Dial numberTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- port number
- The port of the bastion host to connect to.
- private
Key string - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- private
Key stringPassword - The password to use in case the private key is encrypted.
- user string
- The user that we should use for the connection to the bastion host.
- host str
- The address of the bastion host to connect to.
- agent_
socket_ strpath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- dial_
error_ intlimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- password str
- The password we should use for the connection to the bastion host.
- per_
dial_ inttimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- port float
- The port of the bastion host to connect to.
- private_
key str - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- private_
key_ strpassword - The password to use in case the private key is encrypted.
- user str
- The user that we should use for the connection to the bastion host.
- host String
- The address of the bastion host to connect to.
- agent
Socket StringPath - SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
- dial
Error NumberLimit - Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
- password String
- The password we should use for the connection to the bastion host.
- per
Dial NumberTimeout - Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
- port Number
- The port of the bastion host to connect to.
- private
Key String - The contents of an SSH key to use for the connection. This takes preference over the password if provided.
- private
Key StringPassword - The password to use in case the private key is encrypted.
- user String
- The user that we should use for the connection to the bastion host.
Package Details
- Repository
- command pulumi/pulumi-command
- License
- Apache-2.0