AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CloudTrail

import "github.com/aws/aws-sdk-go/service/cloudtrail"

type CloudTrail struct { *client.Client }

CloudTrail provides the API operation methods for making requests to AWS CloudTrail. See this package's package overview docs for details on the service.

CloudTrail methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

AddTags

func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error)

AddTags API operation for AWS CloudTrail.

Adds one or more tags to a trail, up to a limit of 50. Tags must be unique per trail. Overwrites an existing tag's value when a new value is specified for an existing tag key. If you specify a key without a value, the tag will be created with the specified key and a value of null. You can tag a trail that applies to all regions only from the region in which the trail was created (that is, from its home region).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation AddTags for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" This exception is thrown when the specified resource is not found.

  • ErrCodeARNInvalidException "CloudTrailARNInvalidException" This exception is thrown when an operation is called with an invalid trail ARN. The format of a trail ARN is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  • ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" This exception is thrown when the specified resource type is not supported by CloudTrail.

  • ErrCodeTagsLimitExceededException "TagsLimitExceededException" The number of tags per trail has exceeded the permitted amount. Currently, the limit is 50.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeInvalidTagParameterException "InvalidTagParameterException" This exception is thrown when the key or value specified for the tag does not match the regular expression ^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags

AddTagsRequest

func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput)

AddTagsRequest generates a "aws/request.Request" representing the client's request for the AddTags operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See AddTags for more information on using the AddTags API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the AddTagsRequest method. req, resp := client.AddTagsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags

AddTagsWithContext

func (c *CloudTrail) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error)

AddTagsWithContext is the same as AddTags with the addition of the ability to pass a context and additional request options.

See AddTags for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateTrail

func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error)

CreateTrail API operation for AWS CloudTrail.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation CreateTrail for usage and error information.

Returned Error Codes:

  • ErrCodeMaximumNumberOfTrailsExceededException "MaximumNumberOfTrailsExceededException" This exception is thrown when the maximum number of trails is reached.

  • ErrCodeTrailAlreadyExistsException "TrailAlreadyExistsException" This exception is thrown when the specified trail already exists.

  • ErrCodeS3BucketDoesNotExistException "S3BucketDoesNotExistException" This exception is thrown when the specified S3 bucket does not exist.

  • ErrCodeInsufficientS3BucketPolicyException "InsufficientS3BucketPolicyException" This exception is thrown when the policy on the S3 bucket is not sufficient.

  • ErrCodeInsufficientSnsTopicPolicyException "InsufficientSnsTopicPolicyException" This exception is thrown when the policy on the SNS topic is not sufficient.

  • ErrCodeInsufficientEncryptionPolicyException "InsufficientEncryptionPolicyException" This exception is thrown when the policy on the S3 bucket or KMS key is not sufficient.

  • ErrCodeInvalidS3BucketNameException "InvalidS3BucketNameException" This exception is thrown when the provided S3 bucket name is not valid.

  • ErrCodeInvalidS3PrefixException "InvalidS3PrefixException" This exception is thrown when the provided S3 prefix is not valid.

  • ErrCodeInvalidSnsTopicNameException "InvalidSnsTopicNameException" This exception is thrown when the provided SNS topic name is not valid.

  • ErrCodeInvalidKmsKeyIdException "InvalidKmsKeyIdException" This exception is thrown when the KMS key ARN is invalid.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeTrailNotProvidedException "TrailNotProvidedException" This exception is deprecated.

  • ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" This exception is thrown when the combination of parameters provided is not valid.

  • ErrCodeKmsKeyNotFoundException "KmsKeyNotFoundException" This exception is thrown when the KMS key does not exist, or when the S3 bucket and the KMS key are not in the same region.

  • ErrCodeKmsKeyDisabledException "KmsKeyDisabledException" This exception is deprecated.

  • ErrCodeKmsException "KmsException" This exception is thrown when there is an issue with the specified KMS key and the trail can’t be updated.

  • ErrCodeInvalidCloudWatchLogsLogGroupArnException "InvalidCloudWatchLogsLogGroupArnException" This exception is thrown when the provided CloudWatch log group is not valid.

  • ErrCodeInvalidCloudWatchLogsRoleArnException "InvalidCloudWatchLogsRoleArnException" This exception is thrown when the provided role is not valid.

  • ErrCodeCloudWatchLogsDeliveryUnavailableException "CloudWatchLogsDeliveryUnavailableException" Cannot set a CloudWatch Logs delivery for this region.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

  • ErrCodeOrganizationsNotInUseException "OrganizationsNotInUseException" This exception is thrown when the request is made from an AWS account that is not a member of an organization. To make this request, sign in using the credentials of an account that belongs to an organization.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail

