alicloud.actiontrail.TrailDeprecated
Explore with Pulumi AI
Trail
DEPRECATED: This resource has been renamed to alicloud.actiontrail.Trail from version 1.95.0.
Provides a new resource to manage Action Trail.
NOTE: Available in 1.35.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Create a new action trail.
const foo = new alicloud.actiontrail.TrailDeprecated("foo", {
name: "action-trail",
eventRw: "Write-test",
ossBucketName: bucket.id,
roleName: attach.roleName,
ossKeyPrefix: "at-product-account-audit-B",
});
import pulumi
import pulumi_alicloud as alicloud
# Create a new action trail.
foo = alicloud.actiontrail.TrailDeprecated("foo",
name="action-trail",
event_rw="Write-test",
oss_bucket_name=bucket["id"],
role_name=attach["roleName"],
oss_key_prefix="at-product-account-audit-B")
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 {
// Create a new action trail.
_, err := actiontrail.NewTrailDeprecated(ctx, "foo", &actiontrail.TrailDeprecatedArgs{
Name: pulumi.String("action-trail"),
EventRw: pulumi.String("Write-test"),
OssBucketName: pulumi.Any(bucket.Id),
RoleName: pulumi.Any(attach.RoleName),
OssKeyPrefix: pulumi.String("at-product-account-audit-B"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Create a new action trail.
var foo = new AliCloud.ActionTrail.TrailDeprecated("foo", new()
{
Name = "action-trail",
EventRw = "Write-test",
OssBucketName = bucket.Id,
RoleName = attach.RoleName,
OssKeyPrefix = "at-product-account-audit-B",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.actiontrail.TrailDeprecated;
import com.pulumi.alicloud.actiontrail.TrailDeprecatedArgs;
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) {
// Create a new action trail.
var foo = new TrailDeprecated("foo", TrailDeprecatedArgs.builder()
.name("action-trail")
.eventRw("Write-test")
.ossBucketName(bucket.id())
.roleName(attach.roleName())
.ossKeyPrefix("at-product-account-audit-B")
.build());
}
}
resources:
# Create a new action trail.
foo:
type: alicloud:actiontrail:TrailDeprecated
properties:
name: action-trail
eventRw: Write-test
ossBucketName: ${bucket.id}
roleName: ${attach.roleName}
ossKeyPrefix: at-product-account-audit-B
Create TrailDeprecated Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrailDeprecated(name: string, args?: TrailDeprecatedArgs, opts?: CustomResourceOptions);
@overload
def TrailDeprecated(resource_name: str,
args: Optional[TrailDeprecatedArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def TrailDeprecated(resource_name: str,
opts: Optional[ResourceOptions] = None,
event_rw: Optional[str] = None,
is_organization_trail: Optional[bool] = None,
mns_topic_arn: Optional[str] = None,
name: Optional[str] = None,
oss_bucket_name: Optional[str] = None,
oss_key_prefix: Optional[str] = None,
oss_write_role_arn: Optional[str] = None,
role_name: Optional[str] = None,
sls_project_arn: Optional[str] = None,
sls_write_role_arn: Optional[str] = None,
status: Optional[str] = None,
trail_name: Optional[str] = None,
trail_region: Optional[str] = None)
func NewTrailDeprecated(ctx *Context, name string, args *TrailDeprecatedArgs, opts ...ResourceOption) (*TrailDeprecated, error)
public TrailDeprecated(string name, TrailDeprecatedArgs? args = null, CustomResourceOptions? opts = null)
public TrailDeprecated(String name, TrailDeprecatedArgs args)
public TrailDeprecated(String name, TrailDeprecatedArgs args, CustomResourceOptions options)
type: alicloud:actiontrail:TrailDeprecated
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TrailDeprecatedArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TrailDeprecatedArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TrailDeprecatedArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrailDeprecatedArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrailDeprecatedArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TrailDeprecated Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The TrailDeprecated resource accepts the following input properties:
- Event
Rw string - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- Is
Organization boolTrail - Mns
Topic stringArn - Name string
- The name of the trail to be created, which must be unique for an account.
- Oss
Bucket stringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- Oss
Key stringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- Oss
Write stringRole Arn - Role
Name string - The RAM role in ActionTrail permitted by the user.
- Sls
Project stringArn - The unique ARN of the Log Service project.
- Sls
Write stringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- Status string
- Trail
Name string - Trail
Region string
- Event
Rw string - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- Is
Organization boolTrail - Mns
Topic stringArn - Name string
- The name of the trail to be created, which must be unique for an account.
- Oss
Bucket stringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- Oss
Key stringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- Oss
Write stringRole Arn - Role
Name string - The RAM role in ActionTrail permitted by the user.
- Sls
Project stringArn - The unique ARN of the Log Service project.
- Sls
Write stringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- Status string
- Trail
Name string - Trail
Region string
- event
Rw String - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- is
Organization BooleanTrail - mns
Topic StringArn - name String
- The name of the trail to be created, which must be unique for an account.
- oss
Bucket StringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- oss
Key StringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- oss
Write StringRole Arn - role
Name String - The RAM role in ActionTrail permitted by the user.
- sls
Project StringArn - The unique ARN of the Log Service project.
- sls
Write StringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- status String
- trail
Name String - trail
Region String
- event
Rw string - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- is
Organization booleanTrail - mns
Topic stringArn - name string
- The name of the trail to be created, which must be unique for an account.
- oss
Bucket stringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- oss
Key stringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- oss
Write stringRole Arn - role
Name string - The RAM role in ActionTrail permitted by the user.
- sls
Project stringArn - The unique ARN of the Log Service project.
- sls
Write stringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- status string
- trail
Name string - trail
Region string
- event_
rw str - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- is_
organization_ booltrail - mns_
topic_ strarn - name str
- The name of the trail to be created, which must be unique for an account.
- oss_
bucket_ strname - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- oss_
key_ strprefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- oss_
write_ strrole_ arn - role_
name str - The RAM role in ActionTrail permitted by the user.
- sls_
project_ strarn - The unique ARN of the Log Service project.
- sls_
write_ strrole_ arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- status str
- trail_
name str - trail_
region str
- event
Rw String - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- is
Organization BooleanTrail - mns
Topic StringArn - name String
- The name of the trail to be created, which must be unique for an account.
- oss
Bucket StringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- oss
Key StringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- oss
Write StringRole Arn - role
Name String - The RAM role in ActionTrail permitted by the user.
- sls
Project StringArn - The unique ARN of the Log Service project.
- sls
Write StringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- status String
- trail
Name String - trail
Region String
Outputs
All input properties are implicitly available as output properties. Additionally, the TrailDeprecated resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TrailDeprecated Resource
Get an existing TrailDeprecated resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TrailDeprecatedState, opts?: CustomResourceOptions): TrailDeprecated
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
event_rw: Optional[str] = None,
is_organization_trail: Optional[bool] = None,
mns_topic_arn: Optional[str] = None,
name: Optional[str] = None,
oss_bucket_name: Optional[str] = None,
oss_key_prefix: Optional[str] = None,
oss_write_role_arn: Optional[str] = None,
role_name: Optional[str] = None,
sls_project_arn: Optional[str] = None,
sls_write_role_arn: Optional[str] = None,
status: Optional[str] = None,
trail_name: Optional[str] = None,
trail_region: Optional[str] = None) -> TrailDeprecated
func GetTrailDeprecated(ctx *Context, name string, id IDInput, state *TrailDeprecatedState, opts ...ResourceOption) (*TrailDeprecated, error)
public static TrailDeprecated Get(string name, Input<string> id, TrailDeprecatedState? state, CustomResourceOptions? opts = null)
public static TrailDeprecated get(String name, Output<String> id, TrailDeprecatedState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Event
Rw string - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- Is
Organization boolTrail - Mns
Topic stringArn - Name string
- The name of the trail to be created, which must be unique for an account.
- Oss
Bucket stringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- Oss
Key stringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- Oss
Write stringRole Arn - Role
Name string - The RAM role in ActionTrail permitted by the user.
- Sls
Project stringArn - The unique ARN of the Log Service project.
- Sls
Write stringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- Status string
- Trail
Name string - Trail
Region string
- Event
Rw string - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- Is
Organization boolTrail - Mns
Topic stringArn - Name string
- The name of the trail to be created, which must be unique for an account.
- Oss
Bucket stringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- Oss
Key stringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- Oss
Write stringRole Arn - Role
Name string - The RAM role in ActionTrail permitted by the user.
- Sls
Project stringArn - The unique ARN of the Log Service project.
- Sls
Write stringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- Status string
- Trail
Name string - Trail
Region string
- event
Rw String - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- is
Organization BooleanTrail - mns
Topic StringArn - name String
- The name of the trail to be created, which must be unique for an account.
- oss
Bucket StringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- oss
Key StringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- oss
Write StringRole Arn - role
Name String - The RAM role in ActionTrail permitted by the user.
- sls
Project StringArn - The unique ARN of the Log Service project.
- sls
Write StringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- status String
- trail
Name String - trail
Region String
- event
Rw string - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- is
Organization booleanTrail - mns
Topic stringArn - name string
- The name of the trail to be created, which must be unique for an account.
- oss
Bucket stringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- oss
Key stringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- oss
Write stringRole Arn - role
Name string - The RAM role in ActionTrail permitted by the user.
- sls
Project stringArn - The unique ARN of the Log Service project.
- sls
Write stringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- status string
- trail
Name string - trail
Region string
- event_
rw str - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- is_
organization_ booltrail - mns_
topic_ strarn - name str
- The name of the trail to be created, which must be unique for an account.
- oss_
bucket_ strname - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- oss_
key_ strprefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- oss_
write_ strrole_ arn - role_
name str - The RAM role in ActionTrail permitted by the user.
- sls_
project_ strarn - The unique ARN of the Log Service project.
- sls_
write_ strrole_ arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- status str
- trail_
name str - trail_
region str
- event
Rw String - Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
- is
Organization BooleanTrail - mns
Topic StringArn - name String
- The name of the trail to be created, which must be unique for an account.
- oss
Bucket StringName - The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
- oss
Key StringPrefix - The prefix of the specified OSS bucket name. This parameter can be left empty.
- oss
Write StringRole Arn - role
Name String - The RAM role in ActionTrail permitted by the user.
- sls
Project StringArn - The unique ARN of the Log Service project.
- sls
Write StringRole Arn The unique ARN of the Log Service role.
NOTE:
sls_project_arn
andsls_write_role_arn
should be set or not set at the same time when actiontrail delivers logs.- status String
- trail
Name String - trail
Region String
Import
Action trail can be imported using the id, e.g.
$ pulumi import alicloud:actiontrail/trailDeprecated:TrailDeprecated foo abc12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.