@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
184 lines (183 loc) • 11.5 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.
*/
export declare class Trail extends pulumi.CustomResource {
/**
* Get an existing Trail resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Trail;
/**
* Returns 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.
*/
static isInstance(obj: any): obj is Trail;
/**
* The advanced event selectors that were used to select events for the data store.
*/
readonly advancedEventSelectors: pulumi.Output<outputs.cloudtrail.TrailAdvancedEventSelector[] | undefined>;
/**
* `Ref` returns the ARN of the CloudTrail trail, such as `arn:aws:cloudtrail:us-east-2:123456789012:trail/myCloudTrail` .
*/
readonly arn: pulumi.Output<string>;
/**
* Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
*/
readonly cloudWatchLogsLogGroupArn: pulumi.Output<string | undefined>;
/**
* Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
*/
readonly cloudWatchLogsRoleArn: pulumi.Output<string | undefined>;
/**
* Specifies whether log file validation is enabled. The default is false.
*/
readonly enableLogFileValidation: pulumi.Output<boolean | undefined>;
/**
* Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
*/
readonly eventSelectors: pulumi.Output<outputs.cloudtrail.TrailEventSelector[] | undefined>;
/**
* Specifies whether the trail is publishing events from global services such as IAM to the log files.
*/
readonly includeGlobalServiceEvents: pulumi.Output<boolean | undefined>;
/**
* Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
*/
readonly insightSelectors: pulumi.Output<outputs.cloudtrail.TrailInsightSelector[] | undefined>;
/**
* Whether the CloudTrail is currently logging AWS API calls.
*/
readonly isLogging: pulumi.Output<boolean>;
/**
* Specifies whether the trail applies only to the current region or to all regions. The default is false. If the trail exists only in the current region and this value is set to true, shadow trails (replications of the trail) will be created in the other regions. If the trail exists in all regions and this value is set to false, the trail will remain in the region where it was created, and its shadow trails in other regions will be deleted. As a best practice, consider using trails that log events in all regions.
*/
readonly isMultiRegionTrail: pulumi.Output<boolean | undefined>;
/**
* Specifies whether the trail is created for all accounts in an organization in AWS Organizations, or only for the current AWS account. The default is false, and cannot be true unless the call is made on behalf of an AWS account that is the master account for an organization in AWS Organizations.
*/
readonly isOrganizationTrail: pulumi.Output<boolean | undefined>;
/**
* Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by 'alias/', a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
*/
readonly kmsKeyId: pulumi.Output<string | undefined>;
/**
* Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
*/
readonly s3BucketName: pulumi.Output<string>;
/**
* Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
*/
readonly s3KeyPrefix: pulumi.Output<string | undefined>;
/**
* `Ref` returns the ARN of the Amazon SNS topic that's associated with the CloudTrail trail, such as `arn:aws:sns:us-east-2:123456789012:mySNSTopic` .
*/
readonly snsTopicArn: pulumi.Output<string>;
/**
* Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
*/
readonly snsTopicName: pulumi.Output<string | undefined>;
/**
* A custom set of tags (key-value pairs) for this trail.
*/
readonly tags: pulumi.Output<outputs.Tag[] | undefined>;
/**
* Specifies the name of the trail. The name must meet the following requirements:
*
* - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
* - Start with a letter or number, and end with a letter or number
* - Be between 3 and 128 characters
* - Have no adjacent periods, underscores or dashes. Names like `my-_namespace` and `my--namespace` are not valid.
* - Not be in IP address format (for example, 192.168.5.4)
*/
readonly trailName: pulumi.Output<string | undefined>;
/**
* Create a Trail resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: TrailArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a Trail resource.
*/
export interface TrailArgs {
/**
* The advanced event selectors that were used to select events for the data store.
*/
advancedEventSelectors?: pulumi.Input<pulumi.Input<inputs.cloudtrail.TrailAdvancedEventSelectorArgs>[]>;
/**
* Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
*/
cloudWatchLogsLogGroupArn?: pulumi.Input<string>;
/**
* Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
*/
cloudWatchLogsRoleArn?: pulumi.Input<string>;
/**
* Specifies whether log file validation is enabled. The default is false.
*/
enableLogFileValidation?: pulumi.Input<boolean>;
/**
* Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
*/
eventSelectors?: pulumi.Input<pulumi.Input<inputs.cloudtrail.TrailEventSelectorArgs>[]>;
/**
* Specifies whether the trail is publishing events from global services such as IAM to the log files.
*/
includeGlobalServiceEvents?: pulumi.Input<boolean>;
/**
* Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
*/
insightSelectors?: pulumi.Input<pulumi.Input<inputs.cloudtrail.TrailInsightSelectorArgs>[]>;
/**
* Whether the CloudTrail is currently logging AWS API calls.
*/
isLogging: pulumi.Input<boolean>;
/**
* Specifies whether the trail applies only to the current region or to all regions. The default is false. If the trail exists only in the current region and this value is set to true, shadow trails (replications of the trail) will be created in the other regions. If the trail exists in all regions and this value is set to false, the trail will remain in the region where it was created, and its shadow trails in other regions will be deleted. As a best practice, consider using trails that log events in all regions.
*/
isMultiRegionTrail?: pulumi.Input<boolean>;
/**
* Specifies whether the trail is created for all accounts in an organization in AWS Organizations, or only for the current AWS account. The default is false, and cannot be true unless the call is made on behalf of an AWS account that is the master account for an organization in AWS Organizations.
*/
isOrganizationTrail?: pulumi.Input<boolean>;
/**
* Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by 'alias/', a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
*/
kmsKeyId?: pulumi.Input<string>;
/**
* Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
*/
s3BucketName: pulumi.Input<string>;
/**
* Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
*/
s3KeyPrefix?: pulumi.Input<string>;
/**
* Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
*/
snsTopicName?: pulumi.Input<string>;
/**
* A custom set of tags (key-value pairs) for this trail.
*/
tags?: pulumi.Input<pulumi.Input<inputs.TagArgs>[]>;
/**
* Specifies the name of the trail. The name must meet the following requirements:
*
* - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
* - Start with a letter or number, and end with a letter or number
* - Be between 3 and 128 characters
* - Have no adjacent periods, underscores or dashes. Names like `my-_namespace` and `my--namespace` are not valid.
* - Not be in IP address format (for example, 192.168.5.4)
*/
trailName?: pulumi.Input<string>;
}