f5bigip logo
f5 BIG-IP v3.11.0, Mar 21 23

f5bigip.Command

Explore with Pulumi AI

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 System.Collections.Generic;
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 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 {
		_, 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
	})
}
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());

    }
}
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",
});
resources:
  # create ltm node
  test-command:
    type: f5bigip:Command
    properties:
      commands:
        - delete ltm node 10.10.10.70
      when: destroy

Create Command Resource

new Command(name: string, args: CommandArgs, opts?: CustomResourceOptions);
@overload
def Command(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            command_results: Optional[Sequence[str]] = None,
            commands: Optional[Sequence[str]] = None,
            when: Optional[str] = None)
@overload
def Command(resource_name: str,
            args: CommandArgs,
            opts: Optional[ResourceOptions] = 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.

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.

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.