Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getHistoryDeliveryJobs

This data source provides the Actiontrail History Delivery Jobs of the current Alibaba Cloud user.

NOTE: Available in v1.139.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.ActionTrail.GetHistoryDeliveryJobs.InvokeAsync(new AliCloud.ActionTrail.GetHistoryDeliveryJobsArgs
        {
            Ids = 
            {
                "example_id",
            },
        }));
        this.ActiontrailHistoryDeliveryJobId1 = ids.Apply(ids => ids.Jobs?[0]?.Id);
        var status = Output.Create(AliCloud.ActionTrail.GetHistoryDeliveryJobs.InvokeAsync(new AliCloud.ActionTrail.GetHistoryDeliveryJobsArgs
        {
            Ids = 
            {
                "example_id",
            },
            Status = 2,
        }));
        this.ActiontrailHistoryDeliveryJobId2 = status.Apply(status => status.Jobs?[0]?.Id);
    }

    [Output("actiontrailHistoryDeliveryJobId1")]
    public Output<string> ActiontrailHistoryDeliveryJobId1 { get; set; }
    [Output("actiontrailHistoryDeliveryJobId2")]
    public Output<string> ActiontrailHistoryDeliveryJobId2 { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/actiontrail"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := actiontrail.GetHistoryDeliveryJobs(ctx, &actiontrail.GetHistoryDeliveryJobsArgs{
			Ids: []string{
				"example_id",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("actiontrailHistoryDeliveryJobId1", ids.Jobs[0].Id)
		status, err := actiontrail.GetHistoryDeliveryJobs(ctx, &actiontrail.GetHistoryDeliveryJobsArgs{
			Ids: []string{
				"example_id",
			},
			Status: pulumi.IntRef(2),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("actiontrailHistoryDeliveryJobId2", status.Jobs[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.actiontrail.ActiontrailFunctions;
import com.pulumi.alicloud.actiontrail.inputs.GetHistoryDeliveryJobsArgs;
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 = ActiontrailFunctions.getHistoryDeliveryJobs(GetHistoryDeliveryJobsArgs.builder()
            .ids("example_id")
            .build());

        ctx.export("actiontrailHistoryDeliveryJobId1", ids.applyValue(getHistoryDeliveryJobsResult -> getHistoryDeliveryJobsResult.jobs()[0].id()));
        final var status = ActiontrailFunctions.getHistoryDeliveryJobs(GetHistoryDeliveryJobsArgs.builder()
            .ids("example_id")
            .status("2")
            .build());

        ctx.export("actiontrailHistoryDeliveryJobId2", status.applyValue(getHistoryDeliveryJobsResult -> getHistoryDeliveryJobsResult.jobs()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.actiontrail.get_history_delivery_jobs(ids=["example_id"])
pulumi.export("actiontrailHistoryDeliveryJobId1", ids.jobs[0].id)
status = alicloud.actiontrail.get_history_delivery_jobs(ids=["example_id"],
    status=2)
pulumi.export("actiontrailHistoryDeliveryJobId2", status.jobs[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.actiontrail.getHistoryDeliveryJobs({
    ids: ["example_id"],
});
export const actiontrailHistoryDeliveryJobId1 = ids.then(ids => ids.jobs?[0]?.id);
const status = alicloud.actiontrail.getHistoryDeliveryJobs({
    ids: ["example_id"],
    status: 2,
});
export const actiontrailHistoryDeliveryJobId2 = status.then(status => status.jobs?[0]?.id);
variables:
  ids:
    Fn::Invoke:
      Function: alicloud:actiontrail:getHistoryDeliveryJobs
      Arguments:
        ids:
          - example_id
  status:
    Fn::Invoke:
      Function: alicloud:actiontrail:getHistoryDeliveryJobs
      Arguments:
        ids:
          - example_id
        status: 2
outputs:
  actiontrailHistoryDeliveryJobId1: ${ids.jobs[0].id}
  actiontrailHistoryDeliveryJobId2: ${status.jobs[0].id}

Using getHistoryDeliveryJobs

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 getHistoryDeliveryJobs(args: GetHistoryDeliveryJobsArgs, opts?: InvokeOptions): Promise<GetHistoryDeliveryJobsResult>
function getHistoryDeliveryJobsOutput(args: GetHistoryDeliveryJobsOutputArgs, opts?: InvokeOptions): Output<GetHistoryDeliveryJobsResult>
def get_history_delivery_jobs(enable_details: Optional[bool] = None,
                              ids: Optional[Sequence[str]] = None,
                              output_file: Optional[str] = None,
                              status: Optional[int] = None,
                              opts: Optional[InvokeOptions] = None) -> GetHistoryDeliveryJobsResult
def get_history_delivery_jobs_output(enable_details: Optional[pulumi.Input[bool]] = None,
                              ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              output_file: Optional[pulumi.Input[str]] = None,
                              status: Optional[pulumi.Input[int]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetHistoryDeliveryJobsResult]
func GetHistoryDeliveryJobs(ctx *Context, args *GetHistoryDeliveryJobsArgs, opts ...InvokeOption) (*GetHistoryDeliveryJobsResult, error)
func GetHistoryDeliveryJobsOutput(ctx *Context, args *GetHistoryDeliveryJobsOutputArgs, opts ...InvokeOption) GetHistoryDeliveryJobsResultOutput

> Note: This function is named GetHistoryDeliveryJobs in the Go SDK.

public static class GetHistoryDeliveryJobs 
{
    public static Task<GetHistoryDeliveryJobsResult> InvokeAsync(GetHistoryDeliveryJobsArgs args, InvokeOptions? opts = null)
    public static Output<GetHistoryDeliveryJobsResult> Invoke(GetHistoryDeliveryJobsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHistoryDeliveryJobsResult> getHistoryDeliveryJobs(GetHistoryDeliveryJobsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:actiontrail/getHistoryDeliveryJobs:getHistoryDeliveryJobs
  Arguments:
    # Arguments dictionary

The following arguments are supported:

EnableDetails bool
Ids List<string>

A list of History Delivery Job IDs.

OutputFile string
Status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

EnableDetails bool
Ids []string

A list of History Delivery Job IDs.

OutputFile string
Status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

enableDetails Boolean
ids List<String>

A list of History Delivery Job IDs.

outputFile String
status Integer

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

enableDetails boolean
ids string[]

A list of History Delivery Job IDs.

outputFile string
status number

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

enable_details bool
ids Sequence[str]

A list of History Delivery Job IDs.

output_file str
status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

enableDetails Boolean
ids List<String>

A list of History Delivery Job IDs.

outputFile String
status Number

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

getHistoryDeliveryJobs Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Jobs List<Pulumi.AliCloud.ActionTrail.Outputs.GetHistoryDeliveryJobsJob>
EnableDetails bool
OutputFile string
Status int
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Jobs []GetHistoryDeliveryJobsJob
EnableDetails bool
OutputFile string
Status int
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
jobs List<GetHistoryDeliveryJobsJob>
enableDetails Boolean
outputFile String
status Integer
id string

The provider-assigned unique ID for this managed resource.

ids string[]
jobs GetHistoryDeliveryJobsJob[]
enableDetails boolean
outputFile string
status number
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
jobs Sequence[GetHistoryDeliveryJobsJob]
enable_details bool
output_file str
status int
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
jobs List<Property Map>
enableDetails Boolean
outputFile String
status Number

Supporting Types

GetHistoryDeliveryJobsJob

CreateTime string

The time when the task was created.

EndTime string

The time when the task ended.

HistoryDeliveryJobId string
HomeRegion string

The home region of the trail.

Id string

The ID of the History Delivery Job.

JobStatuses List<Pulumi.AliCloud.ActionTrail.Inputs.GetHistoryDeliveryJobsJobJobStatus>

Detail status of delivery job.

StartTime string

The time when the task started.

Status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

TrailName string

The name of the trail.

UpdatedTime string

The time when the task was updated.

CreateTime string

The time when the task was created.

EndTime string

The time when the task ended.

HistoryDeliveryJobId string
HomeRegion string

The home region of the trail.

Id string

The ID of the History Delivery Job.

JobStatuses []GetHistoryDeliveryJobsJobJobStatus

Detail status of delivery job.

StartTime string

The time when the task started.

Status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

TrailName string

The name of the trail.

UpdatedTime string

The time when the task was updated.

createTime String

The time when the task was created.

endTime String

The time when the task ended.

historyDeliveryJobId String
homeRegion String

The home region of the trail.

id String

The ID of the History Delivery Job.

jobStatuses List<GetHistoryDeliveryJobsJobJobStatus>

Detail status of delivery job.

startTime String

The time when the task started.

status Integer

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

trailName String

The name of the trail.

updatedTime String

The time when the task was updated.

createTime string

The time when the task was created.

endTime string

The time when the task ended.

historyDeliveryJobId string
homeRegion string

The home region of the trail.

id string

The ID of the History Delivery Job.

jobStatuses GetHistoryDeliveryJobsJobJobStatus[]

Detail status of delivery job.

startTime string

The time when the task started.

status number

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

trailName string

The name of the trail.

updatedTime string

The time when the task was updated.

create_time str

The time when the task was created.

end_time str

The time when the task ended.

history_delivery_job_id str
home_region str

The home region of the trail.

id str

The ID of the History Delivery Job.

job_statuses Sequence[GetHistoryDeliveryJobsJobJobStatus]

Detail status of delivery job.

start_time str

The time when the task started.

status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

trail_name str

The name of the trail.

updated_time str

The time when the task was updated.

createTime String

The time when the task was created.

endTime String

The time when the task ended.

historyDeliveryJobId String
homeRegion String

The home region of the trail.

id String

The ID of the History Delivery Job.

jobStatuses List<Property Map>

Detail status of delivery job.

startTime String

The time when the task started.

status Number

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

trailName String

The name of the trail.

updatedTime String

The time when the task was updated.

GetHistoryDeliveryJobsJobJobStatus

Region string

The region of the delivery job.

Status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

Region string

The region of the delivery job.

Status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

region String

The region of the delivery job.

status Integer

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

region string

The region of the delivery job.

status number

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

region str

The region of the delivery job.

status int

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

region String

The region of the delivery job.

status Number

The status of the task. Valid values: 0, 1, 2, 3. 0: The task is initializing. 1: The task is delivering historical events. 2: The delivery of historical events is complete. 3: The task fails.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.