CreateTrailRequest

func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput)

CreateTrailRequest generates a "aws/request.Request" representing the client's request for the CreateTrail operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateTrail for more information on using the CreateTrail API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateTrailRequest method. req, resp := client.CreateTrailRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail

CreateTrailWithContext

func (c *CloudTrail) CreateTrailWithContext(ctx aws.Context, input *CreateTrailInput, opts ...request.Option) (*CreateTrailOutput, error)

CreateTrailWithContext is the same as CreateTrail with the addition of the ability to pass a context and additional request options.

See CreateTrail for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteTrail

func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error)

DeleteTrail API operation for AWS CloudTrail.

Deletes a trail. This operation must be called from the region in which the trail was created. DeleteTrail cannot be called on the shadow trails (replicated trails in other regions) of a trail that is enabled in all regions.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation DeleteTrail for usage and error information.

Returned Error Codes:

  • ErrCodeTrailNotFoundException "TrailNotFoundException" This exception is thrown when the trail with the given name is not found.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" This exception is thrown when an operation is called on a trail from a region other than the region in which the trail was created.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail

DeleteTrailRequest

func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput)

DeleteTrailRequest generates a "aws/request.Request" representing the client's request for the DeleteTrail operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteTrail for more information on using the DeleteTrail API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteTrailRequest method. req, resp := client.DeleteTrailRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail

DeleteTrailWithContext

func (c *CloudTrail) DeleteTrailWithContext(ctx aws.Context, input *DeleteTrailInput, opts ...request.Option) (*DeleteTrailOutput, error)

DeleteTrailWithContext is the same as DeleteTrail with the addition of the ability to pass a context and additional request options.

See DeleteTrail for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeTrails

func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error)

DescribeTrails API operation for AWS CloudTrail.

Retrieves settings for the trail associated with the current region for your account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation DescribeTrails for usage and error information.

Returned Error Codes:

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails

DescribeTrailsRequest

func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput)

DescribeTrailsRequest generates a "aws/request.Request" representing the client's request for the DescribeTrails operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeTrails for more information on using the DescribeTrails API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeTrailsRequest method. req, resp := client.DescribeTrailsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails

DescribeTrailsWithContext

func (c *CloudTrail) DescribeTrailsWithContext(ctx aws.Context, input *DescribeTrailsInput, opts ...request.Option) (*DescribeTrailsOutput, error)

DescribeTrailsWithContext is the same as DescribeTrails with the addition of the ability to pass a context and additional request options.

See DescribeTrails for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetEventSelectors

func (c *CloudTrail) GetEventSelectors(input *GetEventSelectorsInput) (*GetEventSelectorsOutput, error)

GetEventSelectors API operation for AWS CloudTrail.

Describes the settings for the event selectors that you configured for your trail. The information returned for your event selectors includes the following:

  • If your event selector includes read-only events, write-only events, or all events. This applies to both management events and data events.

  • If your event selector includes management events.

  • If your event selector includes data events, the Amazon S3 objects or AWS Lambda functions that you are logging for data events.

For more information, see Logging Data and Management Events for Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) in the AWS CloudTrail User Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation GetEventSelectors for usage and error information.

Returned Error Codes:

  • ErrCodeTrailNotFoundException "TrailNotFoundException" This exception is thrown when the trail with the given name is not found.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors

GetEventSelectorsRequest

func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (req *request.Request, output *GetEventSelectorsOutput)

