alicloud.actiontrail.getHistoryDeliveryJobs
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
using System.Collections.Generic;
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),
};
});
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:
- Enable
Details bool - Ids List<string>
A list of History Delivery Job IDs.
- Output
File 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.
- Enable
Details bool - Ids []string
A list of History Delivery Job IDs.
- Output
File 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.
- enable
Details Boolean - ids List<String>
A list of History Delivery Job IDs.
- output
File 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.
- enable
Details boolean - ids string[]
A list of History Delivery Job IDs.
- output
File 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.
- enable
Details Boolean - ids List<String>
A list of History Delivery Job IDs.
- output
File 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.
Ali Cloud. Action Trail. Outputs. Get History Delivery Jobs Job> - Enable
Details bool - Output
File string - Status int
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Jobs
[]Get
History Delivery Jobs Job - Enable
Details bool - Output
File string - Status int
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- jobs
List<Get
History Delivery Jobs Job> - enable
Details Boolean - output
File String - status Integer
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- jobs
Get
History Delivery Jobs Job[] - enable
Details boolean - output
File string - status number
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- jobs
Sequence[Get
History Delivery Jobs Job] - 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>
- enable
Details Boolean - output
File String - status Number
Supporting Types
GetHistoryDeliveryJobsJob
- Create
Time string The time when the task was created.
- End
Time string The time when the task ended.
- History
Delivery stringJob Id - Home
Region string The home region of the trail.
- Id string
The ID of the History Delivery Job.
- Job
Statuses List<Pulumi.Ali Cloud. Action Trail. Inputs. Get History Delivery Jobs Job Job Status> Detail status of delivery job.
- Start
Time 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.- Trail
Name string The name of the trail.
- Updated
Time string The time when the task was updated.
- Create
Time string The time when the task was created.
- End
Time string The time when the task ended.
- History
Delivery stringJob Id - Home
Region string The home region of the trail.
- Id string
The ID of the History Delivery Job.
- Job
Statuses []GetHistory Delivery Jobs Job Job Status Detail status of delivery job.
- Start
Time 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.- Trail
Name string The name of the trail.
- Updated
Time string The time when the task was updated.
- create
Time String The time when the task was created.
- end
Time String The time when the task ended.
- history
Delivery StringJob Id - home
Region String The home region of the trail.
- id String
The ID of the History Delivery Job.
- job
Statuses List<GetHistory Delivery Jobs Job Job Status> Detail status of delivery job.
- start
Time 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.- trail
Name String The name of the trail.
- updated
Time String The time when the task was updated.
- create
Time string The time when the task was created.
- end
Time string The time when the task ended.
- history
Delivery stringJob Id - home
Region string The home region of the trail.
- id string
The ID of the History Delivery Job.
- job
Statuses GetHistory Delivery Jobs Job Job Status[] Detail status of delivery job.
- start
Time 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.- trail
Name string The name of the trail.
- updated
Time 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_ strjob_ id - home_
region str The home region of the trail.
- id str
The ID of the History Delivery Job.
- job_
statuses Sequence[GetHistory Delivery Jobs Job Job Status] 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.
- create
Time String The time when the task was created.
- end
Time String The time when the task ended.
- history
Delivery StringJob Id - home
Region String The home region of the trail.
- id String
The ID of the History Delivery Job.
- job
Statuses List<Property Map> Detail status of delivery job.
- start
Time 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.- trail
Name String The name of the trail.
- updated
Time String The time when the task was updated.
GetHistoryDeliveryJobsJobJobStatus
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.