
com.pulumi.azurenative.awsconnector.outputs.AwsCloudTrailTrailPropertiesResponse Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.awsconnector.outputs;
import com.pulumi.azurenative.awsconnector.outputs.AdvancedEventSelectorResponse;
import com.pulumi.azurenative.awsconnector.outputs.EventSelectorResponse;
import com.pulumi.azurenative.awsconnector.outputs.InsightSelectorResponse;
import com.pulumi.azurenative.awsconnector.outputs.TagResponse;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class AwsCloudTrailTrailPropertiesResponse {
/**
* @return The advanced event selectors that were used to select events for the data store.
*
*/
private @Nullable List advancedEventSelectors;
/**
* @return Property arn
*
*/
private @Nullable String arn;
/**
* @return 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.
*
*/
private @Nullable String cloudWatchLogsLogGroupArn;
/**
* @return Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
*
*/
private @Nullable String cloudWatchLogsRoleArn;
/**
* @return Specifies whether log file validation is enabled. The default is false.
*
*/
private @Nullable Boolean enableLogFileValidation;
/**
* @return 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.
*
*/
private @Nullable List eventSelectors;
/**
* @return Specifies whether the trail is publishing events from global services such as IAM to the log files.
*
*/
private @Nullable Boolean includeGlobalServiceEvents;
/**
* @return Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
*
*/
private @Nullable List insightSelectors;
/**
* @return Whether the CloudTrail is currently logging AWS API calls.
*
*/
private @Nullable Boolean isLogging;
/**
* @return 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.
*
*/
private @Nullable Boolean isMultiRegionTrail;
/**
* @return 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.
*
*/
private @Nullable Boolean isOrganizationTrail;
/**
* @return 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.
*
*/
private @Nullable String kmsKeyId;
/**
* @return Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
*
*/
private @Nullable String s3BucketName;
/**
* @return 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.
*
*/
private @Nullable String s3KeyPrefix;
/**
* @return Property snsTopicArn
*
*/
private @Nullable String snsTopicArn;
/**
* @return Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
*
*/
private @Nullable String snsTopicName;
/**
* @return Property tags
*
*/
private @Nullable List tags;
/**
* @return Property trailName
*
*/
private @Nullable String trailName;
private AwsCloudTrailTrailPropertiesResponse() {}
/**
* @return The advanced event selectors that were used to select events for the data store.
*
*/
public List advancedEventSelectors() {
return this.advancedEventSelectors == null ? List.of() : this.advancedEventSelectors;
}
/**
* @return Property arn
*
*/
public Optional arn() {
return Optional.ofNullable(this.arn);
}
/**
* @return 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.
*
*/
public Optional cloudWatchLogsLogGroupArn() {
return Optional.ofNullable(this.cloudWatchLogsLogGroupArn);
}
/**
* @return Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
*
*/
public Optional cloudWatchLogsRoleArn() {
return Optional.ofNullable(this.cloudWatchLogsRoleArn);
}
/**
* @return Specifies whether log file validation is enabled. The default is false.
*
*/
public Optional enableLogFileValidation() {
return Optional.ofNullable(this.enableLogFileValidation);
}
/**
* @return 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.
*
*/
public List eventSelectors() {
return this.eventSelectors == null ? List.of() : this.eventSelectors;
}
/**
* @return Specifies whether the trail is publishing events from global services such as IAM to the log files.
*
*/
public Optional includeGlobalServiceEvents() {
return Optional.ofNullable(this.includeGlobalServiceEvents);
}
/**
* @return Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
*
*/
public List insightSelectors() {
return this.insightSelectors == null ? List.of() : this.insightSelectors;
}
/**
* @return Whether the CloudTrail is currently logging AWS API calls.
*
*/
public Optional isLogging() {
return Optional.ofNullable(this.isLogging);
}
/**
* @return 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.
*
*/
public Optional isMultiRegionTrail() {
return Optional.ofNullable(this.isMultiRegionTrail);
}
/**
* @return 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.
*
*/
public Optional isOrganizationTrail() {
return Optional.ofNullable(this.isOrganizationTrail);
}
/**
* @return 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.
*
*/
public Optional kmsKeyId() {
return Optional.ofNullable(this.kmsKeyId);
}
/**
* @return Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
*
*/
public Optional s3BucketName() {
return Optional.ofNullable(this.s3BucketName);
}
/**
* @return 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.
*
*/
public Optional s3KeyPrefix() {
return Optional.ofNullable(this.s3KeyPrefix);
}
/**
* @return Property snsTopicArn
*
*/
public Optional snsTopicArn() {
return Optional.ofNullable(this.snsTopicArn);
}
/**
* @return Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
*
*/
public Optional snsTopicName() {
return Optional.ofNullable(this.snsTopicName);
}
/**
* @return Property tags
*
*/
public List tags() {
return this.tags == null ? List.of() : this.tags;
}
/**
* @return Property trailName
*
*/
public Optional trailName() {
return Optional.ofNullable(this.trailName);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AwsCloudTrailTrailPropertiesResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List advancedEventSelectors;
private @Nullable String arn;
private @Nullable String cloudWatchLogsLogGroupArn;
private @Nullable String cloudWatchLogsRoleArn;
private @Nullable Boolean enableLogFileValidation;
private @Nullable List eventSelectors;
private @Nullable Boolean includeGlobalServiceEvents;
private @Nullable List insightSelectors;
private @Nullable Boolean isLogging;
private @Nullable Boolean isMultiRegionTrail;
private @Nullable Boolean isOrganizationTrail;
private @Nullable String kmsKeyId;
private @Nullable String s3BucketName;
private @Nullable String s3KeyPrefix;
private @Nullable String snsTopicArn;
private @Nullable String snsTopicName;
private @Nullable List tags;
private @Nullable String trailName;
public Builder() {}
public Builder(AwsCloudTrailTrailPropertiesResponse defaults) {
Objects.requireNonNull(defaults);
this.advancedEventSelectors = defaults.advancedEventSelectors;
this.arn = defaults.arn;
this.cloudWatchLogsLogGroupArn = defaults.cloudWatchLogsLogGroupArn;
this.cloudWatchLogsRoleArn = defaults.cloudWatchLogsRoleArn;
this.enableLogFileValidation = defaults.enableLogFileValidation;
this.eventSelectors = defaults.eventSelectors;
this.includeGlobalServiceEvents = defaults.includeGlobalServiceEvents;
this.insightSelectors = defaults.insightSelectors;
this.isLogging = defaults.isLogging;
this.isMultiRegionTrail = defaults.isMultiRegionTrail;
this.isOrganizationTrail = defaults.isOrganizationTrail;
this.kmsKeyId = defaults.kmsKeyId;
this.s3BucketName = defaults.s3BucketName;
this.s3KeyPrefix = defaults.s3KeyPrefix;
this.snsTopicArn = defaults.snsTopicArn;
this.snsTopicName = defaults.snsTopicName;
this.tags = defaults.tags;
this.trailName = defaults.trailName;
}
@CustomType.Setter
public Builder advancedEventSelectors(@Nullable List advancedEventSelectors) {
this.advancedEventSelectors = advancedEventSelectors;
return this;
}
public Builder advancedEventSelectors(AdvancedEventSelectorResponse... advancedEventSelectors) {
return advancedEventSelectors(List.of(advancedEventSelectors));
}
@CustomType.Setter
public Builder arn(@Nullable String arn) {
this.arn = arn;
return this;
}
@CustomType.Setter
public Builder cloudWatchLogsLogGroupArn(@Nullable String cloudWatchLogsLogGroupArn) {
this.cloudWatchLogsLogGroupArn = cloudWatchLogsLogGroupArn;
return this;
}
@CustomType.Setter
public Builder cloudWatchLogsRoleArn(@Nullable String cloudWatchLogsRoleArn) {
this.cloudWatchLogsRoleArn = cloudWatchLogsRoleArn;
return this;
}
@CustomType.Setter
public Builder enableLogFileValidation(@Nullable Boolean enableLogFileValidation) {
this.enableLogFileValidation = enableLogFileValidation;
return this;
}
@CustomType.Setter
public Builder eventSelectors(@Nullable List eventSelectors) {
this.eventSelectors = eventSelectors;
return this;
}
public Builder eventSelectors(EventSelectorResponse... eventSelectors) {
return eventSelectors(List.of(eventSelectors));
}
@CustomType.Setter
public Builder includeGlobalServiceEvents(@Nullable Boolean includeGlobalServiceEvents) {
this.includeGlobalServiceEvents = includeGlobalServiceEvents;
return this;
}
@CustomType.Setter
public Builder insightSelectors(@Nullable List insightSelectors) {
this.insightSelectors = insightSelectors;
return this;
}
public Builder insightSelectors(InsightSelectorResponse... insightSelectors) {
return insightSelectors(List.of(insightSelectors));
}
@CustomType.Setter
public Builder isLogging(@Nullable Boolean isLogging) {
this.isLogging = isLogging;
return this;
}
@CustomType.Setter
public Builder isMultiRegionTrail(@Nullable Boolean isMultiRegionTrail) {
this.isMultiRegionTrail = isMultiRegionTrail;
return this;
}
@CustomType.Setter
public Builder isOrganizationTrail(@Nullable Boolean isOrganizationTrail) {
this.isOrganizationTrail = isOrganizationTrail;
return this;
}
@CustomType.Setter
public Builder kmsKeyId(@Nullable String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
return this;
}
@CustomType.Setter
public Builder s3BucketName(@Nullable String s3BucketName) {
this.s3BucketName = s3BucketName;
return this;
}
@CustomType.Setter
public Builder s3KeyPrefix(@Nullable String s3KeyPrefix) {
this.s3KeyPrefix = s3KeyPrefix;
return this;
}
@CustomType.Setter
public Builder snsTopicArn(@Nullable String snsTopicArn) {
this.snsTopicArn = snsTopicArn;
return this;
}
@CustomType.Setter
public Builder snsTopicName(@Nullable String snsTopicName) {
this.snsTopicName = snsTopicName;
return this;
}
@CustomType.Setter
public Builder tags(@Nullable List tags) {
this.tags = tags;
return this;
}
public Builder tags(TagResponse... tags) {
return tags(List.of(tags));
}
@CustomType.Setter
public Builder trailName(@Nullable String trailName) {
this.trailName = trailName;
return this;
}
public AwsCloudTrailTrailPropertiesResponse build() {
final var _resultValue = new AwsCloudTrailTrailPropertiesResponse();
_resultValue.advancedEventSelectors = advancedEventSelectors;
_resultValue.arn = arn;
_resultValue.cloudWatchLogsLogGroupArn = cloudWatchLogsLogGroupArn;
_resultValue.cloudWatchLogsRoleArn = cloudWatchLogsRoleArn;
_resultValue.enableLogFileValidation = enableLogFileValidation;
_resultValue.eventSelectors = eventSelectors;
_resultValue.includeGlobalServiceEvents = includeGlobalServiceEvents;
_resultValue.insightSelectors = insightSelectors;
_resultValue.isLogging = isLogging;
_resultValue.isMultiRegionTrail = isMultiRegionTrail;
_resultValue.isOrganizationTrail = isOrganizationTrail;
_resultValue.kmsKeyId = kmsKeyId;
_resultValue.s3BucketName = s3BucketName;
_resultValue.s3KeyPrefix = s3KeyPrefix;
_resultValue.snsTopicArn = snsTopicArn;
_resultValue.snsTopicName = snsTopicName;
_resultValue.tags = tags;
_resultValue.trailName = trailName;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy