Module actiontrail
This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-alicloudrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-alicloudrepo.
Resources
Functions
Others
- GetConsumerGroupsArgs
- GetConsumerGroupsResult
- GetInstancesArgs
- GetInstancesResult
- GetSaslAclsArgs
- GetSaslAclsResult
- GetSaslUsersArgs
- GetSaslUsersResult
- GetTopicsArgs
- GetTopicsResult
- GetTrailsArgs
- GetTrailsResult
- TrailArgs
- TrailState
Resources
Resource Trail
class Trail extends CustomResourceProvides 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.Trail("foo", {
eventRw: "Write-test",
ossBucketName: alicloud_oss_bucket_bucket.id,
ossKeyPrefix: "at-product-account-audit-B",
roleName: alicloud_ram_role_policy_attachment_attach.roleName,
});constructor
new Trail(name: string, args: TrailArgs, opts?: pulumi.CustomResourceOptions)Create a Trail resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TrailState, opts?: pulumi.CustomResourceOptions): TrailGet an existing Trail resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TrailReturns true if the given object is an instance of Trail. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property eventRw
public eventRw: pulumi.Output<string | undefined>;Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The name of the trail to be created, which must be unique for an account.
property ossBucketName
public ossBucketName: pulumi.Output<string>;The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
property ossKeyPrefix
public ossKeyPrefix: pulumi.Output<string | undefined>;The prefix of the specified OSS bucket name. This parameter can be left empty.
property roleName
public roleName: pulumi.Output<string>;The RAM role in ActionTrail permitted by the user.
property slsProjectArn
public slsProjectArn: pulumi.Output<string | undefined>;The unique ARN of the Log Service project.
property slsWriteRoleArn
public slsWriteRoleArn: pulumi.Output<string | undefined>;The unique ARN of the Log Service role.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getConsumerGroups
getConsumerGroups(args: GetConsumerGroupsArgs, opts?: pulumi.InvokeOptions): Promise<GetConsumerGroupsResult>This data source provides a list of ALIKAFKA Consumer Groups in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.56.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const consumerGroupsDs = pulumi.output(alicloud.actiontrail.getConsumerGroups({
consumerIdRegex: "CID-alikafkaGroupDatasourceName",
instanceId: "xxx",
outputFile: "consumerGroups.txt",
}, { async: true }));
export const firstGroupName = consumerGroupsDs.consumerIds[0];Function getInstances
getInstances(args?: GetInstancesArgs, opts?: pulumi.InvokeOptions): Promise<GetInstancesResult>This data source provides a list of ALIKAFKA Instances in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.59.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const instanceName = config.get("instanceName") || "alikafkaInstanceName";
const defaultZones = pulumi.output(alicloud.getZones({
availableResourceCreation: "VSwitch",
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/12",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/24",
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.alikafka.Instance("default", {
deployType: 4,
diskSize: 500,
diskType: 1,
ioMax: 20,
topicQuota: 50,
vswitchId: defaultSwitch.id,
});
const instancesDs = pulumi.output(alicloud.actiontrail.getInstances({
nameRegex: "alikafkaInstanceName",
outputFile: "instances.txt",
}, { async: true }));
export const firstInstanceName = instancesDs.instances[0].name;Function getSaslAcls
getSaslAcls(args: GetSaslAclsArgs, opts?: pulumi.InvokeOptions): Promise<GetSaslAclsResult>This data source provides a list of ALIKAFKA Sasl acls in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.66.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const saslAclsDs = pulumi.output(alicloud.actiontrail.getSaslAcls({
aclResourceName: "testTopic",
aclResourceType: "Topic",
instanceId: "xxx",
outputFile: "saslAcls.txt",
username: "username",
}, { async: true }));
export const firstSaslAclUsername = saslAclsDs.acls[0].username;Function getSaslUsers
getSaslUsers(args: GetSaslUsersArgs, opts?: pulumi.InvokeOptions): Promise<GetSaslUsersResult>This data source provides a list of ALIKAFKA Sasl users in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.66.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const saslUsersDs = pulumi.output(alicloud.actiontrail.getSaslUsers({
instanceId: "xxx",
nameRegex: "username",
outputFile: "saslUsers.txt",
}, { async: true }));
export const firstSaslUsername = saslUsersDs.users[0].username;Function getTopics
getTopics(args: GetTopicsArgs, opts?: pulumi.InvokeOptions): Promise<GetTopicsResult>This data source provides a list of ALIKAFKA Topics in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.56.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const topicsDs = pulumi.output(alicloud.actiontrail.getTopics({
instanceId: "xxx",
nameRegex: "alikafkaTopicName",
outputFile: "topics.txt",
}, { async: true }));
export const firstTopicName = topicsDs.topics[0].topic;Function getTrails
getTrails(args?: GetTrailsArgs, opts?: pulumi.InvokeOptions): Promise<GetTrailsResult>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 = pulumi.output(alicloud.actiontrail.getTrails({
nameRegex: "tf-testacc-actiontrail",
}, { async: true }));
export const firstTrailName = trails.actiontrails[0].name;Others
interface GetConsumerGroupsArgs
interface GetConsumerGroupsArgsA collection of arguments for invoking getConsumerGroups.
property consumerIdRegex
consumerIdRegex?: undefined | string;A regex string to filter results by the consumer group id.
property instanceId
instanceId: string;ID of the ALIKAFKA Instance that owns the consumer groups.
property outputFile
outputFile?: undefined | string;interface GetConsumerGroupsResult
interface GetConsumerGroupsResultA collection of values returned by getConsumerGroups.
property consumerIdRegex
consumerIdRegex?: undefined | string;property consumerIds
consumerIds: string[];A list of consumer group ids.
property id
id: string;The provider-assigned unique ID for this managed resource.
property instanceId
instanceId: string;property outputFile
outputFile?: undefined | string;interface GetInstancesArgs
interface GetInstancesArgsA collection of arguments for invoking getInstances.
property ids
ids?: string[];A list of instance IDs to filter results.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by the instance name.
property outputFile
outputFile?: undefined | string;interface GetInstancesResult
interface GetInstancesResultA collection of values returned by getInstances.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of instance IDs.
property instances
instances: GetInstancesInstance[];A list of instances. Each element contains the following attributes:
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of instance names.
property outputFile
outputFile?: undefined | string;interface GetSaslAclsArgs
interface GetSaslAclsArgsA collection of arguments for invoking getSaslAcls.
property aclResourceName
aclResourceName: string;Get results for the specified resource name.
property aclResourceType
aclResourceType: string;Get results for the specified resource type.
property instanceId
instanceId: string;ID of the ALIKAFKA Instance that owns the sasl acls.
property outputFile
outputFile?: undefined | string;property username
username: string;Get results for the specified username.
interface GetSaslAclsResult
interface GetSaslAclsResultA collection of values returned by getSaslAcls.
property aclResourceName
aclResourceName: string;The resource name of the sasl acl.
property aclResourceType
aclResourceType: string;The resource type of the sasl acl.
property acls
acls: GetSaslAclsAcl[];A list of sasl acls. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property instanceId
instanceId: string;property outputFile
outputFile?: undefined | string;property username
username: string;The username of the sasl acl.
interface GetSaslUsersArgs
interface GetSaslUsersArgsA collection of arguments for invoking getSaslUsers.
property instanceId
instanceId: string;ID of the ALIKAFKA Instance that owns the sasl users.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by the username.
property outputFile
outputFile?: undefined | string;interface GetSaslUsersResult
interface GetSaslUsersResultA collection of values returned by getSaslUsers.
property id
id: string;The provider-assigned unique ID for this managed resource.
property instanceId
instanceId: string;property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of sasl usernames.
property outputFile
outputFile?: undefined | string;property users
users: GetSaslUsersUser[];A list of sasl users. Each element contains the following attributes:
interface GetTopicsArgs
interface GetTopicsArgsA collection of arguments for invoking getTopics.
property instanceId
instanceId: string;property nameRegex
nameRegex?: undefined | string;A regex string to filter results by the topic name.
property outputFile
outputFile?: undefined | string;interface GetTopicsResult
interface GetTopicsResultA collection of values returned by getTopics.
property id
id: string;The provider-assigned unique ID for this managed resource.
property instanceId
instanceId: string;property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of topic names.
property outputFile
outputFile?: undefined | string;property topics
topics: GetTopicsTopic[];A list of topics. Each element contains the following attributes:
interface GetTrailsArgs
interface GetTrailsArgsA collection of arguments for invoking getTrails.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results action trail name.
property outputFile
outputFile?: undefined | string;interface GetTrailsResult
interface GetTrailsResultA collection of values returned by getTrails.
property actiontrails
actiontrails: GetTrailsActiontrail[];A list of actiontrails. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of trail names.
property outputFile
outputFile?: undefined | string;interface TrailArgs
interface TrailArgsThe set of arguments for constructing a Trail resource.
property eventRw
eventRw?: pulumi.Input<string>;Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
property name
name?: pulumi.Input<string>;The name of the trail to be created, which must be unique for an account.
property ossBucketName
ossBucketName: pulumi.Input<string>;The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
property ossKeyPrefix
ossKeyPrefix?: pulumi.Input<string>;The prefix of the specified OSS bucket name. This parameter can be left empty.
property roleName
roleName: pulumi.Input<string>;The RAM role in ActionTrail permitted by the user.
property slsProjectArn
slsProjectArn?: pulumi.Input<string>;The unique ARN of the Log Service project.
property slsWriteRoleArn
slsWriteRoleArn?: pulumi.Input<string>;The unique ARN of the Log Service role.
interface TrailState
interface TrailStateInput properties used for looking up and filtering Trail resources.
property eventRw
eventRw?: pulumi.Input<string>;Indicates whether the event is a read or a write event. Valid values: Read, Write, and All. Default value: Write.
property name
name?: pulumi.Input<string>;The name of the trail to be created, which must be unique for an account.
property ossBucketName
ossBucketName?: pulumi.Input<string>;The OSS bucket to which the trail delivers logs. Ensure that this is an existing OSS bucket.
property ossKeyPrefix
ossKeyPrefix?: pulumi.Input<string>;The prefix of the specified OSS bucket name. This parameter can be left empty.
property roleName
roleName?: pulumi.Input<string>;The RAM role in ActionTrail permitted by the user.
property slsProjectArn
slsProjectArn?: pulumi.Input<string>;The unique ARN of the Log Service project.
property slsWriteRoleArn
slsWriteRoleArn?: pulumi.Input<string>;The unique ARN of the Log Service role.