1. Packages
  2. F5 BIG-IP
  3. API Docs
  4. Command
f5 BIG-IP v3.17.0 published on Thursday, Mar 28, 2024 by Pulumi

f5bigip.Command

Explore with Pulumi AI

f5bigip logo
f5 BIG-IP v3.17.0 published on Thursday, Mar 28, 2024 by Pulumi

    f5bigip.Command Run TMSH commands on F5 devices

    This resource is helpful to send TMSH command to an BIG-IP node and returns the results read from the device

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as f5bigip from "@pulumi/f5bigip";
    
    //create ltm node
    const test_command = new f5bigip.Command("test-command", {
        commands: ["delete ltm node 10.10.10.70"],
        when: "destroy",
    });
    
    import pulumi
    import pulumi_f5bigip as f5bigip
    
    #create ltm node
    test_command = f5bigip.Command("test-command",
        commands=["delete ltm node 10.10.10.70"],
        when="destroy")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-f5bigip/sdk/v3/go/f5bigip"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// create ltm node
    		_, err := f5bigip.NewCommand(ctx, "test-command", &f5bigip.CommandArgs{
    			Commands: pulumi.StringArray{
    				pulumi.String("delete ltm node 10.10.10.70"),
    			},
    			When: pulumi.String("destroy"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using F5BigIP = Pulumi.F5BigIP;
    
    return await Deployment.RunAsync(() => 
    {
        //create ltm node
        var test_command = new F5BigIP.Command("test-command", new()
        {
            Commands = new[]
            {
                "delete ltm node 10.10.10.70",
            },
            When = "destroy",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.f5bigip.Command;
    import com.pulumi.f5bigip.CommandArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test_command = new Command("test-command", CommandArgs.builder()        
                .commands("delete ltm node 10.10.10.70")
                .when("destroy")
                .build());
    
        }
    }
    
    resources:
      # create ltm node
      test-command:
        type: f5bigip:Command
        properties:
          commands:
            - delete ltm node 10.10.10.70
          when: destroy
    

    Create Command Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Command(name: string, args: CommandArgs, opts?: CustomResourceOptions);
    @overload
    def Command(resource_name: str,
                args: CommandArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Command(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                commands: Optional[Sequence[str]] = None,
                command_results: Optional[Sequence[str]] = None,
                when: Optional[str] = None)
    func NewCommand(ctx *Context, name string, args CommandArgs, opts ...ResourceOption) (*Command, error)
    public Command(string name, CommandArgs args, CustomResourceOptions? opts = null)
    public Command(String name, CommandArgs args)
    public Command(String name, CommandArgs args, CustomResourceOptions options)
    
    type: f5bigip:Command
    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 CommandArgs
    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 CommandArgs
    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 CommandArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CommandArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CommandArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var commandResource = new F5BigIP.Command("commandResource", new()
    {
        Commands = new[]
        {
            "string",
        },
        CommandResults = new[]
        {
            "string",
        },
        When = "string",
    });
    
    example, err := f5bigip.NewCommand(ctx, "commandResource", &f5bigip.CommandArgs{
    	Commands: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CommandResults: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	When: pulumi.String("string"),
    })
    
    var commandResource = new Command("commandResource", CommandArgs.builder()        
        .commands("string")
        .commandResults("string")
        .when("string")
        .build());
    
    command_resource = f5bigip.Command("commandResource",
        commands=["string"],
        command_results=["string"],
        when="string")
    
    const commandResource = new f5bigip.Command("commandResource", {
        commands: ["string"],
        commandResults: ["string"],
        when: "string",
    });
    
    type: f5bigip:Command
    properties:
        commandResults:
            - string
        commands:
            - string
        when: string
    

    Command 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 Command resource accepts the following input properties:

    Commands List<string>
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    CommandResults List<string>
    The resulting output from the commands executed
    When string
    Commands []string
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    CommandResults []string
    The resulting output from the commands executed
    When string
    commands List<String>
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    commandResults List<String>
    The resulting output from the commands executed
    when String
    commands string[]
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    commandResults string[]
    The resulting output from the commands executed
    when string
    commands Sequence[str]
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    command_results Sequence[str]
    The resulting output from the commands executed
    when str
    commands List<String>
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    commandResults List<String>
    The resulting output from the commands executed
    when String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Command 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.

    Look up Existing Command Resource

    Get an existing Command resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CommandState, opts?: CustomResourceOptions): Command
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            command_results: Optional[Sequence[str]] = None,
            commands: Optional[Sequence[str]] = None,
            when: Optional[str] = None) -> Command
    func GetCommand(ctx *Context, name string, id IDInput, state *CommandState, opts ...ResourceOption) (*Command, error)
    public static Command Get(string name, Input<string> id, CommandState? state, CustomResourceOptions? opts = null)
    public static Command get(String name, Output<String> id, CommandState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CommandResults List<string>
    The resulting output from the commands executed
    Commands List<string>
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    When string
    CommandResults []string
    The resulting output from the commands executed
    Commands []string
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    When string
    commandResults List<String>
    The resulting output from the commands executed
    commands List<String>
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    when String
    commandResults string[]
    The resulting output from the commands executed
    commands string[]
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    when string
    command_results Sequence[str]
    The resulting output from the commands executed
    commands Sequence[str]
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    when str
    commandResults List<String>
    The resulting output from the commands executed
    commands List<String>
    The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to command_result
    when String

    Package Details

    Repository
    f5 BIG-IP pulumi/pulumi-f5bigip
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the bigip Terraform Provider.
    f5bigip logo
    f5 BIG-IP v3.17.0 published on Thursday, Mar 28, 2024 by Pulumi