Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 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 execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - 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.
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.
- 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 execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - 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.
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.
- 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 execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - 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.
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.
- 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 execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - 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.
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.
- 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 execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - 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.
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.
- 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 execution state on a single instance. Valid values:
Pending
,Scheduled
,Running
,Success
,Failed
,Stopping
,Stopped
,PartialFailed
. - 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.
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.
- username String
- The username that was used to run the command on the instance.
GetEcsInvocationsInvocationInvokeInstance
- Creation
Time string - Dropped int
- Error
Code string - Error
Info string - Exit
Code int - Finish
Time string - Instance
Id string - Instance
Invoke stringStatus - Invocation
Status string - Output string
- Repeats int
- Start
Time string - Stop
Time string - Timed bool
- Update
Time string
- Creation
Time string - Dropped int
- Error
Code string - Error
Info string - Exit
Code int - Finish
Time string - Instance
Id string - Instance
Invoke stringStatus - Invocation
Status string - Output string
- Repeats int
- Start
Time string - Stop
Time string - Timed bool
- Update
Time string
- creation
Time String - dropped Integer
- error
Code String - error
Info String - exit
Code Integer - finish
Time String - instance
Id String - instance
Invoke StringStatus - invocation
Status String - output String
- repeats Integer
- start
Time String - stop
Time String - timed Boolean
- update
Time String
- creation
Time string - dropped number
- error
Code string - error
Info string - exit
Code number - finish
Time string - instance
Id string - instance
Invoke stringStatus - invocation
Status string - output string
- repeats number
- start
Time string - stop
Time string - timed boolean
- update
Time string
- creation_
time str - dropped int
- error_
code str - error_
info str - exit_
code int - finish_
time str - instance_
id str - instance_
invoke_ strstatus - invocation_
status str - output str
- repeats int
- start_
time str - stop_
time str - timed bool
- update_
time str
- creation
Time String - dropped Number
- error
Code String - error
Info String - exit
Code Number - finish
Time String - instance
Id String - instance
Invoke StringStatus - invocation
Status String - output String
- repeats Number
- start
Time String - stop
Time String - timed Boolean
- update
Time String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.