get Commands
This data source provides the Ecs Commands of the current Alibaba Cloud user.
NOTE: Available in v1.116.0+.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetCommandsArgs;
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) {
final var example = EcsFunctions.getCommands(GetCommandsArgs.builder()
.ids("E2RY53-xxxx")
.nameRegex("tf-testAcc")
.build());
ctx.export("firstEcsCommandId", example.applyValue(getCommandsResult -> getCommandsResult.commands()[0].id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getCommands.
Parameters
argument
A collection of arguments for invoking getCommands.
suspend fun getCommands(commandProvider: String? = null, contentEncoding: String? = null, description: String? = null, ids: List<String>? = null, name: String? = null, nameRegex: String? = null, outputFile: String? = null, type: String? = null): GetCommandsResult
Return
A collection of values returned by getCommands.
See also
Parameters
command Provider
Public order provider.
content Encoding
The Base64-encoded content of the command.
description
The description of command.
ids
A list of Command IDs.
name
The name of the command
name Regex
A regex string to filter results by Command name.
output File
File name where to save data source results (after running pulumi preview
).
type
The command type.
suspend fun getCommands(argument: suspend GetCommandsPlainArgsBuilder.() -> Unit): GetCommandsResult
Return
A collection of values returned by getCommands.
See also
Parameters
argument
Builder for com.pulumi.alicloud.ecs.kotlin.inputs.GetCommandsPlainArgs.