Trail

Provides a ActionTrail Trail resource. For information about alicloud actiontrail trail and how to use it, see What is Resource Alicloud ActionTrail Trail.

NOTE: Available in 1.95.0+ NOTE: You can create a trail to deliver events to Log Service, Object Storage Service (OSS), or both. Before you call this operation to create a trail, make sure that the following requirements are met.

  • Deliver events to Log Service: A project is created in Log Service.

  • Deliver events to OSS: A bucket is created in OSS.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.actiontrail.Trail;
import com.pulumi.alicloud.actiontrail.TrailArgs;
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) {
var default_ = new Trail("default", TrailArgs.builder()
.eventRw("All")
.ossBucketName("bucket_name")
.ossWriteRoleArn("acs:ram::1182725xxxxxxxxxxx")
.trailName("action-trail")
.trailRegion("cn-hangzhou")
.build());
}
}

Import

Action trail can be imported using the id or trail_name, e.g.

$ pulumi import alicloud:actiontrail/trail:Trail default abc12345678

Properties

Link copied to clipboard
val eventRw: Output<String>?

Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default to Write.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Specifies whether to create a multi-account trail. Valid values:true: Create a multi-account trail.false: Create a single-account trail. It is the default value.

Link copied to clipboard
val mnsTopicArn: Output<String>?

Field mns_topic_arn has been deprecated from version 1.118.0.

Link copied to clipboard
val name: Output<String>

Field name has been deprecated from version 1.95.0. Use trail_name instead.

Link copied to clipboard
val ossBucketName: Output<String>?

The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.

Link copied to clipboard
val ossKeyPrefix: Output<String>?

The prefix of the specified OSS bucket name. This parameter can be left empty.

Link copied to clipboard
val ossWriteRoleArn: Output<String>?

The unique ARN of the Oss role.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleName: Output<String>

Field name has been deprecated from version 1.118.0.

Link copied to clipboard
val slsProjectArn: Output<String>?

The unique ARN of the Log Service project. Ensure that sls_project_arn is valid .

Link copied to clipboard
val slsWriteRoleArn: Output<String>

The unique ARN of the Log Service role.

Link copied to clipboard
val status: Output<String>?

The status of ActionTrail Trail. After creation, tracking is turned on by default, and you can set the status value to Disable to turn off tracking. Valid values: Enable, Disable. Default to Enable.

Link copied to clipboard
val trailName: Output<String>

The name of the trail to be created, which must be unique for an account.

Link copied to clipboard
val trailRegion: Output<String>

The regions to which the trail is applied. Default to All.

Link copied to clipboard
val urn: Output<String>