UNPKG

@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)

98 lines 5.43 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Trail = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * 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. */ 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, id, opts) { return new Trail(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Trail.__pulumiType; } /** * 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, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if ((!args || args.isLogging === undefined) && !opts.urn) { throw new Error("Missing required property 'isLogging'"); } if ((!args || args.s3BucketName === undefined) && !opts.urn) { throw new Error("Missing required property 's3BucketName'"); } resourceInputs["advancedEventSelectors"] = args ? args.advancedEventSelectors : undefined; resourceInputs["cloudWatchLogsLogGroupArn"] = args ? args.cloudWatchLogsLogGroupArn : undefined; resourceInputs["cloudWatchLogsRoleArn"] = args ? args.cloudWatchLogsRoleArn : undefined; resourceInputs["enableLogFileValidation"] = args ? args.enableLogFileValidation : undefined; resourceInputs["eventSelectors"] = args ? args.eventSelectors : undefined; resourceInputs["includeGlobalServiceEvents"] = args ? args.includeGlobalServiceEvents : undefined; resourceInputs["insightSelectors"] = args ? args.insightSelectors : undefined; resourceInputs["isLogging"] = args ? args.isLogging : undefined; resourceInputs["isMultiRegionTrail"] = args ? args.isMultiRegionTrail : undefined; resourceInputs["isOrganizationTrail"] = args ? args.isOrganizationTrail : undefined; resourceInputs["kmsKeyId"] = args ? args.kmsKeyId : undefined; resourceInputs["s3BucketName"] = args ? args.s3BucketName : undefined; resourceInputs["s3KeyPrefix"] = args ? args.s3KeyPrefix : undefined; resourceInputs["snsTopicName"] = args ? args.snsTopicName : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["trailName"] = args ? args.trailName : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["snsTopicArn"] = undefined /*out*/; } else { resourceInputs["advancedEventSelectors"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["cloudWatchLogsLogGroupArn"] = undefined /*out*/; resourceInputs["cloudWatchLogsRoleArn"] = undefined /*out*/; resourceInputs["enableLogFileValidation"] = undefined /*out*/; resourceInputs["eventSelectors"] = undefined /*out*/; resourceInputs["includeGlobalServiceEvents"] = undefined /*out*/; resourceInputs["insightSelectors"] = undefined /*out*/; resourceInputs["isLogging"] = undefined /*out*/; resourceInputs["isMultiRegionTrail"] = undefined /*out*/; resourceInputs["isOrganizationTrail"] = undefined /*out*/; resourceInputs["kmsKeyId"] = undefined /*out*/; resourceInputs["s3BucketName"] = undefined /*out*/; resourceInputs["s3KeyPrefix"] = undefined /*out*/; resourceInputs["snsTopicArn"] = undefined /*out*/; resourceInputs["snsTopicName"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["trailName"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["trailName"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(Trail.__pulumiType, name, resourceInputs, opts); } } exports.Trail = Trail; /** @internal */ Trail.__pulumiType = 'aws-native:cloudtrail:Trail'; //# sourceMappingURL=trail.js.map