GetEventSelectorsRequest generates a "aws/request.Request" representing the client's request for the GetEventSelectors operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetEventSelectors for more information on using the GetEventSelectors API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetEventSelectorsRequest method. req, resp := client.GetEventSelectorsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors

GetEventSelectorsWithContext

func (c *CloudTrail) GetEventSelectorsWithContext(ctx aws.Context, input *GetEventSelectorsInput, opts ...request.Option) (*GetEventSelectorsOutput, error)

GetEventSelectorsWithContext is the same as GetEventSelectors with the addition of the ability to pass a context and additional request options.

See GetEventSelectors for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetTrailStatus

func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error)

GetTrailStatus API operation for AWS CloudTrail.

Returns a JSON-formatted list of information about the specified trail. Fields include information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop logging times for each trail. This operation returns trail status from a single region. To return trail status from all regions, you must call the operation on each region.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation GetTrailStatus for usage and error information.

Returned Error Codes:

  • ErrCodeTrailNotFoundException "TrailNotFoundException" This exception is thrown when the trail with the given name is not found.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus

GetTrailStatusRequest

func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput)

GetTrailStatusRequest generates a "aws/request.Request" representing the client's request for the GetTrailStatus operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetTrailStatus for more information on using the GetTrailStatus API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetTrailStatusRequest method. req, resp := client.GetTrailStatusRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus

GetTrailStatusWithContext

func (c *CloudTrail) GetTrailStatusWithContext(ctx aws.Context, input *GetTrailStatusInput, opts ...request.Option) (*GetTrailStatusOutput, error)

GetTrailStatusWithContext is the same as GetTrailStatus with the addition of the ability to pass a context and additional request options.

See GetTrailStatus for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListPublicKeys

func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error)

ListPublicKeys API operation for AWS CloudTrail.

Returns all public keys whose private keys were used to sign the digest files within the specified time range. The public key is needed to validate digest files that were signed with its corresponding private key.

CloudTrail uses different private/public key pairs per region. Each digest file is signed with a private key unique to its region. Therefore, when you validate a digest file from a particular region, you must look in the same region for its corresponding public key.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation ListPublicKeys for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidTimeRangeException "InvalidTimeRangeException" Occurs if the timestamp values are invalid. Either the start time occurs after the end time or the time range is outside the range of possible values.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

  • ErrCodeInvalidTokenException "InvalidTokenException" Reserved for future use.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys

ListPublicKeysRequest

func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput)

ListPublicKeysRequest generates a "aws/request.Request" representing the client's request for the ListPublicKeys operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListPublicKeys for more information on using the ListPublicKeys API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListPublicKeysRequest method. req, resp := client.ListPublicKeysRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys

ListPublicKeysWithContext

func (c *CloudTrail) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error)

ListPublicKeysWithContext is the same as ListPublicKeys with the addition of the ability to pass a context and additional request options.

See ListPublicKeys for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListTags

func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error)

ListTags API operation for AWS CloudTrail.

Lists the tags for the trail in the current region.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation ListTags for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" This exception is thrown when the specified resource is not found.

  • ErrCodeARNInvalidException "CloudTrailARNInvalidException" This exception is thrown when an operation is called with an invalid trail ARN. The format of a trail ARN is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  • ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" This exception is thrown when the specified resource type is not supported by CloudTrail.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

  • ErrCodeInvalidTokenException "InvalidTokenException" Reserved for future use.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags

ListTagsRequest

func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput)

ListTagsRequest generates a "aws/request.Request" representing the client's request for the ListTags operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListTags for more information on using the ListTags API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListTagsRequest method. req, resp := client.ListTagsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags

ListTagsWithContext

func (c *CloudTrail) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error)

ListTagsWithContext is the same as ListTags with the addition of the ability to pass a context and additional request options.

See ListTags for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

LookupEvents

func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error)

LookupEvents API operation for AWS CloudTrail.

Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events) captured by CloudTrail. Events for a region can be looked up in that region during the last 90 days. Lookup supports the following attributes:

  • AWS access key

  • Event ID

  • Event name

  • Event source

  • Read only

  • Resource name

  • Resource type

  • User name

