Alibaba Cloud v3.89.0 published on Saturday, Nov 22, 2025 by Pulumi
Alibaba Cloud v3.89.0 published on Saturday, Nov 22, 2025 by Pulumi
Deprecated: DataSource has been renamed to
getTrailsDEPRECATED: This datasource has been renamed to alicloud.actiontrail.getTrails from version 1.95.0.
This data source provides a list of action trail of the current Alibaba Cloud user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const trails = alicloud.actiontrail.getTrailsDeprecated({
nameRegex: "tf-testacc-actiontrail",
});
export const firstTrailName = trails.then(trails => trails.actiontrails?.[0]?.name);
import pulumi
import pulumi_alicloud as alicloud
trails = alicloud.actiontrail.get_trails_deprecated(name_regex="tf-testacc-actiontrail")
pulumi.export("firstTrailName", trails.actiontrails[0].name)
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 {
trails, err := actiontrail.GetTrailsDeprecated(ctx, &actiontrail.GetTrailsDeprecatedArgs{
NameRegex: pulumi.StringRef("tf-testacc-actiontrail"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstTrailName", trails.Actiontrails[0].Name)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var trails = AliCloud.ActionTrail.GetTrailsDeprecated.Invoke(new()
{
NameRegex = "tf-testacc-actiontrail",
});
return new Dictionary<string, object?>
{
["firstTrailName"] = trails.Apply(getTrailsDeprecatedResult => getTrailsDeprecatedResult.Actiontrails[0]?.Name),
};
});
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.GetTrailsDeprecatedArgs;
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 trails = ActiontrailFunctions.getTrailsDeprecated(GetTrailsDeprecatedArgs.builder()
.nameRegex("tf-testacc-actiontrail")
.build());
ctx.export("firstTrailName", trails.actiontrails()[0].name());
}
}
variables:
trails:
fn::invoke:
function: alicloud:actiontrail:getTrailsDeprecated
arguments:
nameRegex: tf-testacc-actiontrail
outputs:
firstTrailName: ${trails.actiontrails[0].name}
Using getTrailsDeprecated
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 getTrailsDeprecated(args: GetTrailsDeprecatedArgs, opts?: InvokeOptions): Promise<GetTrailsDeprecatedResult>
function getTrailsDeprecatedOutput(args: GetTrailsDeprecatedOutputArgs, opts?: InvokeOptions): Output<GetTrailsDeprecatedResult>def get_trails_deprecated(ids: Optional[Sequence[str]] = None,
include_organization_trail: Optional[bool] = None,
include_shadow_trails: Optional[bool] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTrailsDeprecatedResult
def get_trails_deprecated_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
include_organization_trail: Optional[pulumi.Input[bool]] = None,
include_shadow_trails: Optional[pulumi.Input[bool]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTrailsDeprecatedResult]func GetTrailsDeprecated(ctx *Context, args *GetTrailsDeprecatedArgs, opts ...InvokeOption) (*GetTrailsDeprecatedResult, error)
func GetTrailsDeprecatedOutput(ctx *Context, args *GetTrailsDeprecatedOutputArgs, opts ...InvokeOption) GetTrailsDeprecatedResultOutput> Note: This function is named GetTrailsDeprecated in the Go SDK.
public static class GetTrailsDeprecated
{
public static Task<GetTrailsDeprecatedResult> InvokeAsync(GetTrailsDeprecatedArgs args, InvokeOptions? opts = null)
public static Output<GetTrailsDeprecatedResult> Invoke(GetTrailsDeprecatedInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTrailsDeprecatedResult> getTrailsDeprecated(GetTrailsDeprecatedArgs args, InvokeOptions options)
public static Output<GetTrailsDeprecatedResult> getTrailsDeprecated(GetTrailsDeprecatedArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:actiontrail/getTrailsDeprecated:getTrailsDeprecated
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- Include
Organization boolTrail - Include
Shadow boolTrails - Name
Regex string - A regex string to filter results action trail name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- Ids []string
- Include
Organization boolTrail - Include
Shadow boolTrails - Name
Regex string - A regex string to filter results action trail name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- ids List<String>
- include
Organization BooleanTrail - include
Shadow BooleanTrails - name
Regex String - A regex string to filter results action trail name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- ids string[]
- include
Organization booleanTrail - include
Shadow booleanTrails - name
Regex string - A regex string to filter results action trail name.
- output
File string - File name where to save data source results (after running
pulumi preview). - status string
- ids Sequence[str]
- include_
organization_ booltrail - include_
shadow_ booltrails - name_
regex str - A regex string to filter results action trail name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - status str
- ids List<String>
- include
Organization BooleanTrail - include
Shadow BooleanTrails - name
Regex String - A regex string to filter results action trail name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
getTrailsDeprecated Result
The following output properties are available:
- Actiontrails
List<Pulumi.
Ali Cloud. Action Trail. Outputs. Get Trails Deprecated Actiontrail> - A list of actiontrails. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of trail names.
- Trails
List<Pulumi.
Ali Cloud. Action Trail. Outputs. Get Trails Deprecated Trail> - Include
Organization boolTrail - Include
Shadow boolTrails - Name
Regex string - Output
File string - Status string
- Actiontrails
[]Get
Trails Deprecated Actiontrail - A list of actiontrails. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of trail names.
- Trails
[]Get
Trails Deprecated Trail - Include
Organization boolTrail - Include
Shadow boolTrails - Name
Regex string - Output
File string - Status string
- actiontrails
List<Get
Trails Deprecated Actiontrail> - A list of actiontrails. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of trail names.
- trails
List<Get
Trails Deprecated Trail> - include
Organization BooleanTrail - include
Shadow BooleanTrails - name
Regex String - output
File String - status String
- actiontrails
Get
Trails Deprecated Actiontrail[] - A list of actiontrails. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of trail names.
- trails
Get
Trails Deprecated Trail[] - include
Organization booleanTrail - include
Shadow booleanTrails - name
Regex string - output
File string - status string
- actiontrails
Sequence[Get
Trails Deprecated Actiontrail] - A list of actiontrails. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of trail names.
- trails
Sequence[Get
Trails Deprecated Trail] - include_
organization_ booltrail - include_
shadow_ booltrails - name_
regex str - output_
file str - status str
- actiontrails List<Property Map>
- A list of actiontrails. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of trail names.
- trails List<Property Map>
- include
Organization BooleanTrail - include
Shadow BooleanTrails - name
Regex String - output
File String - status String
Supporting Types
GetTrailsDeprecatedActiontrail
- Event
Rw string - Indicates whether the event is a read or a write event.
- Id string
- Is
Organization boolTrail - Oss
Bucket stringName - The name of the specified OSS bucket.
- Oss
Key stringPrefix - The prefix of the specified OSS bucket name.
- Oss
Write stringRole Arn - Sls
Project stringArn - The unique ARN of the Log Service project.
- Sls
Write stringRole Arn - The unique ARN of the Log Service role.
- Status string
- Trail
Name string - Trail
Region string
- Event
Rw string - Indicates whether the event is a read or a write event.
- Id string
- Is
Organization boolTrail - Oss
Bucket stringName - The name of the specified OSS bucket.
- Oss
Key stringPrefix - The prefix of the specified OSS bucket name.
- Oss
Write stringRole Arn - Sls
Project stringArn - The unique ARN of the Log Service project.
- Sls
Write stringRole Arn - The unique ARN of the Log Service role.
- Status string
- Trail
Name string - Trail
Region string
- event
Rw String - Indicates whether the event is a read or a write event.
- id String
- is
Organization BooleanTrail - oss
Bucket StringName - The name of the specified OSS bucket.
- oss
Key StringPrefix - The prefix of the specified OSS bucket name.
- oss
Write StringRole Arn - sls
Project StringArn - The unique ARN of the Log Service project.
- sls
Write StringRole Arn - The unique ARN of the Log Service role.
- status String
- trail
Name String - trail
Region String
- event
Rw string - Indicates whether the event is a read or a write event.
- id string
- is
Organization booleanTrail - oss
Bucket stringName - The name of the specified OSS bucket.
- oss
Key stringPrefix - The prefix of the specified OSS bucket name.
- oss
Write stringRole Arn - sls
Project stringArn - The unique ARN of the Log Service project.
- sls
Write stringRole Arn - The unique ARN of the Log Service role.
- status string
- trail
Name string - trail
Region string
- event_
rw str - Indicates whether the event is a read or a write event.
- id str
- is_
organization_ booltrail - oss_
bucket_ strname - The name of the specified OSS bucket.
- oss_
key_ strprefix - The prefix of the specified OSS bucket name.
- oss_
write_ strrole_ arn - sls_
project_ strarn - The unique ARN of the Log Service project.
- sls_
write_ strrole_ arn - The unique ARN of the Log Service role.
- status str
- trail_
name str - trail_
region str
- event
Rw String - Indicates whether the event is a read or a write event.
- id String
- is
Organization BooleanTrail - oss
Bucket StringName - The name of the specified OSS bucket.
- oss
Key StringPrefix - The prefix of the specified OSS bucket name.
- oss
Write StringRole Arn - sls
Project StringArn - The unique ARN of the Log Service project.
- sls
Write StringRole Arn - The unique ARN of the Log Service role.
- status String
- trail
Name String - trail
Region String
GetTrailsDeprecatedTrail
- Event
Rw string - Indicates whether the event is a read or a write event.
- Id string
- Is
Organization boolTrail - Oss
Bucket stringName - The name of the specified OSS bucket.
- Oss
Key stringPrefix - The prefix of the specified OSS bucket name.
- Oss
Write stringRole Arn - Sls
Project stringArn - The unique ARN of the Log Service project.
- Sls
Write stringRole Arn - The unique ARN of the Log Service role.
- Status string
- Trail
Name string - Trail
Region string
- Event
Rw string - Indicates whether the event is a read or a write event.
- Id string
- Is
Organization boolTrail - Oss
Bucket stringName - The name of the specified OSS bucket.
- Oss
Key stringPrefix - The prefix of the specified OSS bucket name.
- Oss
Write stringRole Arn - Sls
Project stringArn - The unique ARN of the Log Service project.
- Sls
Write stringRole Arn - The unique ARN of the Log Service role.
- Status string
- Trail
Name string - Trail
Region string
- event
Rw String - Indicates whether the event is a read or a write event.
- id String
- is
Organization BooleanTrail - oss
Bucket StringName - The name of the specified OSS bucket.
- oss
Key StringPrefix - The prefix of the specified OSS bucket name.
- oss
Write StringRole Arn - sls
Project StringArn - The unique ARN of the Log Service project.
- sls
Write StringRole Arn - The unique ARN of the Log Service role.
- status String
- trail
Name String - trail
Region String
- event
Rw string - Indicates whether the event is a read or a write event.
- id string
- is
Organization booleanTrail - oss
Bucket stringName - The name of the specified OSS bucket.
- oss
Key stringPrefix - The prefix of the specified OSS bucket name.
- oss
Write stringRole Arn - sls
Project stringArn - The unique ARN of the Log Service project.
- sls
Write stringRole Arn - The unique ARN of the Log Service role.
- status string
- trail
Name string - trail
Region string
- event_
rw str - Indicates whether the event is a read or a write event.
- id str
- is_
organization_ booltrail - oss_
bucket_ strname - The name of the specified OSS bucket.
- oss_
key_ strprefix - The prefix of the specified OSS bucket name.
- oss_
write_ strrole_ arn - sls_
project_ strarn - The unique ARN of the Log Service project.
- sls_
write_ strrole_ arn - The unique ARN of the Log Service role.
- status str
- trail_
name str - trail_
region str
- event
Rw String - Indicates whether the event is a read or a write event.
- id String
- is
Organization BooleanTrail - oss
Bucket StringName - The name of the specified OSS bucket.
- oss
Key StringPrefix - The prefix of the specified OSS bucket name.
- oss
Write StringRole Arn - sls
Project StringArn - The unique ARN of the Log Service project.
- sls
Write StringRole Arn - The unique ARN of the Log Service role.
- status String
- trail
Name String - trail
Region String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.89.0 published on Saturday, Nov 22, 2025 by Pulumi
