diff --git a/provider/cmd/pulumi-resource-command/schema.json b/provider/cmd/pulumi-resource-command/schema.json index b00fe10e..fecbd349 100644 --- a/provider/cmd/pulumi-resource-command/schema.json +++ b/provider/cmd/pulumi-resource-command/schema.json @@ -4,6 +4,7 @@ "types": { "command:remote:Connection": { "type": "object", + "description": "Instructions for how to connect to a remote endpoint.", "properties": { "user": { "type": "string", @@ -33,35 +34,44 @@ }, "resources": { "command:local:Command": { + "description": "A local command to be executed.\nThis command can be inserted into the life cycles of other resources using the\n`dependsOn` or `parent` resource options. A command is considered to have\nfailed when it finished with a non-zero exit code. This will fail the CRUD step\nof the `Command` resource.", "properties": { "interpreter": { + "description": "The program and arguments to run the command.\nFor example: `[\"/bin/sh\", \"-c\"]`", "type": "array", "items": { "type": "string" } }, "dir": { + "description": "The directory from which to run the command from. If `dir` does not exist, then\n`Command` will fail.", "type": "string" }, "environment": { + "description": "Additional environment variables available to the command's process.", "type": "object", "additionalProperties": { "type": "string" } }, "create": { - "type": "string" + "type": "string", + "description": "The command to run on create." }, "update": { - "type": "string" + "type": "string", + "description": "The command to run on update." }, "delete": { - "type": "string" + "type": "string", + "description": "The command to run on delete." }, "stdout": { + "description": "The standard output of the command's process", "type": "string" }, "stderr": { + "description": "The standard error of the command's process", "type": "string" } }, @@ -71,21 +81,22 @@ ], "inputProperties": { "interpreter": { + "description": "The program and arguments to run the command.\nOn Linux and macOS, defaults to: `[\"/bin/sh\", \"-c\"]`. On Windows, defaults to: `[\"cmd\", \"/C\"]`", "type": "array", "items": { "type": "string" } }, "dir": { - "type": "string", - "description": "The contents of an SSH key to use for the connection. This takes preference over the password if provided." + "description": "The working directory in which to run the command from.", + "type": "string" }, "environment": { + "description": "Additional environment variables available to the command's process.", "type": "object", "additionalProperties": { "type": "string" - }, - "description": "Environment variables to set on commands." + } }, "create": { "type": "string", @@ -103,29 +114,37 @@ "requiredInputs": [] }, "command:remote:Command": { + "description": "A command to run on a remote host.\nThe connection is established via ssh.", "properties": { "connection": { + "description": "The parameters with which to connect to the remote host", "$ref": "#/types/command:remote:Connection" }, "environment": { + "description": "Additional environment variables available to the command's process.", "type": "object", "additionalProperties": { "type": "string" } }, "create": { + "description": "The command to run on create.", "type": "string" }, "update": { + "description": "The command to run on update.", "type": "string" }, "delete": { + "description": "The command to run on delete.", "type": "string" }, "stdout": { + "description": "The standard output of the command's process", "type": "string" }, "stderr": { + "description": "The standard error of the command's process", "type": "string" } }, @@ -135,21 +154,26 @@ ], "inputProperties": { "connection": { + "description": "The parameters with which to connect to the remote host", "$ref": "#/types/command:remote:Connection" }, "environment": { + "description": "Additional environment variables available to the command's process.", "type": "object", "additionalProperties": { "type": "string" } }, "create": { + "description": "The command to run on create.", "type": "string" }, "update": { + "description": "The command to run on update.", "type": "string" }, "delete": { + "description": "The command to run on delete.", "type": "string" } }, diff --git a/sdk/dotnet/Local/Command.cs b/sdk/dotnet/Local/Command.cs index ae6b4686..72832c1a 100644 --- a/sdk/dotnet/Local/Command.cs +++ b/sdk/dotnet/Local/Command.cs @@ -9,30 +9,63 @@ namespace Pulumi.Command.Local { + /// + /// A local command to be executed. + /// This command can be inserted into the life cycles of other resources using the + /// `dependsOn` or `parent` resource options. A command is considered to have + /// failed when it finished with a non-zero exit code. This will fail the CRUD step + /// of the `Command` resource. + /// [CommandResourceType("command:local:Command")] public partial class Command : Pulumi.CustomResource { + /// + /// The command to run on create. + /// [Output("create")] public Output Create { get; private set; } = null!; + /// + /// The command to run on delete. + /// [Output("delete")] public Output Delete { get; private set; } = null!; + /// + /// The directory from which to run the command from. If `dir` does not exist, then + /// `Command` will fail. + /// [Output("dir")] public Output Dir { get; private set; } = null!; + /// + /// Additional environment variables available to the command's process. + /// [Output("environment")] public Output?> Environment { get; private set; } = null!; + /// + /// The program and arguments to run the command. + /// For example: `["/bin/sh", "-c"]` + /// [Output("interpreter")] public Output> Interpreter { get; private set; } = null!; + /// + /// The standard error of the command's process + /// [Output("stderr")] public Output Stderr { get; private set; } = null!; + /// + /// The standard output of the command's process + /// [Output("stdout")] public Output Stdout { get; private set; } = null!; + /// + /// The command to run on update. + /// [Output("update")] public Output Update { get; private set; } = null!; @@ -94,7 +127,7 @@ public sealed class CommandArgs : Pulumi.ResourceArgs public Input? Delete { get; set; } /// - /// The contents of an SSH key to use for the connection. This takes preference over the password if provided. + /// The working directory in which to run the command from. /// [Input("dir")] public Input? Dir { get; set; } @@ -103,7 +136,7 @@ public sealed class CommandArgs : Pulumi.ResourceArgs private InputMap? _environment; /// - /// Environment variables to set on commands. + /// Additional environment variables available to the command's process. /// public InputMap Environment { @@ -113,6 +146,11 @@ public InputMap Environment [Input("interpreter")] private InputList? _interpreter; + + /// + /// The program and arguments to run the command. + /// For example: `["/bin/sh", "-c"]` + /// public InputList Interpreter { get => _interpreter ?? (_interpreter = new InputList()); diff --git a/sdk/dotnet/Remote/Command.cs b/sdk/dotnet/Remote/Command.cs index fd867de5..afb8074c 100644 --- a/sdk/dotnet/Remote/Command.cs +++ b/sdk/dotnet/Remote/Command.cs @@ -9,27 +9,52 @@ namespace Pulumi.Command.Remote { + /// + /// A command to run on a remote host. + /// The connection is established via ssh. + /// [CommandResourceType("command:remote:Command")] public partial class Command : Pulumi.CustomResource { + /// + /// The parameters with which to connect to the remote host + /// [Output("connection")] public Output Connection { get; private set; } = null!; + /// + /// The command to run on create. + /// [Output("create")] public Output Create { get; private set; } = null!; + /// + /// The command to run on delete. + /// [Output("delete")] public Output Delete { get; private set; } = null!; + /// + /// Additional environment variables available to the command's process. + /// [Output("environment")] public Output?> Environment { get; private set; } = null!; + /// + /// The standard error of the command's process + /// [Output("stderr")] public Output Stderr { get; private set; } = null!; + /// + /// The standard output of the command's process + /// [Output("stdout")] public Output Stdout { get; private set; } = null!; + /// + /// The command to run on update. + /// [Output("update")] public Output Update { get; private set; } = null!; @@ -78,23 +103,39 @@ public static Command Get(string name, Input id, CustomResourceOptions? public sealed class CommandArgs : Pulumi.ResourceArgs { + /// + /// The parameters with which to connect to the remote host + /// [Input("connection", required: true)] public Input Connection { get; set; } = null!; + /// + /// The command to run on create. + /// [Input("create")] public Input? Create { get; set; } + /// + /// The command to run on delete. + /// [Input("delete")] public Input? Delete { get; set; } [Input("environment")] private InputMap? _environment; + + /// + /// Additional environment variables available to the command's process. + /// public InputMap Environment { get => _environment ?? (_environment = new InputMap()); set => _environment = value; } + /// + /// The command to run on update. + /// [Input("update")] public Input? Update { get; set; } diff --git a/sdk/dotnet/Remote/Inputs/ConnectionArgs.cs b/sdk/dotnet/Remote/Inputs/ConnectionArgs.cs index 6f8b6267..dfaccb5f 100644 --- a/sdk/dotnet/Remote/Inputs/ConnectionArgs.cs +++ b/sdk/dotnet/Remote/Inputs/ConnectionArgs.cs @@ -10,6 +10,9 @@ namespace Pulumi.Command.Remote.Inputs { + /// + /// Instructions for how to connect to a remote endpoint. + /// public sealed class ConnectionArgs : Pulumi.ResourceArgs { /// diff --git a/sdk/dotnet/Remote/Outputs/Connection.cs b/sdk/dotnet/Remote/Outputs/Connection.cs index 45a0f8c7..9ed4af4a 100644 --- a/sdk/dotnet/Remote/Outputs/Connection.cs +++ b/sdk/dotnet/Remote/Outputs/Connection.cs @@ -10,6 +10,9 @@ namespace Pulumi.Command.Remote.Outputs { + /// + /// Instructions for how to connect to a remote endpoint. + /// [OutputType] public sealed class Connection { diff --git a/sdk/go/command/local/command.go b/sdk/go/command/local/command.go index 1dcc1f68..6528cc72 100644 --- a/sdk/go/command/local/command.go +++ b/sdk/go/command/local/command.go @@ -10,17 +10,32 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) +// A local command to be executed. +// This command can be inserted into the life cycles of other resources using the +// `dependsOn` or `parent` resource options. A command is considered to have +// failed when it finished with a non-zero exit code. This will fail the CRUD step +// of the `Command` resource. type Command struct { pulumi.CustomResourceState - Create pulumi.StringPtrOutput `pulumi:"create"` - Delete pulumi.StringPtrOutput `pulumi:"delete"` - Dir pulumi.StringPtrOutput `pulumi:"dir"` - Environment pulumi.StringMapOutput `pulumi:"environment"` + // The command to run on create. + Create pulumi.StringPtrOutput `pulumi:"create"` + // The command to run on delete. + Delete pulumi.StringPtrOutput `pulumi:"delete"` + // The directory from which to run the command from. If `dir` does not exist, then + // `Command` will fail. + Dir pulumi.StringPtrOutput `pulumi:"dir"` + // Additional environment variables available to the command's process. + Environment pulumi.StringMapOutput `pulumi:"environment"` + // The program and arguments to run the command. + // For example: `["/bin/sh", "-c"]` Interpreter pulumi.StringArrayOutput `pulumi:"interpreter"` - Stderr pulumi.StringOutput `pulumi:"stderr"` - Stdout pulumi.StringOutput `pulumi:"stdout"` - Update pulumi.StringPtrOutput `pulumi:"update"` + // The standard error of the command's process + Stderr pulumi.StringOutput `pulumi:"stderr"` + // The standard output of the command's process + Stdout pulumi.StringOutput `pulumi:"stdout"` + // The command to run on update. + Update pulumi.StringPtrOutput `pulumi:"update"` } // NewCommand registers a new resource with the given unique name, arguments, and options. @@ -66,11 +81,13 @@ type commandArgs struct { Create *string `pulumi:"create"` // The command to run on delete. Delete *string `pulumi:"delete"` - // The contents of an SSH key to use for the connection. This takes preference over the password if provided. + // The working directory in which to run the command from. Dir *string `pulumi:"dir"` - // Environment variables to set on commands. + // Additional environment variables available to the command's process. Environment map[string]string `pulumi:"environment"` - Interpreter []string `pulumi:"interpreter"` + // The program and arguments to run the command. + // For example: `["/bin/sh", "-c"]` + Interpreter []string `pulumi:"interpreter"` // The command to run on update. Update *string `pulumi:"update"` } @@ -81,10 +98,12 @@ type CommandArgs struct { Create pulumi.StringPtrInput // The command to run on delete. Delete pulumi.StringPtrInput - // The contents of an SSH key to use for the connection. This takes preference over the password if provided. + // The working directory in which to run the command from. Dir pulumi.StringPtrInput - // Environment variables to set on commands. + // Additional environment variables available to the command's process. Environment pulumi.StringMapInput + // The program and arguments to run the command. + // For example: `["/bin/sh", "-c"]` Interpreter pulumi.StringArrayInput // The command to run on update. Update pulumi.StringPtrInput diff --git a/sdk/go/command/remote/command.go b/sdk/go/command/remote/command.go index 981519c2..0aa06609 100644 --- a/sdk/go/command/remote/command.go +++ b/sdk/go/command/remote/command.go @@ -11,16 +11,25 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) +// A command to run on a remote host. +// The connection is established via ssh. type Command struct { pulumi.CustomResourceState - Connection ConnectionPtrOutput `pulumi:"connection"` - Create pulumi.StringPtrOutput `pulumi:"create"` - Delete pulumi.StringPtrOutput `pulumi:"delete"` + // The parameters with which to connect to the remote host + Connection ConnectionPtrOutput `pulumi:"connection"` + // The command to run on create. + Create pulumi.StringPtrOutput `pulumi:"create"` + // The command to run on delete. + Delete pulumi.StringPtrOutput `pulumi:"delete"` + // Additional environment variables available to the command's process. Environment pulumi.StringMapOutput `pulumi:"environment"` - Stderr pulumi.StringOutput `pulumi:"stderr"` - Stdout pulumi.StringOutput `pulumi:"stdout"` - Update pulumi.StringPtrOutput `pulumi:"update"` + // The standard error of the command's process + Stderr pulumi.StringOutput `pulumi:"stderr"` + // The standard output of the command's process + Stdout pulumi.StringOutput `pulumi:"stdout"` + // The command to run on update. + Update pulumi.StringPtrOutput `pulumi:"update"` } // NewCommand registers a new resource with the given unique name, arguments, and options. @@ -65,20 +74,30 @@ func (CommandState) ElementType() reflect.Type { } type commandArgs struct { - Connection Connection `pulumi:"connection"` - Create *string `pulumi:"create"` - Delete *string `pulumi:"delete"` + // The parameters with which to connect to the remote host + Connection Connection `pulumi:"connection"` + // The command to run on create. + Create *string `pulumi:"create"` + // The command to run on delete. + Delete *string `pulumi:"delete"` + // Additional environment variables available to the command's process. Environment map[string]string `pulumi:"environment"` - Update *string `pulumi:"update"` + // The command to run on update. + Update *string `pulumi:"update"` } // The set of arguments for constructing a Command resource. type CommandArgs struct { - Connection ConnectionInput - Create pulumi.StringPtrInput - Delete pulumi.StringPtrInput + // The parameters with which to connect to the remote host + Connection ConnectionInput + // The command to run on create. + Create pulumi.StringPtrInput + // The command to run on delete. + Delete pulumi.StringPtrInput + // Additional environment variables available to the command's process. Environment pulumi.StringMapInput - Update pulumi.StringPtrInput + // The command to run on update. + Update pulumi.StringPtrInput } func (CommandArgs) ElementType() reflect.Type { diff --git a/sdk/go/command/remote/pulumiTypes.go b/sdk/go/command/remote/pulumiTypes.go index 315e1328..50282fb0 100644 --- a/sdk/go/command/remote/pulumiTypes.go +++ b/sdk/go/command/remote/pulumiTypes.go @@ -10,6 +10,7 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) +// Instructions for how to connect to a remote endpoint. type Connection struct { // The address of the resource to connect to. Host string `pulumi:"host"` @@ -33,6 +34,7 @@ type ConnectionInput interface { ToConnectionOutputWithContext(context.Context) ConnectionOutput } +// Instructions for how to connect to a remote endpoint. type ConnectionArgs struct { // The address of the resource to connect to. Host pulumi.StringInput `pulumi:"host"` @@ -98,6 +100,7 @@ func (i *connectionPtrType) ToConnectionPtrOutputWithContext(ctx context.Context return pulumi.ToOutputWithContext(ctx, i).(ConnectionPtrOutput) } +// Instructions for how to connect to a remote endpoint. type ConnectionOutput struct{ *pulumi.OutputState } func (ConnectionOutput) ElementType() reflect.Type { diff --git a/sdk/nodejs/local/command.ts b/sdk/nodejs/local/command.ts index 87f4ec95..a4e18499 100644 --- a/sdk/nodejs/local/command.ts +++ b/sdk/nodejs/local/command.ts @@ -4,6 +4,13 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../utilities"; +/** + * A local command to be executed. + * This command can be inserted into the life cycles of other resources using the + * `dependsOn` or `parent` resource options. A command is considered to have + * failed when it finished with a non-zero exit code. This will fail the CRUD step + * of the `Command` resource. + */ export class Command extends pulumi.CustomResource { /** * Get an existing Command resource's state with the given name, ID, and optional extra @@ -31,13 +38,39 @@ export class Command extends pulumi.CustomResource { return obj['__pulumiType'] === Command.__pulumiType; } + /** + * The command to run on create. + */ public readonly create!: pulumi.Output; + /** + * The command to run on delete. + */ public readonly delete!: pulumi.Output; + /** + * The directory from which to run the command from. If `dir` does not exist, then + * `Command` will fail. + */ public readonly dir!: pulumi.Output; + /** + * Additional environment variables available to the command's process. + */ public readonly environment!: pulumi.Output<{[key: string]: string} | undefined>; + /** + * The program and arguments to run the command. + * For example: `["/bin/sh", "-c"]` + */ public readonly interpreter!: pulumi.Output; + /** + * The standard error of the command's process + */ public /*out*/ readonly stderr!: pulumi.Output; + /** + * The standard output of the command's process + */ public /*out*/ readonly stdout!: pulumi.Output; + /** + * The command to run on update. + */ public readonly update!: pulumi.Output; /** @@ -89,13 +122,17 @@ export interface CommandArgs { */ delete?: pulumi.Input; /** - * The contents of an SSH key to use for the connection. This takes preference over the password if provided. + * The working directory in which to run the command from. */ dir?: pulumi.Input; /** - * Environment variables to set on commands. + * Additional environment variables available to the command's process. */ environment?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The program and arguments to run the command. + * For example: `["/bin/sh", "-c"]` + */ interpreter?: pulumi.Input[]>; /** * The command to run on update. diff --git a/sdk/nodejs/remote/command.ts b/sdk/nodejs/remote/command.ts index e63c0aea..8237369c 100644 --- a/sdk/nodejs/remote/command.ts +++ b/sdk/nodejs/remote/command.ts @@ -5,6 +5,10 @@ import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; import * as utilities from "../utilities"; +/** + * A command to run on a remote host. + * The connection is established via ssh. + */ export class Command extends pulumi.CustomResource { /** * Get an existing Command resource's state with the given name, ID, and optional extra @@ -32,12 +36,33 @@ export class Command extends pulumi.CustomResource { return obj['__pulumiType'] === Command.__pulumiType; } + /** + * The parameters with which to connect to the remote host + */ public readonly connection!: pulumi.Output; + /** + * The command to run on create. + */ public readonly create!: pulumi.Output; + /** + * The command to run on delete. + */ public readonly delete!: pulumi.Output; + /** + * Additional environment variables available to the command's process. + */ public readonly environment!: pulumi.Output<{[key: string]: string} | undefined>; + /** + * The standard error of the command's process + */ public /*out*/ readonly stderr!: pulumi.Output; + /** + * The standard output of the command's process + */ public /*out*/ readonly stdout!: pulumi.Output; + /** + * The command to run on update. + */ public readonly update!: pulumi.Output; /** @@ -81,9 +106,24 @@ export class Command extends pulumi.CustomResource { * The set of arguments for constructing a Command resource. */ export interface CommandArgs { + /** + * The parameters with which to connect to the remote host + */ connection: pulumi.Input; + /** + * The command to run on create. + */ create?: pulumi.Input; + /** + * The command to run on delete. + */ delete?: pulumi.Input; + /** + * Additional environment variables available to the command's process. + */ environment?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The command to run on update. + */ update?: pulumi.Input; } diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 77297627..4514c1cf 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -5,6 +5,9 @@ import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; export namespace remote { + /** + * Instructions for how to connect to a remote endpoint. + */ export interface ConnectionArgs { /** * The address of the resource to connect to. diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index bd56f866..33e6349b 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -5,6 +5,9 @@ import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; export namespace remote { + /** + * Instructions for how to connect to a remote endpoint. + */ export interface Connection { /** * The address of the resource to connect to. diff --git a/sdk/python/pulumi_command/local/command.py b/sdk/python/pulumi_command/local/command.py index 4031e3d5..c2f79d98 100644 --- a/sdk/python/pulumi_command/local/command.py +++ b/sdk/python/pulumi_command/local/command.py @@ -23,8 +23,10 @@ def __init__(__self__, *, The set of arguments for constructing a Command resource. :param pulumi.Input[str] create: The command to run on create. :param pulumi.Input[str] delete: The command to run on delete. - :param pulumi.Input[str] dir: The contents of an SSH key to use for the connection. This takes preference over the password if provided. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] environment: Environment variables to set on commands. + :param pulumi.Input[str] dir: The working directory in which to run the command from. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] environment: Additional environment variables available to the command's process. + :param pulumi.Input[Sequence[pulumi.Input[str]]] interpreter: The program and arguments to run the command. + For example: `["/bin/sh", "-c"]` :param pulumi.Input[str] update: The command to run on update. """ if create is not None: @@ -68,7 +70,7 @@ def delete(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def dir(self) -> Optional[pulumi.Input[str]]: """ - The contents of an SSH key to use for the connection. This takes preference over the password if provided. + The working directory in which to run the command from. """ return pulumi.get(self, "dir") @@ -80,7 +82,7 @@ def dir(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def environment(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Environment variables to set on commands. + Additional environment variables available to the command's process. """ return pulumi.get(self, "environment") @@ -91,6 +93,10 @@ def environment(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str @property @pulumi.getter def interpreter(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The program and arguments to run the command. + For example: `["/bin/sh", "-c"]` + """ return pulumi.get(self, "interpreter") @interpreter.setter @@ -123,13 +129,20 @@ def __init__(__self__, update: Optional[pulumi.Input[str]] = None, __props__=None): """ - Create a Command resource with the given unique name, props, and options. + A local command to be executed. + This command can be inserted into the life cycles of other resources using the + `dependsOn` or `parent` resource options. A command is considered to have + failed when it finished with a non-zero exit code. This will fail the CRUD step + of the `Command` resource. + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] create: The command to run on create. :param pulumi.Input[str] delete: The command to run on delete. - :param pulumi.Input[str] dir: The contents of an SSH key to use for the connection. This takes preference over the password if provided. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] environment: Environment variables to set on commands. + :param pulumi.Input[str] dir: The working directory in which to run the command from. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] environment: Additional environment variables available to the command's process. + :param pulumi.Input[Sequence[pulumi.Input[str]]] interpreter: The program and arguments to run the command. + For example: `["/bin/sh", "-c"]` :param pulumi.Input[str] update: The command to run on update. """ ... @@ -139,7 +152,12 @@ def __init__(__self__, args: Optional[CommandArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ - Create a Command resource with the given unique name, props, and options. + A local command to be executed. + This command can be inserted into the life cycles of other resources using the + `dependsOn` or `parent` resource options. A command is considered to have + failed when it finished with a non-zero exit code. This will fail the CRUD step + of the `Command` resource. + :param str resource_name: The name of the resource. :param CommandArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -216,40 +234,66 @@ def get(resource_name: str, @property @pulumi.getter def create(self) -> pulumi.Output[Optional[str]]: + """ + The command to run on create. + """ return pulumi.get(self, "create") @property @pulumi.getter def delete(self) -> pulumi.Output[Optional[str]]: + """ + The command to run on delete. + """ return pulumi.get(self, "delete") @property @pulumi.getter def dir(self) -> pulumi.Output[Optional[str]]: + """ + The directory from which to run the command from. If `dir` does not exist, then + `Command` will fail. + """ return pulumi.get(self, "dir") @property @pulumi.getter def environment(self) -> pulumi.Output[Optional[Mapping[str, str]]]: + """ + Additional environment variables available to the command's process. + """ return pulumi.get(self, "environment") @property @pulumi.getter def interpreter(self) -> pulumi.Output[Optional[Sequence[str]]]: + """ + The program and arguments to run the command. + For example: `["/bin/sh", "-c"]` + """ return pulumi.get(self, "interpreter") @property @pulumi.getter def stderr(self) -> pulumi.Output[str]: + """ + The standard error of the command's process + """ return pulumi.get(self, "stderr") @property @pulumi.getter def stdout(self) -> pulumi.Output[str]: + """ + The standard output of the command's process + """ return pulumi.get(self, "stdout") @property @pulumi.getter def update(self) -> pulumi.Output[Optional[str]]: + """ + The command to run on update. + """ return pulumi.get(self, "update") diff --git a/sdk/python/pulumi_command/remote/_inputs.py b/sdk/python/pulumi_command/remote/_inputs.py index 9e949472..11600643 100644 --- a/sdk/python/pulumi_command/remote/_inputs.py +++ b/sdk/python/pulumi_command/remote/_inputs.py @@ -21,6 +21,7 @@ def __init__(__self__, *, private_key: Optional[pulumi.Input[str]] = None, user: Optional[pulumi.Input[str]] = None): """ + Instructions for how to connect to a remote endpoint. :param pulumi.Input[str] host: The address of the resource to connect to. :param pulumi.Input[str] password: The password we should use for the connection. :param pulumi.Input[float] port: The port to connect to. Defaults to 22. diff --git a/sdk/python/pulumi_command/remote/command.py b/sdk/python/pulumi_command/remote/command.py index a993731c..8a044413 100644 --- a/sdk/python/pulumi_command/remote/command.py +++ b/sdk/python/pulumi_command/remote/command.py @@ -22,6 +22,11 @@ def __init__(__self__, *, update: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a Command resource. + :param pulumi.Input['ConnectionArgs'] connection: The parameters with which to connect to the remote host + :param pulumi.Input[str] create: The command to run on create. + :param pulumi.Input[str] delete: The command to run on delete. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] environment: Additional environment variables available to the command's process. + :param pulumi.Input[str] update: The command to run on update. """ pulumi.set(__self__, "connection", connection) if create is not None: @@ -36,6 +41,9 @@ def __init__(__self__, *, @property @pulumi.getter def connection(self) -> pulumi.Input['ConnectionArgs']: + """ + The parameters with which to connect to the remote host + """ return pulumi.get(self, "connection") @connection.setter @@ -45,6 +53,9 @@ def connection(self, value: pulumi.Input['ConnectionArgs']): @property @pulumi.getter def create(self) -> Optional[pulumi.Input[str]]: + """ + The command to run on create. + """ return pulumi.get(self, "create") @create.setter @@ -54,6 +65,9 @@ def create(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def delete(self) -> Optional[pulumi.Input[str]]: + """ + The command to run on delete. + """ return pulumi.get(self, "delete") @delete.setter @@ -63,6 +77,9 @@ def delete(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter def environment(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Additional environment variables available to the command's process. + """ return pulumi.get(self, "environment") @environment.setter @@ -72,6 +89,9 @@ def environment(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str @property @pulumi.getter def update(self) -> Optional[pulumi.Input[str]]: + """ + The command to run on update. + """ return pulumi.get(self, "update") @update.setter @@ -91,9 +111,16 @@ def __init__(__self__, update: Optional[pulumi.Input[str]] = None, __props__=None): """ - Create a Command resource with the given unique name, props, and options. + A command to run on a remote host. + The connection is established via ssh. + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[pulumi.InputType['ConnectionArgs']] connection: The parameters with which to connect to the remote host + :param pulumi.Input[str] create: The command to run on create. + :param pulumi.Input[str] delete: The command to run on delete. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] environment: Additional environment variables available to the command's process. + :param pulumi.Input[str] update: The command to run on update. """ ... @overload @@ -102,7 +129,9 @@ def __init__(__self__, args: CommandArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - Create a Command resource with the given unique name, props, and options. + A command to run on a remote host. + The connection is established via ssh. + :param str resource_name: The name of the resource. :param CommandArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -178,35 +207,56 @@ def get(resource_name: str, @property @pulumi.getter def connection(self) -> pulumi.Output[Optional['outputs.Connection']]: + """ + The parameters with which to connect to the remote host + """ return pulumi.get(self, "connection") @property @pulumi.getter def create(self) -> pulumi.Output[Optional[str]]: + """ + The command to run on create. + """ return pulumi.get(self, "create") @property @pulumi.getter def delete(self) -> pulumi.Output[Optional[str]]: + """ + The command to run on delete. + """ return pulumi.get(self, "delete") @property @pulumi.getter def environment(self) -> pulumi.Output[Optional[Mapping[str, str]]]: + """ + Additional environment variables available to the command's process. + """ return pulumi.get(self, "environment") @property @pulumi.getter def stderr(self) -> pulumi.Output[str]: + """ + The standard error of the command's process + """ return pulumi.get(self, "stderr") @property @pulumi.getter def stdout(self) -> pulumi.Output[str]: + """ + The standard output of the command's process + """ return pulumi.get(self, "stdout") @property @pulumi.getter def update(self) -> pulumi.Output[Optional[str]]: + """ + The command to run on update. + """ return pulumi.get(self, "update") diff --git a/sdk/python/pulumi_command/remote/outputs.py b/sdk/python/pulumi_command/remote/outputs.py index b82d9a32..ed4db20e 100644 --- a/sdk/python/pulumi_command/remote/outputs.py +++ b/sdk/python/pulumi_command/remote/outputs.py @@ -14,6 +14,9 @@ @pulumi.output_type class Connection(dict): + """ + Instructions for how to connect to a remote endpoint. + """ @staticmethod def __key_warning(key: str): suggest = None @@ -38,6 +41,7 @@ def __init__(__self__, *, private_key: Optional[str] = None, user: Optional[str] = None): """ + Instructions for how to connect to a remote endpoint. :param str host: The address of the resource to connect to. :param str password: The password we should use for the connection. :param float port: The port to connect to. Defaults to 22.