All attributes are optional. The default number of results returned is 50, with a maximum of 50 possible. The response includes a token that you can use to get the next page of results.

The rate of lookup requests is limited to one per second per account. If this limit is exceeded, a throttling error occurs.

Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation LookupEvents for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidLookupAttributesException "InvalidLookupAttributesException" Occurs when an invalid lookup attribute is specified.

  • ErrCodeInvalidTimeRangeException "InvalidTimeRangeException" Occurs if the timestamp values are invalid. Either the start time occurs after the end time or the time range is outside the range of possible values.

  • ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" This exception is thrown if the limit specified is invalid.

  • ErrCodeInvalidNextTokenException "InvalidNextTokenException" Invalid token or token that was previously used in a request with different parameters. This exception is thrown if the token is invalid.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents

LookupEventsPages

func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool) error

LookupEventsPages iterates over the pages of a LookupEvents operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See LookupEvents method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a LookupEvents operation. pageNum := 0 err := client.LookupEventsPages(params, func(page *LookupEventsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

LookupEventsPagesWithContext

func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error

LookupEventsPagesWithContext same as LookupEventsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

LookupEventsRequest

func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput)

LookupEventsRequest generates a "aws/request.Request" representing the client's request for the LookupEvents operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See LookupEvents for more information on using the LookupEvents API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the LookupEventsRequest method. req, resp := client.LookupEventsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents

LookupEventsWithContext

func (c *CloudTrail) LookupEventsWithContext(ctx aws.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error)

LookupEventsWithContext is the same as LookupEvents with the addition of the ability to pass a context and additional request options.

See LookupEvents for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PutEventSelectors

func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error)

PutEventSelectors API operation for AWS CloudTrail.

Configures an event selector for your trail. 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 selectors in 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.

Example

You create an event selector for a trail and specify that you want write-only events.

The EC2 GetConsoleOutput and RunInstances API operations occur in your account.

CloudTrail evaluates whether the events match your event selectors.

The RunInstances is a write-only event and it matches your event selector. The trail logs the event.

The GetConsoleOutput is a read-only event but it doesn't match your event selector. The trail doesn't log the event.

The PutEventSelectors operation must be called from the region in which the trail was created; otherwise, an InvalidHomeRegionException is thrown.

You can configure up to five event selectors for each trail. For more information, see Logging Data and Management Events for Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) in the AWS CloudTrail User Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation PutEventSelectors for usage and error information.

Returned Error Codes:

  • ErrCodeTrailNotFoundException "TrailNotFoundException" This exception is thrown when the trail with the given name is not found.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" This exception is thrown when an operation is called on a trail from a region other than the region in which the trail was created.

  • ErrCodeInvalidEventSelectorsException "InvalidEventSelectorsException" This exception is thrown when the PutEventSelectors operation is called with a number of event selectors or data resources that is not valid. The combination of event selectors and data resources is not valid. A trail can have up to 5 event selectors. A trail is limited to 250 data resources. These data resources can be distributed across event selectors, but the overall total cannot exceed 250.

You can:
  • Specify a valid number of event selectors (1 to 5) for a trail.

  • Specify a valid number of data resources (1 to 250) for an event selector. The limit of number of resources on an individual event selector is configurable up to 250. However, this upper limit is allowed only if the total number of data resources does not exceed 250 across all event selectors for a trail.

  • Specify a valid value for a parameter. For example, specifying the ReadWriteType parameter with a value of read-only is invalid.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors

PutEventSelectorsRequest

func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (req *request.Request, output *PutEventSelectorsOutput)

PutEventSelectorsRequest generates a "aws/request.Request" representing the client's request for the PutEventSelectors operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutEventSelectors for more information on using the PutEventSelectors API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutEventSelectorsRequest method. req, resp := client.PutEventSelectorsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors

PutEventSelectorsWithContext

func (c *CloudTrail) PutEventSelectorsWithContext(ctx aws.Context, input *PutEventSelectorsInput, opts ...request.Option) (*PutEventSelectorsOutput, error)

