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:
- Name
Regex string A regex string to filter results action trail name.
- Output
File string
- Name
Regex string A regex string to filter results action trail name.
- Output
File string
- name
Regex string A regex string to filter results action trail name.
- output
File 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.
Ali Cloud. Action Trail. Outputs. Get Trails Actiontrail> 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.
- Name
Regex string - Output
File string
- Actiontrails
[]Get
Trails Actiontrail 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.
- Name
Regex string - Output
File string
- actiontrails
Get
Trails Actiontrail[] 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.
- name
Regex string - output
File string
- actiontrails
List[Get
Trails Actiontrail] 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.
- Event
Rw string Indicates whether the event is a read or a write event.
- Name string
The name of the trail.
- Oss
Bucket stringName The name of the specified OSS bucket.
- Oss
Key stringPrefix The prefix of the specified OSS bucket name.
- Role
Name string The role in ActionTrail.
- Sls
Project stringArn The unique ARN of the Log Service project.
- Sls
Write stringRole Arn The unique ARN of the Log Service role.
- Event
Rw string Indicates whether the event is a read or a write event.
- Name string
The name of the trail.
- Oss
Bucket stringName The name of the specified OSS bucket.
- Oss
Key stringPrefix The prefix of the specified OSS bucket name.
- Role
Name string The role in ActionTrail.
- Sls
Project stringArn The unique ARN of the Log Service project.
- Sls
Write stringRole Arn The unique ARN of the Log Service role.
- event
Rw string Indicates whether the event is a read or a write event.
- name string
The name of the trail.
- oss
Bucket stringName The name of the specified OSS bucket.
- oss
Key stringPrefix The prefix of the specified OSS bucket name.
- role
Name string The role in ActionTrail.
- sls
Project stringArn The unique ARN of the Log Service project.
- sls
Write stringRole Arn 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_ strname The name of the specified OSS bucket.
- oss_
key_ strprefix The prefix of the specified OSS bucket name.
- role_
name str The role in ActionTrail.
- sls_
project_ strarn The unique ARN of the Log Service project.
- sls_
write_ strrole_ arn 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
alicloudTerraform Provider.