Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.ecs.getEcsInvocations
Explore with Pulumi AI
This data source provides the Ecs Invocations of the current Alibaba Cloud user.
NOTE: Available in v1.168.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.ecs.getEcsInvocations({
ids: ["example-id"],
});
export const ecsInvocationId1 = ids.then(ids => ids.invocations?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.ecs.get_ecs_invocations(ids=["example-id"])
pulumi.export("ecsInvocationId1", ids.invocations[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := ecs.GetEcsInvocations(ctx, &ecs.GetEcsInvocationsArgs{
Ids: []string{
"example-id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("ecsInvocationId1", ids.Invocations[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Ecs.GetEcsInvocations.Invoke(new()
{
Ids = new[]
{
"example-id",
},
});
return new Dictionary<string, object?>
{
["ecsInvocationId1"] = ids.Apply(getEcsInvocationsResult => getEcsInvocationsResult.Invocations[0]?.Id),
};
});
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.GetEcsInvocationsArgs;
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 ids = EcsFunctions.getEcsInvocations(GetEcsInvocationsArgs.builder()
.ids("example-id")
.build());
ctx.export("ecsInvocationId1", ids.applyValue(getEcsInvocationsResult -> getEcsInvocationsResult.invocations()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:ecs:getEcsInvocations
Arguments:
ids:
- example-id
outputs:
ecsInvocationId1: ${ids.invocations[0].id}
Using getEcsInvocations
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEcsInvocations(args: GetEcsInvocationsArgs, opts?: InvokeOptions): Promise<GetEcsInvocationsResult>
function getEcsInvocationsOutput(args: GetEcsInvocationsOutputArgs, opts?: InvokeOptions): Output<GetEcsInvocationsResult>
def get_ecs_invocations(command_id: Optional[str] = None,
content_encoding: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
invoke_status: Optional[str] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetEcsInvocationsResult
def get_ecs_invocations_output(command_id: Optional[pulumi.Input[str]] = None,
content_encoding: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
invoke_status: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEcsInvocationsResult]
func GetEcsInvocations(ctx *Context, args *GetEcsInvocationsArgs, opts ...InvokeOption) (*GetEcsInvocationsResult, error)
func GetEcsInvocationsOutput(ctx *Context, args *GetEcsInvocationsOutputArgs, opts ...InvokeOption) GetEcsInvocationsResultOutput
> Note: This function is named GetEcsInvocations
in the Go SDK.
public static class GetEcsInvocations
{
public static Task<GetEcsInvocationsResult> InvokeAsync(GetEcsInvocationsArgs args, InvokeOptions? opts = null)
public static Output<GetEcsInvocationsResult> Invoke(GetEcsInvocationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEcsInvocationsResult> getEcsInvocations(GetEcsInvocationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ecs/getEcsInvocations:getEcsInvocations
arguments:
# arguments dictionary
The following arguments are supported:
- Command
Id string - The execution ID of the command.
- Content
Encoding string - The encoding mode of the CommandContent and Output response parameters. Valid values:
PlainText
,Base64
. - Ids List<string>
- A list of Invocation IDs.
- Invoke
Status string - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values:
Running
,Finished
,Failed
,PartialFailed
,Stopped
. - Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int
- Command
Id string - The execution ID of the command.
- Content
Encoding string - The encoding mode of the CommandContent and Output response parameters. Valid values:
PlainText
,Base64
. - Ids []string
- A list of Invocation IDs.
- Invoke
Status string - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values:
Running
,Finished
,Failed
,PartialFailed
,Stopped
. - Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int
- command
Id String - The execution ID of the command.
- content
Encoding String - The encoding mode of the CommandContent and Output response parameters. Valid values:
PlainText
,Base64
. - ids List<String>
- A list of Invocation IDs.
- invoke
Status String - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values:
Running
,Finished
,Failed
,PartialFailed
,Stopped
. - output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size Integer
- command
Id string - The execution ID of the command.
- content
Encoding string - The encoding mode of the CommandContent and Output response parameters. Valid values:
PlainText
,Base64
. - ids string[]
- A list of Invocation IDs.
- invoke
Status string - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values:
Running
,Finished
,Failed
,PartialFailed
,Stopped
. - output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size number
- command_
id str - The execution ID of the command.
- content_
encoding str - The encoding mode of the CommandContent and Output response parameters. Valid values:
PlainText
,Base64
. - ids Sequence[str]
- A list of Invocation IDs.
- invoke_
status str - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values:
Running
,Finished
,Failed
,PartialFailed
,Stopped
. - output_
file str - File name where to save data source results (after running
pulumi preview
). - page_
number int - page_
size int
- command
Id String - The execution ID of the command.
- content
Encoding String - The encoding mode of the CommandContent and Output response parameters. Valid values:
PlainText
,Base64
. - ids List<String>
- A list of Invocation IDs.
- invoke
Status String - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances. Valid values:
Running
,Finished
,Failed
,PartialFailed
,Stopped
. - output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number
getEcsInvocations Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Invocations
List<Pulumi.
Ali Cloud. Ecs. Outputs. Get Ecs Invocations Invocation> - Command
Id string - Content
Encoding string - Invoke
Status string - Output
File string - Page
Number int - Page
Size int
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Invocations
[]Get
Ecs Invocations Invocation - Command
Id string - Content
Encoding string - Invoke
Status string - Output
File string - Page
Number int - Page
Size int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- invocations
List<Get
Ecs Invocations Invocation> - command
Id String - content
Encoding String - invoke
Status String - output
File String - page
Number Integer - page
Size Integer
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- invocations
Get
Ecs Invocations Invocation[] - command
Id string - content
Encoding string - invoke
Status string - output
File string - page
Number number - page
Size number
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- invocations
Sequence[Get
Ecs Invocations Invocation] - command_
id str - content_
encoding str - invoke_
status str - output_
file str - page_
number int - page_
size int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- invocations List<Property Map>
- command
Id String - content
Encoding String - invoke
Status String - output
File String - page
Number Number - page
Size Number
Supporting Types
GetEcsInvocationsInvocation
- Command
Content string - The Base64-encoded command content.
- Command
Id string - The ID of the command.
- Command
Name string - The name of the command.
- Command
Type string - The type of the command.
- Create
Time string - The creation time of the resource.
- Frequency string
- The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
- Id string
- The ID of the Invocation.
- Invocation
Id string - The ID of the Invocation.
- Invocation
Status string - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances.
- Invoke
Instances List<Pulumi.Ali Cloud. Ecs. Inputs. Get Ecs Invocations Invocation Invoke Instance> - Execute target instance set type.
- Invoke
Status string - The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the
invocation_status
response parameter for the overall execution state. - Parameters string
- The custom parameters in the command.
- Repeat
Mode string - Indicates the execution mode of the command.
- Timed bool
- Indicates whether the commands are to be automatically run.
- Username string
- The username that was used to run the command on the instance.
- Command
Content string - The Base64-encoded command content.
- Command
Id string - The ID of the command.
- Command
Name string - The name of the command.
- Command
Type string - The type of the command.
- Create
Time string - The creation time of the resource.
- Frequency string
- The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
- Id string
- The ID of the Invocation.
- Invocation
Id string - The ID of the Invocation.
- Invocation
Status string - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances.
- Invoke
Instances []GetEcs Invocations Invocation Invoke Instance - Execute target instance set type.
- Invoke
Status string - The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the
invocation_status
response parameter for the overall execution state. - Parameters string
- The custom parameters in the command.
- Repeat
Mode string - Indicates the execution mode of the command.
- Timed bool
- Indicates whether the commands are to be automatically run.
- Username string
- The username that was used to run the command on the instance.
- command
Content String - The Base64-encoded command content.
- command
Id String - The ID of the command.
- command
Name String - The name of the command.
- command
Type String - The type of the command.
- create
Time String - The creation time of the resource.
- frequency String
- The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
- id String
- The ID of the Invocation.
- invocation
Id String - The ID of the Invocation.
- invocation
Status String - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances.
- invoke
Instances List<GetEcs Invocations Invocation Invoke Instance> - Execute target instance set type.
- invoke
Status String - The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the
invocation_status
response parameter for the overall execution state. - parameters String
- The custom parameters in the command.
- repeat
Mode String - Indicates the execution mode of the command.
- timed Boolean
- Indicates whether the commands are to be automatically run.
- username String
- The username that was used to run the command on the instance.
- command
Content string - The Base64-encoded command content.
- command
Id string - The ID of the command.
- command
Name string - The name of the command.
- command
Type string - The type of the command.
- create
Time string - The creation time of the resource.
- frequency string
- The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
- id string
- The ID of the Invocation.
- invocation
Id string - The ID of the Invocation.
- invocation
Status string - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances.
- invoke
Instances GetEcs Invocations Invocation Invoke Instance[] - Execute target instance set type.
- invoke
Status string - The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the
invocation_status
response parameter for the overall execution state. - parameters string
- The custom parameters in the command.
- repeat
Mode string - Indicates the execution mode of the command.
- timed boolean
- Indicates whether the commands are to be automatically run.
- username string
- The username that was used to run the command on the instance.
- command_
content str - The Base64-encoded command content.
- command_
id str - The ID of the command.
- command_
name str - The name of the command.
- command_
type str - The type of the command.
- create_
time str - The creation time of the resource.
- frequency str
- The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
- id str
- The ID of the Invocation.
- invocation_
id str - The ID of the Invocation.
- invocation_
status str - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances.
- invoke_
instances Sequence[GetEcs Invocations Invocation Invoke Instance] - Execute target instance set type.
- invoke_
status str - The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the
invocation_status
response parameter for the overall execution state. - parameters str
- The custom parameters in the command.
- repeat_
mode str - Indicates the execution mode of the command.
- timed bool
- Indicates whether the commands are to be automatically run.
- username str
- The username that was used to run the command on the instance.
- command
Content String - The Base64-encoded command content.
- command
Id String - The ID of the command.
- command
Name String - The name of the command.
- command
Type String - The type of the command.
- create
Time String - The creation time of the resource.
- frequency String
- The schedule on which the recurring execution of the command takes place. For information about the value specifications, see Cron expression.
- id String
- The ID of the Invocation.
- invocation
Id String - The ID of the Invocation.
- invocation
Status String - The overall execution state of the command. The value of this parameter depends on the execution states on all the involved instances.
- invoke
Instances List<Property Map> - Execute target instance set type.
- invoke
Status String - The overall execution state of the command. Note: We recommend that you ignore this parameter and check the value of the
invocation_status
response parameter for the overall execution state. - parameters String
- The custom parameters in the command.
- repeat
Mode String - Indicates the execution mode of the command.
- timed Boolean
- Indicates whether the commands are to be automatically run.
- username String
- The username that was used to run the command on the instance.
GetEcsInvocationsInvocationInvokeInstance
- Creation
Time string - The start time of the execution.
- Dropped int
- The size of truncated and discarded text when the value of the Output response parameter exceeds 24 KB in size.
- Error
Code string - Error
Info string - Details about the reason why the command failed to be sent or run.
- Exit
Code int - The exit code of the execution.
- Finish
Time string - The end time of the execution.
- Instance
Id string - The ID of the instance.
- Instance
Invoke stringStatus - Invocation
Status string - The execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - Output string
- The output of the command.
- Repeats int
- The number of times that the command is run on the instance.
- Start
Time string - The time when the command started to be run on the instance.
- Stop
Time string - The time when the command stopped being run on the instance. If you call the StopInvocation operation to manually stop the execution, the value is the time when you call the operation.
- Timed bool
- Indicates whether the commands are to be automatically run.
error_code
- The code that indicates why the command failed to be sent or run.instance_invoke_status
- Note: We recommend that you ignore this parameter and check the value of theinvocation_status
response parameter for the overall execution state.
- Update
Time string - The time when the execution state was updated.
- Creation
Time string - The start time of the execution.
- Dropped int
- The size of truncated and discarded text when the value of the Output response parameter exceeds 24 KB in size.
- Error
Code string - Error
Info string - Details about the reason why the command failed to be sent or run.
- Exit
Code int - The exit code of the execution.
- Finish
Time string - The end time of the execution.
- Instance
Id string - The ID of the instance.
- Instance
Invoke stringStatus - Invocation
Status string - The execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - Output string
- The output of the command.
- Repeats int
- The number of times that the command is run on the instance.
- Start
Time string - The time when the command started to be run on the instance.
- Stop
Time string - The time when the command stopped being run on the instance. If you call the StopInvocation operation to manually stop the execution, the value is the time when you call the operation.
- Timed bool
- Indicates whether the commands are to be automatically run.
error_code
- The code that indicates why the command failed to be sent or run.instance_invoke_status
- Note: We recommend that you ignore this parameter and check the value of theinvocation_status
response parameter for the overall execution state.
- Update
Time string - The time when the execution state was updated.
- creation
Time String - The start time of the execution.
- dropped Integer
- The size of truncated and discarded text when the value of the Output response parameter exceeds 24 KB in size.
- error
Code String - error
Info String - Details about the reason why the command failed to be sent or run.
- exit
Code Integer - The exit code of the execution.
- finish
Time String - The end time of the execution.
- instance
Id String - The ID of the instance.
- instance
Invoke StringStatus - invocation
Status String - The execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - output String
- The output of the command.
- repeats Integer
- The number of times that the command is run on the instance.
- start
Time String - The time when the command started to be run on the instance.
- stop
Time String - The time when the command stopped being run on the instance. If you call the StopInvocation operation to manually stop the execution, the value is the time when you call the operation.
- timed Boolean
- Indicates whether the commands are to be automatically run.
error_code
- The code that indicates why the command failed to be sent or run.instance_invoke_status
- Note: We recommend that you ignore this parameter and check the value of theinvocation_status
response parameter for the overall execution state.
- update
Time String - The time when the execution state was updated.
- creation
Time string - The start time of the execution.
- dropped number
- The size of truncated and discarded text when the value of the Output response parameter exceeds 24 KB in size.
- error
Code string - error
Info string - Details about the reason why the command failed to be sent or run.
- exit
Code number - The exit code of the execution.
- finish
Time string - The end time of the execution.
- instance
Id string - The ID of the instance.
- instance
Invoke stringStatus - invocation
Status string - The execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - output string
- The output of the command.
- repeats number
- The number of times that the command is run on the instance.
- start
Time string - The time when the command started to be run on the instance.
- stop
Time string - The time when the command stopped being run on the instance. If you call the StopInvocation operation to manually stop the execution, the value is the time when you call the operation.
- timed boolean
- Indicates whether the commands are to be automatically run.
error_code
- The code that indicates why the command failed to be sent or run.instance_invoke_status
- Note: We recommend that you ignore this parameter and check the value of theinvocation_status
response parameter for the overall execution state.
- update
Time string - The time when the execution state was updated.
- creation_
time str - The start time of the execution.
- dropped int
- The size of truncated and discarded text when the value of the Output response parameter exceeds 24 KB in size.
- error_
code str - error_
info str - Details about the reason why the command failed to be sent or run.
- exit_
code int - The exit code of the execution.
- finish_
time str - The end time of the execution.
- instance_
id str - The ID of the instance.
- instance_
invoke_ strstatus - invocation_
status str - The execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - output str
- The output of the command.
- repeats int
- The number of times that the command is run on the instance.
- start_
time str - The time when the command started to be run on the instance.
- stop_
time str - The time when the command stopped being run on the instance. If you call the StopInvocation operation to manually stop the execution, the value is the time when you call the operation.
- timed bool
- Indicates whether the commands are to be automatically run.
error_code
- The code that indicates why the command failed to be sent or run.instance_invoke_status
- Note: We recommend that you ignore this parameter and check the value of theinvocation_status
response parameter for the overall execution state.
- update_
time str - The time when the execution state was updated.
- creation
Time String - The start time of the execution.
- dropped Number
- The size of truncated and discarded text when the value of the Output response parameter exceeds 24 KB in size.
- error
Code String - error
Info String - Details about the reason why the command failed to be sent or run.
- exit
Code Number - The exit code of the execution.
- finish
Time String - The end time of the execution.
- instance
Id String - The ID of the instance.
- instance
Invoke StringStatus - invocation
Status String - The execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - output String
- The output of the command.
- repeats Number
- The number of times that the command is run on the instance.
- start
Time String - The time when the command started to be run on the instance.
- stop
Time String - The time when the command stopped being run on the instance. If you call the StopInvocation operation to manually stop the execution, the value is the time when you call the operation.
- timed Boolean
- Indicates whether the commands are to be automatically run.
error_code
- The code that indicates why the command failed to be sent or run.instance_invoke_status
- Note: We recommend that you ignore this parameter and check the value of theinvocation_status
response parameter for the overall execution state.
- update
Time String - The time when the execution state was updated.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.