PutEventSelectorsWithContext is the same as PutEventSelectors with the addition of the ability to pass a context and additional request options.

See PutEventSelectors for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

RemoveTags

func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error)

RemoveTags API operation for AWS CloudTrail.

Removes the specified tags from a trail.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation RemoveTags for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" This exception is thrown when the specified resource is not found.

  • ErrCodeARNInvalidException "CloudTrailARNInvalidException" This exception is thrown when an operation is called with an invalid trail ARN. The format of a trail ARN is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  • ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" This exception is thrown when the specified resource type is not supported by CloudTrail.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeInvalidTagParameterException "InvalidTagParameterException" This exception is thrown when the key or value specified for the tag does not match the regular expression ^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags

RemoveTagsRequest

func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput)

RemoveTagsRequest generates a "aws/request.Request" representing the client's request for the RemoveTags operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See RemoveTags for more information on using the RemoveTags API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the RemoveTagsRequest method. req, resp := client.RemoveTagsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags

RemoveTagsWithContext

func (c *CloudTrail) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error)

RemoveTagsWithContext is the same as RemoveTags with the addition of the ability to pass a context and additional request options.

See RemoveTags for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

StartLogging

func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error)

StartLogging API operation for AWS CloudTrail.

Starts the recording of AWS API calls and log file delivery for a trail. For a trail that is enabled in all regions, this operation must be called from the region in which the trail was created. This operation cannot be called on the shadow trails (replicated trails in other regions) of a trail that is enabled in all regions.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation StartLogging for usage and error information.

Returned Error Codes:

  • ErrCodeTrailNotFoundException "TrailNotFoundException" This exception is thrown when the trail with the given name is not found.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" This exception is thrown when an operation is called on a trail from a region other than the region in which the trail was created.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging

StartLoggingRequest

func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput)

StartLoggingRequest generates a "aws/request.Request" representing the client's request for the StartLogging operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See StartLogging for more information on using the StartLogging API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the StartLoggingRequest method. req, resp := client.StartLoggingRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging

StartLoggingWithContext

func (c *CloudTrail) StartLoggingWithContext(ctx aws.Context, input *StartLoggingInput, opts ...request.Option) (*StartLoggingOutput, error)

StartLoggingWithContext is the same as StartLogging with the addition of the ability to pass a context and additional request options.

See StartLogging for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

StopLogging

func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error)

StopLogging API operation for AWS CloudTrail.

Suspends the recording of AWS API calls and log file delivery for the specified trail. Under most circumstances, there is no need to use this action. You can update a trail without stopping it first. This action is the only way to stop recording. For a trail enabled in all regions, this operation must be called from the region in which the trail was created, or an InvalidHomeRegionException will occur. This operation cannot be called on the shadow trails (replicated trails in other regions) of a trail enabled in all regions.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation StopLogging for usage and error information.

Returned Error Codes:

  • ErrCodeTrailNotFoundException "TrailNotFoundException" This exception is thrown when the trail with the given name is not found.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" This exception is thrown when an operation is called on a trail from a region other than the region in which the trail was created.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging

StopLoggingRequest

func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput)

StopLoggingRequest generates a "aws/request.Request" representing the client's request for the StopLogging operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See StopLogging for more information on using the StopLogging API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the StopLoggingRequest method. req, resp := client.StopLoggingRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging

StopLoggingWithContext

func (c *CloudTrail) StopLoggingWithContext(ctx aws.Context, input *StopLoggingInput, opts ...request.Option) (*StopLoggingOutput, error)

StopLoggingWithContext is the same as StopLogging with the addition of the ability to pass a context and additional request options.

See StopLogging for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateTrail

func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error)

UpdateTrail API operation for AWS CloudTrail.

Updates the settings that specify delivery of log files. Changes to a trail do not require stopping the CloudTrail service. Use this action to designate an existing bucket for log delivery. If the existing bucket has previously been a target for CloudTrail log files, an IAM policy exists for the bucket. UpdateTrail must be called from the region in which the trail was created; otherwise, an InvalidHomeRegionException is thrown.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudTrail's API operation UpdateTrail for usage and error information.

