GetTrails

This data source provides a list of action trail of the current Alibaba Cloud user.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var trails = Output.Create(AliCloud.ActionTrail.GetTrails.InvokeAsync(new AliCloud.ActionTrail.GetTrailsArgs
        {
            NameRegex = "tf-testacc-actiontrail",
        }));
        this.FirstTrailName = trails.Apply(trails => trails.Actiontrails[0].Name);
    }

    [Output("firstTrailName")]
    public Output<string> FirstTrailName { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

trails = alicloud.actiontrail.get_trails(name_regex="tf-testacc-actiontrail")
pulumi.export("firstTrailName", trails.actiontrails[0]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const trails = pulumi.output(alicloud.actiontrail.getTrails({
    nameRegex: "tf-testacc-actiontrail",
}, { async: true }));

export const firstTrailName = trails.actiontrails[0].name;

Using GetTrails

function getTrails(args: GetTrailsArgs, opts?: InvokeOptions): Promise<GetTrailsResult>
function  get_trails(name_regex=None, output_file=None, opts=None)
func GetTrails(ctx *Context, args *GetTrailsArgs, opts ...InvokeOption) (*GetTrailsResult, error)
public static class GetTrails {
    public static Task<GetTrailsResult> InvokeAsync(GetTrailsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

NameRegex string

A regex string to filter results action trail name.

OutputFile string
NameRegex string

A regex string to filter results action trail name.

OutputFile string
nameRegex string

A regex string to filter results action trail name.

outputFile string
name_regex str

A regex string to filter results action trail name.

output_file str

GetTrails Result

The following output properties are available:

Actiontrails List<Pulumi.AliCloud.ActionTrail.Outputs.GetTrailsActiontrail>

A list of actiontrails. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Names List<string>

A list of trail names.

NameRegex string
OutputFile string
Actiontrails []GetTrailsActiontrail

A list of actiontrails. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Names []string

A list of trail names.

NameRegex string
OutputFile string
actiontrails GetTrailsActiontrail[]

A list of actiontrails. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

names string[]

A list of trail names.

nameRegex string
outputFile string
actiontrails List[GetTrailsActiontrail]

A list of actiontrails. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

names List[str]

A list of trail names.

name_regex str
output_file str

Supporting Types

GetTrailsActiontrail

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

EventRw string

Indicates whether the event is a read or a write event.

Name string

The name of the trail.

OssBucketName string

The name of the specified OSS bucket.

OssKeyPrefix string

The prefix of the specified OSS bucket name.

RoleName string

The role in ActionTrail.

SlsProjectArn string

The unique ARN of the Log Service project.

SlsWriteRoleArn string

The unique ARN of the Log Service role.

EventRw string

Indicates whether the event is a read or a write event.

Name string

The name of the trail.

OssBucketName string

The name of the specified OSS bucket.

OssKeyPrefix string

The prefix of the specified OSS bucket name.

RoleName string

The role in ActionTrail.

SlsProjectArn string

The unique ARN of the Log Service project.

SlsWriteRoleArn string

The unique ARN of the Log Service role.

eventRw string

Indicates whether the event is a read or a write event.

name string

The name of the trail.

ossBucketName string

The name of the specified OSS bucket.

ossKeyPrefix string

The prefix of the specified OSS bucket name.

roleName string

The role in ActionTrail.

slsProjectArn string

The unique ARN of the Log Service project.

slsWriteRoleArn string

The unique ARN of the Log Service role.

event_rw str

Indicates whether the event is a read or a write event.

name str

The name of the trail.

oss_bucket_name str

The name of the specified OSS bucket.

oss_key_prefix str

The prefix of the specified OSS bucket name.

role_name str

The role in ActionTrail.

sls_project_arn str

The unique ARN of the Log Service project.

sls_write_role_arn str

The unique ARN of the Log Service role.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.