1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. actiontrail
  5. getHistoryDeliveryJobs
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.actiontrail.getHistoryDeliveryJobs

Explore with Pulumi AI

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

NOTE: Available in v1.139.0+.

Example Usage

Basic Usage

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);
Copy
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)
Copy
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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.ActionTrail.GetHistoryDeliveryJobs.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
    });

    var status = AliCloud.ActionTrail.GetHistoryDeliveryJobs.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        Status = 2,
    });

    return new Dictionary<string, object?>
    {
        ["actiontrailHistoryDeliveryJobId1"] = ids.Apply(getHistoryDeliveryJobsResult => getHistoryDeliveryJobsResult.Jobs[0]?.Id),
        ["actiontrailHistoryDeliveryJobId2"] = status.Apply(getHistoryDeliveryJobsResult => getHistoryDeliveryJobsResult.Jobs[0]?.Id),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetHistoryDeliveryJobs(ctx *Context, args *GetHistoryDeliveryJobsArgs, opts ...InvokeOption) (*GetHistoryDeliveryJobsResult, error)
func GetHistoryDeliveryJobsOutput(ctx *Context, args *GetHistoryDeliveryJobsOutputArgs, opts ...InvokeOption) GetHistoryDeliveryJobsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetHistoryDeliveryJobsResult> getHistoryDeliveryJobs(GetHistoryDeliveryJobsArgs args, InvokeOptions options)
public static Output<GetHistoryDeliveryJobsResult> getHistoryDeliveryJobs(GetHistoryDeliveryJobsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:actiontrail/getHistoryDeliveryJobs:getHistoryDeliveryJobs
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EnableDetails bool
Ids Changes to this property will trigger replacement. List<string>
A list of History Delivery Job IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. []string
A list of History Delivery Job IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of History Delivery Job IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string[]
A list of History Delivery Job IDs.
outputFile string
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]
A list of History Delivery Job IDs.
output_file str
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of History Delivery Job IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. 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 This property is required. string
The time when the task was created.
EndTime This property is required. string
The time when the task ended.
HistoryDeliveryJobId This property is required. string
HomeRegion This property is required. string
The home region of the trail.
Id This property is required. string
The ID of the History Delivery Job.
JobStatuses This property is required. List<Pulumi.AliCloud.ActionTrail.Inputs.GetHistoryDeliveryJobsJobJobStatus>
Detail status of delivery job.
StartTime This property is required. string
The time when the task started.
Status This property is required. 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 This property is required. string
The name of the trail.
UpdatedTime This property is required. string
The time when the task was updated.
CreateTime This property is required. string
The time when the task was created.
EndTime This property is required. string
The time when the task ended.
HistoryDeliveryJobId This property is required. string
HomeRegion This property is required. string
The home region of the trail.
Id This property is required. string
The ID of the History Delivery Job.
JobStatuses This property is required. []GetHistoryDeliveryJobsJobJobStatus
Detail status of delivery job.
StartTime This property is required. string
The time when the task started.
Status This property is required. 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 This property is required. string
The name of the trail.
UpdatedTime This property is required. string
The time when the task was updated.
createTime This property is required. String
The time when the task was created.
endTime This property is required. String
The time when the task ended.
historyDeliveryJobId This property is required. String
homeRegion This property is required. String
The home region of the trail.
id This property is required. String
The ID of the History Delivery Job.
jobStatuses This property is required. List<GetHistoryDeliveryJobsJobJobStatus>
Detail status of delivery job.
startTime This property is required. String
The time when the task started.
status This property is required. 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 This property is required. String
The name of the trail.
updatedTime This property is required. String
The time when the task was updated.
createTime This property is required. string
The time when the task was created.
endTime This property is required. string
The time when the task ended.
historyDeliveryJobId This property is required. string
homeRegion This property is required. string
The home region of the trail.
id This property is required. string
The ID of the History Delivery Job.
jobStatuses This property is required. GetHistoryDeliveryJobsJobJobStatus[]
Detail status of delivery job.
startTime This property is required. string
The time when the task started.
status This property is required. 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 This property is required. string
The name of the trail.
updatedTime This property is required. string
The time when the task was updated.
create_time This property is required. str
The time when the task was created.
end_time This property is required. str
The time when the task ended.
history_delivery_job_id This property is required. str
home_region This property is required. str
The home region of the trail.
id This property is required. str
The ID of the History Delivery Job.
job_statuses This property is required. Sequence[GetHistoryDeliveryJobsJobJobStatus]
Detail status of delivery job.
start_time This property is required. str
The time when the task started.
status This property is required. 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 This property is required. str
The name of the trail.
updated_time This property is required. str
The time when the task was updated.
createTime This property is required. String
The time when the task was created.
endTime This property is required. String
The time when the task ended.
historyDeliveryJobId This property is required. String
homeRegion This property is required. String
The home region of the trail.
id This property is required. String
The ID of the History Delivery Job.
jobStatuses This property is required. List<Property Map>
Detail status of delivery job.
startTime This property is required. String
The time when the task started.
status This property is required. 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 This property is required. String
The name of the trail.
updatedTime This property is required. String
The time when the task was updated.

GetHistoryDeliveryJobsJobJobStatus

Region This property is required. string
The region of the delivery job.
Status This property is required. 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 This property is required. string
The region of the delivery job.
Status This property is required. 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 This property is required. String
The region of the delivery job.
status This property is required. 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 This property is required. string
The region of the delivery job.
status This property is required. 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 This property is required. str
The region of the delivery job.
status This property is required. 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 This property is required. String
The region of the delivery job.
status This property is required. 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
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.