Returned Error Codes:

  • ErrCodeS3BucketDoesNotExistException "S3BucketDoesNotExistException" This exception is thrown when the specified S3 bucket does not exist.

  • ErrCodeInsufficientS3BucketPolicyException "InsufficientS3BucketPolicyException" This exception is thrown when the policy on the S3 bucket is not sufficient.

  • ErrCodeInsufficientSnsTopicPolicyException "InsufficientSnsTopicPolicyException" This exception is thrown when the policy on the SNS topic is not sufficient.

  • ErrCodeInsufficientEncryptionPolicyException "InsufficientEncryptionPolicyException" This exception is thrown when the policy on the S3 bucket or KMS key is not sufficient.

  • ErrCodeTrailNotFoundException "TrailNotFoundException" This exception is thrown when the trail with the given name is not found.

  • ErrCodeInvalidS3BucketNameException "InvalidS3BucketNameException" This exception is thrown when the provided S3 bucket name is not valid.

  • ErrCodeInvalidS3PrefixException "InvalidS3PrefixException" This exception is thrown when the provided S3 prefix is not valid.

  • ErrCodeInvalidSnsTopicNameException "InvalidSnsTopicNameException" This exception is thrown when the provided SNS topic name is not valid.

  • ErrCodeInvalidKmsKeyIdException "InvalidKmsKeyIdException" This exception is thrown when the KMS key ARN is invalid.

  • ErrCodeInvalidTrailNameException "InvalidTrailNameException" This exception is thrown when the provided trail name is not valid. Trail names 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 invalid.

  • Not be in IP address format (for example, 192.168.5.4)

  • ErrCodeTrailNotProvidedException "TrailNotProvidedException" This exception is deprecated.

  • ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" This exception is thrown when the combination of parameters provided is not valid.

  • ErrCodeInvalidHomeRegionException "InvalidHomeRegionException" This exception is thrown when an operation is called on a trail from a region other than the region in which the trail was created.

  • ErrCodeKmsKeyNotFoundException "KmsKeyNotFoundException" This exception is thrown when the KMS key does not exist, or when the S3 bucket and the KMS key are not in the same region.

  • ErrCodeKmsKeyDisabledException "KmsKeyDisabledException" This exception is deprecated.

  • ErrCodeKmsException "KmsException" This exception is thrown when there is an issue with the specified KMS key and the trail can’t be updated.

  • ErrCodeInvalidCloudWatchLogsLogGroupArnException "InvalidCloudWatchLogsLogGroupArnException" This exception is thrown when the provided CloudWatch log group is not valid.

  • ErrCodeInvalidCloudWatchLogsRoleArnException "InvalidCloudWatchLogsRoleArnException" This exception is thrown when the provided role is not valid.

  • ErrCodeCloudWatchLogsDeliveryUnavailableException "CloudWatchLogsDeliveryUnavailableException" Cannot set a CloudWatch Logs delivery for this region.

  • ErrCodeUnsupportedOperationException "UnsupportedOperationException" This exception is thrown when the requested operation is not supported.

  • ErrCodeOperationNotPermittedException "OperationNotPermittedException" This exception is thrown when the requested operation is not permitted.

  • ErrCodeOrganizationsNotInUseException "OrganizationsNotInUseException" This exception is thrown when the request is made from an AWS account that is not a member of an organization. To make this request, sign in using the credentials of an account that belongs to an organization.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail

UpdateTrailRequest

func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput)

UpdateTrailRequest generates a "aws/request.Request" representing the client's request for the UpdateTrail operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateTrail for more information on using the UpdateTrail API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateTrailRequest method. req, resp := client.UpdateTrailRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail

UpdateTrailWithContext

func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailInput, opts ...request.Option) (*UpdateTrailOutput, error)

UpdateTrailWithContext is the same as UpdateTrail with the addition of the ability to pass a context and additional request options.

See UpdateTrail for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

On this page: