Class Trail
- java.lang.Object
-
- com.amazonaws.services.cloudtrail.model.Trail
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Trail extends Object implements Serializable, Cloneable
The settings for a trail.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Trail()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Trailclone()booleanequals(Object obj)StringgetCloudWatchLogsLogGroupArn()Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.StringgetCloudWatchLogsRoleArn()Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.StringgetHomeRegion()The region in which the trail was created.BooleangetIncludeGlobalServiceEvents()Set to True to include AWS API calls from AWS global services such as IAM.BooleangetIsMultiRegionTrail()Specifies whether the trail belongs only to one region or exists in all regions.StringgetKmsKeyId()Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.BooleangetLogFileValidationEnabled()Specifies whether log file validation is enabled.StringgetName()Name of the trail set by calling CreateTrail.StringgetS3BucketName()Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.StringgetS3KeyPrefix()Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery.StringgetSnsTopicARN()Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.StringgetSnsTopicName()Deprecated.StringgetTrailARN()Specifies the ARN of the trail.inthashCode()BooleanisIncludeGlobalServiceEvents()Set to True to include AWS API calls from AWS global services such as IAM.BooleanisLogFileValidationEnabled()Specifies whether log file validation is enabled.BooleanisMultiRegionTrail()Specifies whether the trail belongs only to one region or exists in all regions.voidsetCloudWatchLogsLogGroupArn(String cloudWatchLogsLogGroupArn)Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.voidsetCloudWatchLogsRoleArn(String cloudWatchLogsRoleArn)Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.voidsetHomeRegion(String homeRegion)The region in which the trail was created.voidsetIncludeGlobalServiceEvents(Boolean includeGlobalServiceEvents)Set to True to include AWS API calls from AWS global services such as IAM.voidsetIsMultiRegionTrail(Boolean isMultiRegionTrail)Specifies whether the trail belongs only to one region or exists in all regions.voidsetKmsKeyId(String kmsKeyId)Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.voidsetLogFileValidationEnabled(Boolean logFileValidationEnabled)Specifies whether log file validation is enabled.voidsetName(String name)Name of the trail set by calling CreateTrail.voidsetS3BucketName(String s3BucketName)Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.voidsetS3KeyPrefix(String s3KeyPrefix)Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery.voidsetSnsTopicARN(String snsTopicARN)Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.voidsetSnsTopicName(String snsTopicName)Deprecated.voidsetTrailARN(String trailARN)Specifies the ARN of the trail.StringtoString()Returns a string representation of this object; useful for testing and debugging.TrailwithCloudWatchLogsLogGroupArn(String cloudWatchLogsLogGroupArn)Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.TrailwithCloudWatchLogsRoleArn(String cloudWatchLogsRoleArn)Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.TrailwithHomeRegion(String homeRegion)The region in which the trail was created.TrailwithIncludeGlobalServiceEvents(Boolean includeGlobalServiceEvents)Set to True to include AWS API calls from AWS global services such as IAM.TrailwithIsMultiRegionTrail(Boolean isMultiRegionTrail)Specifies whether the trail belongs only to one region or exists in all regions.TrailwithKmsKeyId(String kmsKeyId)Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.TrailwithLogFileValidationEnabled(Boolean logFileValidationEnabled)Specifies whether log file validation is enabled.TrailwithName(String name)Name of the trail set by calling CreateTrail.TrailwithS3BucketName(String s3BucketName)Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.TrailwithS3KeyPrefix(String s3KeyPrefix)Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery.TrailwithSnsTopicARN(String snsTopicARN)Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.TrailwithSnsTopicName(String snsTopicName)Deprecated.TrailwithTrailARN(String trailARN)Specifies the ARN of the trail.
-
-
-
Method Detail
-
setName
public void setName(String name)
Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
- Parameters:
name- Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
-
getName
public String getName()
Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
- Returns:
- Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
-
withName
public Trail withName(String name)
Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
- Parameters:
name- Name of the trail set by calling CreateTrail. The maximum length is 128 characters.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setS3BucketName
public void setS3BucketName(String s3BucketName)
Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket Naming Requirements.
- Parameters:
s3BucketName- Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket Naming Requirements.
-
getS3BucketName
public String getS3BucketName()
Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket Naming Requirements.
- Returns:
- Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket Naming Requirements.
-
withS3BucketName
public Trail withS3BucketName(String s3BucketName)
Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket Naming Requirements.
- Parameters:
s3BucketName- Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket Naming Requirements.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setS3KeyPrefix
public void setS3KeyPrefix(String s3KeyPrefix)
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.
- Parameters:
s3KeyPrefix- 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.
-
getS3KeyPrefix
public String getS3KeyPrefix()
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.
- Returns:
- 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.
-
withS3KeyPrefix
public Trail withS3KeyPrefix(String s3KeyPrefix)
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.
- Parameters:
s3KeyPrefix- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSnsTopicName
@Deprecated public void setSnsTopicName(String snsTopicName)
Deprecated.Specifies the name of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.
- Parameters:
snsTopicName- Specifies the name of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.
-
getSnsTopicName
@Deprecated public String getSnsTopicName()
Deprecated.Specifies the name of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.
- Returns:
- Specifies the name of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.
-
withSnsTopicName
@Deprecated public Trail withSnsTopicName(String snsTopicName)
Deprecated.Specifies the name of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.
- Parameters:
snsTopicName- Specifies the name of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSnsTopicARN
public void setSnsTopicARN(String snsTopicARN)
Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:
arn:aws:sns:us-east-1:123456789012:MyTopic- Parameters:
snsTopicARN- Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:arn:aws:sns:us-east-1:123456789012:MyTopic
-
getSnsTopicARN
public String getSnsTopicARN()
Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:
arn:aws:sns:us-east-1:123456789012:MyTopic- Returns:
- Specifies the ARN of the Amazon SNS topic that CloudTrail uses to
send notifications when log files are delivered. The format of a
topic ARN is:
arn:aws:sns:us-east-1:123456789012:MyTopic
-
withSnsTopicARN
public Trail withSnsTopicARN(String snsTopicARN)
Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:
arn:aws:sns:us-east-1:123456789012:MyTopic- Parameters:
snsTopicARN- Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:arn:aws:sns:us-east-1:123456789012:MyTopic- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIncludeGlobalServiceEvents
public void setIncludeGlobalServiceEvents(Boolean includeGlobalServiceEvents)
Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False.
- Parameters:
includeGlobalServiceEvents- Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False.
-
getIncludeGlobalServiceEvents
public Boolean getIncludeGlobalServiceEvents()
Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False.
- Returns:
- Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False.
-
withIncludeGlobalServiceEvents
public Trail withIncludeGlobalServiceEvents(Boolean includeGlobalServiceEvents)
Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False.
- Parameters:
includeGlobalServiceEvents- Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isIncludeGlobalServiceEvents
public Boolean isIncludeGlobalServiceEvents()
Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False.
- Returns:
- Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False.
-
setIsMultiRegionTrail
public void setIsMultiRegionTrail(Boolean isMultiRegionTrail)
Specifies whether the trail belongs only to one region or exists in all regions.
- Parameters:
isMultiRegionTrail- Specifies whether the trail belongs only to one region or exists in all regions.
-
getIsMultiRegionTrail
public Boolean getIsMultiRegionTrail()
Specifies whether the trail belongs only to one region or exists in all regions.
- Returns:
- Specifies whether the trail belongs only to one region or exists in all regions.
-
withIsMultiRegionTrail
public Trail withIsMultiRegionTrail(Boolean isMultiRegionTrail)
Specifies whether the trail belongs only to one region or exists in all regions.
- Parameters:
isMultiRegionTrail- Specifies whether the trail belongs only to one region or exists in all regions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isMultiRegionTrail
public Boolean isMultiRegionTrail()
Specifies whether the trail belongs only to one region or exists in all regions.
- Returns:
- Specifies whether the trail belongs only to one region or exists in all regions.
-
setHomeRegion
public void setHomeRegion(String homeRegion)
The region in which the trail was created.
- Parameters:
homeRegion- The region in which the trail was created.
-
getHomeRegion
public String getHomeRegion()
The region in which the trail was created.
- Returns:
- The region in which the trail was created.
-
withHomeRegion
public Trail withHomeRegion(String homeRegion)
The region in which the trail was created.
- Parameters:
homeRegion- The region in which the trail was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setTrailARN
public void setTrailARN(String trailARN)
Specifies the ARN of the trail. The format of a trail ARN is:
arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail- Parameters:
trailARN- Specifies the ARN of the trail. The format of a trail ARN is:arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
-
getTrailARN
public String getTrailARN()
Specifies the ARN of the trail. The format of a trail ARN is:
arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail- Returns:
- Specifies the ARN of the trail. The format of a trail ARN is:
arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
-
withTrailARN
public Trail withTrailARN(String trailARN)
Specifies the ARN of the trail. The format of a trail ARN is:
arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail- Parameters:
trailARN- Specifies the ARN of the trail. The format of a trail ARN is:arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLogFileValidationEnabled
public void setLogFileValidationEnabled(Boolean logFileValidationEnabled)
Specifies whether log file validation is enabled.
- Parameters:
logFileValidationEnabled- Specifies whether log file validation is enabled.
-
getLogFileValidationEnabled
public Boolean getLogFileValidationEnabled()
Specifies whether log file validation is enabled.
- Returns:
- Specifies whether log file validation is enabled.
-
withLogFileValidationEnabled
public Trail withLogFileValidationEnabled(Boolean logFileValidationEnabled)
Specifies whether log file validation is enabled.
- Parameters:
logFileValidationEnabled- Specifies whether log file validation is enabled.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isLogFileValidationEnabled
public Boolean isLogFileValidationEnabled()
Specifies whether log file validation is enabled.
- Returns:
- Specifies whether log file validation is enabled.
-
setCloudWatchLogsLogGroupArn
public void setCloudWatchLogsLogGroupArn(String cloudWatchLogsLogGroupArn)
Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.
- Parameters:
cloudWatchLogsLogGroupArn- Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.
-
getCloudWatchLogsLogGroupArn
public String getCloudWatchLogsLogGroupArn()
Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.
- Returns:
- Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.
-
withCloudWatchLogsLogGroupArn
public Trail withCloudWatchLogsLogGroupArn(String cloudWatchLogsLogGroupArn)
Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.
- Parameters:
cloudWatchLogsLogGroupArn- Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCloudWatchLogsRoleArn
public void setCloudWatchLogsRoleArn(String cloudWatchLogsRoleArn)
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
- Parameters:
cloudWatchLogsRoleArn- Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
-
getCloudWatchLogsRoleArn
public String getCloudWatchLogsRoleArn()
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
- Returns:
- Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
-
withCloudWatchLogsRoleArn
public Trail withCloudWatchLogsRoleArn(String cloudWatchLogsRoleArn)
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
- Parameters:
cloudWatchLogsRoleArn- Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKmsKeyId
public void setKmsKeyId(String kmsKeyId)
Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the format:
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012- Parameters:
kmsKeyId- Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the format:arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
-
getKmsKeyId
public String getKmsKeyId()
Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the format:
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012- Returns:
- Specifies the KMS key ID that encrypts the logs delivered by
CloudTrail. The value is a fully specified ARN to a KMS key in
the format:
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
-
withKmsKeyId
public Trail withKmsKeyId(String kmsKeyId)
Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the format:
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012- Parameters:
kmsKeyId- Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the format:arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-