本文整理匯總了Golang中github.com/aws/aws-sdk-go/service/cloudtrail.UpdateTrailInput.IsMultiRegionTrail方法的典型用法代碼示例。如果您正苦於以下問題:Golang UpdateTrailInput.IsMultiRegionTrail方法的具體用法?Golang UpdateTrailInput.IsMultiRegionTrail怎麽用?Golang UpdateTrailInput.IsMultiRegionTrail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/aws/aws-sdk-go/service/cloudtrail.UpdateTrailInput
的用法示例。
在下文中一共展示了UpdateTrailInput.IsMultiRegionTrail方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: resourceAwsCloudTrailUpdate
func resourceAwsCloudTrailUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).cloudtrailconn
input := cloudtrail.UpdateTrailInput{
Name: aws.String(d.Id()),
}
if d.HasChange("s3_bucket_name") {
input.S3BucketName = aws.String(d.Get("s3_bucket_name").(string))
}
if d.HasChange("s3_key_prefix") {
input.S3KeyPrefix = aws.String(d.Get("s3_key_prefix").(string))
}
if d.HasChange("cloud_watch_logs_role_arn") {
input.CloudWatchLogsRoleArn = aws.String(d.Get("cloud_watch_logs_role_arn").(string))
}
if d.HasChange("cloud_watch_logs_group_arn") {
input.CloudWatchLogsLogGroupArn = aws.String(d.Get("cloud_watch_logs_group_arn").(string))
}
if d.HasChange("include_global_service_events") {
input.IncludeGlobalServiceEvents = aws.Bool(d.Get("include_global_service_events").(bool))
}
if d.HasChange("is_multi_region_trail") {
input.IsMultiRegionTrail = aws.Bool(d.Get("is_multi_region_trail").(bool))
}
if d.HasChange("enable_log_file_validation") {
input.EnableLogFileValidation = aws.Bool(d.Get("enable_log_file_validation").(bool))
}
if d.HasChange("kms_key_id") {
input.KmsKeyId = aws.String(d.Get("kms_key_id").(string))
}
if d.HasChange("sns_topic_name") {
input.SnsTopicName = aws.String(d.Get("sns_topic_name").(string))
}
log.Printf("[DEBUG] Updating CloudTrail: %s", input)
t, err := conn.UpdateTrail(&input)
if err != nil {
return err
}
if d.HasChange("tags") {
err := setTagsCloudtrail(conn, d)
if err != nil {
return err
}
}
if d.HasChange("enable_logging") {
log.Printf("[DEBUG] Updating logging on CloudTrail: %s", input)
err := cloudTrailSetLogging(conn, d.Get("enable_logging").(bool), *input.Name)
if err != nil {
return err
}
}
log.Printf("[DEBUG] CloudTrail updated: %s", t)
return resourceAwsCloudTrailRead(d, meta)
}