Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Command

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

using Pulumi;
using F5BigIP = Pulumi.F5BigIP;

class MyStack : Stack
{
    public MyStack()
    {
        //create ltm node
        var test_command = new F5BigIP.Command("test-command", new F5BigIP.CommandArgs
        {
            Commands = 
            {
                "delete ltm node 10.10.10.70",
            },
            When = "destroy",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-f5bigip/sdk/v2/go/f5bigip"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, 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
    })
}
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")
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",
});

Create a Command Resource

new Command(name: string, args: CommandArgs, opts?: CustomResourceOptions);
def Command(resource_name: str, opts: Optional[ResourceOptions] = None, command_results: Optional[Sequence[str]] = None, commands: 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)
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.
opts ResourceOptions
A bag of options that control this 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.

Command Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model 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 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

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 str
The provider-assigned unique ID for this managed resource.

Look up an 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)
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.

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 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

Package Details

Repository
https://github.com/pulumi/pulumi-f5bigip
License
Apache-2.0
Notes
This Pulumi package is based on the bigip Terraform Provider.