cloudtrail

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 7 Imported by: 98

Documentation

Overview

Package cloudtrail provides the client and types for making API requests to CloudTrail.

This is the CloudTrail API Reference. It provides descriptions of actions, data types, common parameters, and common errors for CloudTrail.

CloudTrail is a web service that records AWS API calls for your AWS account and delivers log files to an Amazon S3 bucket. The recorded information includes the identity of the user, the start time of the AWS API call, the source IP address, the request parameters, and the response elements returned by the service.

As an alternative to the API, you can use one of the AWS SDKs, which consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to AWSCloudTrail. For example, the SDKs take care of cryptographically signing requests, managing errors, and retrying requests automatically. For information about the AWS SDKs, including how to download and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/).

See the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html) for information about the data that is included with each AWS API call listed in the log files.

See https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01 for more information on this service.

See cloudtrail package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/

Using the Client

To use CloudTrail with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the CloudTrail client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/#New

Index

Constants

View Source
const (
	ServiceName = "CloudTrail" // Service's name
	ServiceID   = "CloudTrail" // Service's identifier
	EndpointsID = "cloudtrail" // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeCloudTrailARNInvalidException for service response error code
	// "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
	ErrCodeCloudTrailARNInvalidException = "CloudTrailARNInvalidException"

	// ErrCodeCloudTrailAccessNotEnabledException for service response error code
	// "CloudTrailAccessNotEnabledException".
	//
	// This exception is thrown when trusted access has not been enabled between
	// AWS CloudTrail and AWS Organizations. For more information, see Enabling
	// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
	// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
	ErrCodeCloudTrailAccessNotEnabledException = "CloudTrailAccessNotEnabledException"

	// ErrCodeCloudWatchLogsDeliveryUnavailableException for service response error code
	// "CloudWatchLogsDeliveryUnavailableException".
	//
	// Cannot set a CloudWatch Logs delivery for this region.
	ErrCodeCloudWatchLogsDeliveryUnavailableException = "CloudWatchLogsDeliveryUnavailableException"

	// ErrCodeInsufficientDependencyServiceAccessPermissionException for service response error code
	// "InsufficientDependencyServiceAccessPermissionException".
	//
	// This exception is thrown when the IAM user or role that is used to create
	// the organization trail is lacking one or more required permissions for creating
	// an organization trail in a required service. For more information, see Prepare
	// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
	ErrCodeInsufficientDependencyServiceAccessPermissionException = "InsufficientDependencyServiceAccessPermissionException"

	// ErrCodeInsufficientEncryptionPolicyException for service response error code
	// "InsufficientEncryptionPolicyException".
	//
	// This exception is thrown when the policy on the S3 bucket or KMS key is not
	// sufficient.
	ErrCodeInsufficientEncryptionPolicyException = "InsufficientEncryptionPolicyException"

	// ErrCodeInsufficientS3BucketPolicyException for service response error code
	// "InsufficientS3BucketPolicyException".
	//
	// This exception is thrown when the policy on the S3 bucket is not sufficient.
	ErrCodeInsufficientS3BucketPolicyException = "InsufficientS3BucketPolicyException"

	// ErrCodeInsufficientSnsTopicPolicyException for service response error code
	// "InsufficientSnsTopicPolicyException".
	//
	// This exception is thrown when the policy on the SNS topic is not sufficient.
	ErrCodeInsufficientSnsTopicPolicyException = "InsufficientSnsTopicPolicyException"

	// ErrCodeInvalidCloudWatchLogsLogGroupArnException for service response error code
	// "InvalidCloudWatchLogsLogGroupArnException".
	//
	// This exception is thrown when the provided CloudWatch log group is not valid.
	ErrCodeInvalidCloudWatchLogsLogGroupArnException = "InvalidCloudWatchLogsLogGroupArnException"

	// ErrCodeInvalidCloudWatchLogsRoleArnException for service response error code
	// "InvalidCloudWatchLogsRoleArnException".
	//
	// This exception is thrown when the provided role is not valid.
	ErrCodeInvalidCloudWatchLogsRoleArnException = "InvalidCloudWatchLogsRoleArnException"

	// ErrCodeInvalidEventSelectorsException for service response error code
	// "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.
	ErrCodeInvalidEventSelectorsException = "InvalidEventSelectorsException"

	// ErrCodeInvalidHomeRegionException for service response error code
	// "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.
	ErrCodeInvalidHomeRegionException = "InvalidHomeRegionException"

	// ErrCodeInvalidKmsKeyIdException for service response error code
	// "InvalidKmsKeyIdException".
	//
	// This exception is thrown when the KMS key ARN is invalid.
	ErrCodeInvalidKmsKeyIdException = "InvalidKmsKeyIdException"

	// ErrCodeInvalidLookupAttributesException for service response error code
	// "InvalidLookupAttributesException".
	//
	// Occurs when an invalid lookup attribute is specified.
	ErrCodeInvalidLookupAttributesException = "InvalidLookupAttributesException"

	// ErrCodeInvalidMaxResultsException for service response error code
	// "InvalidMaxResultsException".
	//
	// This exception is thrown if the limit specified is invalid.
	ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException"

	// ErrCodeInvalidNextTokenException for service response error code
	// "InvalidNextTokenException".
	//
	// Invalid token or token that was previously used in a request with different
	// parameters. This exception is thrown if the token is invalid.
	ErrCodeInvalidNextTokenException = "InvalidNextTokenException"

	// ErrCodeInvalidParameterCombinationException for service response error code
	// "InvalidParameterCombinationException".
	//
	// This exception is thrown when the combination of parameters provided is not
	// valid.
	ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException"

	// ErrCodeInvalidS3BucketNameException for service response error code
	// "InvalidS3BucketNameException".
	//
	// This exception is thrown when the provided S3 bucket name is not valid.
	ErrCodeInvalidS3BucketNameException = "InvalidS3BucketNameException"

	// ErrCodeInvalidS3PrefixException for service response error code
	// "InvalidS3PrefixException".
	//
	// This exception is thrown when the provided S3 prefix is not valid.
	ErrCodeInvalidS3PrefixException = "InvalidS3PrefixException"

	// ErrCodeInvalidSnsTopicNameException for service response error code
	// "InvalidSnsTopicNameException".
	//
	// This exception is thrown when the provided SNS topic name is not valid.
	ErrCodeInvalidSnsTopicNameException = "InvalidSnsTopicNameException"

	// ErrCodeInvalidTagParameterException for service response error code
	// "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}_.:/=+\\-@]*)$.
	ErrCodeInvalidTagParameterException = "InvalidTagParameterException"

	// ErrCodeInvalidTimeRangeException for service response error code
	// "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.
	ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException"

	// ErrCodeInvalidTokenException for service response error code
	// "InvalidTokenException".
	//
	// Reserved for future use.
	ErrCodeInvalidTokenException = "InvalidTokenException"

	// ErrCodeInvalidTrailNameException for service response error code
	// "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)
	ErrCodeInvalidTrailNameException = "InvalidTrailNameException"

	// ErrCodeKmsException for service response error code
	// "KmsException".
	//
	// This exception is thrown when there is an issue with the specified KMS key
	// and the trail can’t be updated.
	ErrCodeKmsException = "KmsException"

	// ErrCodeKmsKeyDisabledException for service response error code
	// "KmsKeyDisabledException".
	//
	// This exception is deprecated.
	ErrCodeKmsKeyDisabledException = "KmsKeyDisabledException"

	// ErrCodeKmsKeyNotFoundException for service response error code
	// "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.
	ErrCodeKmsKeyNotFoundException = "KmsKeyNotFoundException"

	// ErrCodeMaximumNumberOfTrailsExceededException for service response error code
	// "MaximumNumberOfTrailsExceededException".
	//
	// This exception is thrown when the maximum number of trails is reached.
	ErrCodeMaximumNumberOfTrailsExceededException = "MaximumNumberOfTrailsExceededException"

	// ErrCodeNotOrganizationMasterAccountException for service response error code
	// "NotOrganizationMasterAccountException".
	//
	// This exception is thrown when the AWS account making the request to create
	// or update an organization trail is not the master account for an organization
	// in AWS Organizations. For more information, see Prepare For Creating a Trail
	// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
	ErrCodeNotOrganizationMasterAccountException = "NotOrganizationMasterAccountException"

	// ErrCodeOperationNotPermittedException for service response error code
	// "OperationNotPermittedException".
	//
	// This exception is thrown when the requested operation is not permitted.
	ErrCodeOperationNotPermittedException = "OperationNotPermittedException"

	// ErrCodeOrganizationNotInAllFeaturesModeException for service response error code
	// "OrganizationNotInAllFeaturesModeException".
	//
	// This exception is thrown when AWS Organizations is not configured to support
	// all features. All features must be enabled in AWS Organization to support
	// creating an organization trail. For more information, see Prepare For Creating
	// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
	ErrCodeOrganizationNotInAllFeaturesModeException = "OrganizationNotInAllFeaturesModeException"

	// ErrCodeOrganizationsNotInUseException for service response error code
	// "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.
	ErrCodeOrganizationsNotInUseException = "OrganizationsNotInUseException"

	// ErrCodeResourceNotFoundException for service response error code
	// "ResourceNotFoundException".
	//
	// This exception is thrown when the specified resource is not found.
	ErrCodeResourceNotFoundException = "ResourceNotFoundException"

	// ErrCodeResourceTypeNotSupportedException for service response error code
	// "ResourceTypeNotSupportedException".
	//
	// This exception is thrown when the specified resource type is not supported
	// by CloudTrail.
	ErrCodeResourceTypeNotSupportedException = "ResourceTypeNotSupportedException"

	// ErrCodeS3BucketDoesNotExistException for service response error code
	// "S3BucketDoesNotExistException".
	//
	// This exception is thrown when the specified S3 bucket does not exist.
	ErrCodeS3BucketDoesNotExistException = "S3BucketDoesNotExistException"

	// ErrCodeTagsLimitExceededException for service response error code
	// "TagsLimitExceededException".
	//
	// The number of tags per trail has exceeded the permitted amount. Currently,
	// the limit is 50.
	ErrCodeTagsLimitExceededException = "TagsLimitExceededException"

	// ErrCodeTrailAlreadyExistsException for service response error code
	// "TrailAlreadyExistsException".
	//
	// This exception is thrown when the specified trail already exists.
	ErrCodeTrailAlreadyExistsException = "TrailAlreadyExistsException"

	// ErrCodeTrailNotFoundException for service response error code
	// "TrailNotFoundException".
	//
	// This exception is thrown when the trail with the given name is not found.
	ErrCodeTrailNotFoundException = "TrailNotFoundException"

	// ErrCodeTrailNotProvidedException for service response error code
	// "TrailNotProvidedException".
	//
	// This exception is deprecated.
	ErrCodeTrailNotProvidedException = "TrailNotProvidedException"

	// ErrCodeUnsupportedOperationException for service response error code
	// "UnsupportedOperationException".
	//
	// This exception is thrown when the requested operation is not supported.
	ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTagsInput

type AddTagsInput struct {

	// Specifies the ARN of the trail to which one or more tags will be added. The
	// format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// ResourceId is a required field
	ResourceId *string `type:"string" required:"true"`

	// Contains a list of CloudTrail tags, up to a limit of 50
	TagsList []Tag `type:"list"`
	// contains filtered or unexported fields
}

Specifies the tags to add to a trail. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTagsRequest

func (AddTagsInput) String

func (s AddTagsInput) String() string

String returns the string representation

func (*AddTagsInput) Validate

func (s *AddTagsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type AddTagsOutput

type AddTagsOutput struct {
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTagsResponse

func (AddTagsOutput) String

func (s AddTagsOutput) String() string

String returns the string representation

type AddTagsRequest

type AddTagsRequest struct {
	*aws.Request
	Input *AddTagsInput
	Copy  func(*AddTagsInput) AddTagsRequest
}

AddTagsRequest is the request type for the AddTags API operation.

func (AddTagsRequest) Send

Send marshals and sends the AddTags API request.

type AddTagsResponse added in v0.9.0

type AddTagsResponse struct {
	*AddTagsOutput
	// contains filtered or unexported fields
}

AddTagsResponse is the response type for the AddTags API operation.

func (*AddTagsResponse) SDKResponseMetdata added in v0.9.0

func (r *AddTagsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the AddTags request.

type Client added in v0.9.0

type Client struct {
	*aws.Client
}

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

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

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := cloudtrail.New(myConfig)

func (*Client) AddTagsRequest added in v0.9.0

func (c *Client) AddTagsRequest(input *AddTagsInput) AddTagsRequest

AddTagsRequest returns a request value for making 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).

// Example sending a request using AddTagsRequest.
req := client.AddTagsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) CreateTrailRequest added in v0.9.0

func (c *Client) CreateTrailRequest(input *CreateTrailInput) CreateTrailRequest

CreateTrailRequest returns a request value for making 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.

// Example sending a request using CreateTrailRequest.
req := client.CreateTrailRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) DeleteTrailRequest added in v0.9.0

func (c *Client) DeleteTrailRequest(input *DeleteTrailInput) DeleteTrailRequest

DeleteTrailRequest returns a request value for making 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.

// Example sending a request using DeleteTrailRequest.
req := client.DeleteTrailRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) DescribeTrailsRequest added in v0.9.0

func (c *Client) DescribeTrailsRequest(input *DescribeTrailsInput) DescribeTrailsRequest

DescribeTrailsRequest returns a request value for making API operation for AWS CloudTrail.

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

// Example sending a request using DescribeTrailsRequest.
req := client.DescribeTrailsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) GetEventSelectorsRequest added in v0.9.0

func (c *Client) GetEventSelectorsRequest(input *GetEventSelectorsInput) GetEventSelectorsRequest

GetEventSelectorsRequest returns a request value for making 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 (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) in the AWS CloudTrail User Guide.

// Example sending a request using GetEventSelectorsRequest.
req := client.GetEventSelectorsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) GetTrailStatusRequest added in v0.9.0

func (c *Client) GetTrailStatusRequest(input *GetTrailStatusInput) GetTrailStatusRequest

GetTrailStatusRequest returns a request value for making 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.

// Example sending a request using GetTrailStatusRequest.
req := client.GetTrailStatusRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) ListPublicKeysRequest added in v0.9.0

func (c *Client) ListPublicKeysRequest(input *ListPublicKeysInput) ListPublicKeysRequest

ListPublicKeysRequest returns a request value for making 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.

// Example sending a request using ListPublicKeysRequest.
req := client.ListPublicKeysRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) ListTagsRequest added in v0.9.0

func (c *Client) ListTagsRequest(input *ListTagsInput) ListTagsRequest

ListTagsRequest returns a request value for making API operation for AWS CloudTrail.

Lists the tags for the trail in the current region.

// Example sending a request using ListTagsRequest.
req := client.ListTagsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) LookupEventsRequest added in v0.9.0

func (c *Client) LookupEventsRequest(input *LookupEventsInput) LookupEventsRequest

LookupEventsRequest returns a request value for making 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.

// Example sending a request using LookupEventsRequest.
req := client.LookupEventsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) PutEventSelectorsRequest added in v0.9.0

func (c *Client) PutEventSelectorsRequest(input *PutEventSelectorsInput) PutEventSelectorsRequest

PutEventSelectorsRequest returns a request value for making 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 (http://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.

// Example sending a request using PutEventSelectorsRequest.
req := client.PutEventSelectorsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) RemoveTagsRequest added in v0.9.0

func (c *Client) RemoveTagsRequest(input *RemoveTagsInput) RemoveTagsRequest

RemoveTagsRequest returns a request value for making API operation for AWS CloudTrail.

Removes the specified tags from a trail.

// Example sending a request using RemoveTagsRequest.
req := client.RemoveTagsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) StartLoggingRequest added in v0.9.0

func (c *Client) StartLoggingRequest(input *StartLoggingInput) StartLoggingRequest

StartLoggingRequest returns a request value for making 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.

// Example sending a request using StartLoggingRequest.
req := client.StartLoggingRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) StopLoggingRequest added in v0.9.0

func (c *Client) StopLoggingRequest(input *StopLoggingInput) StopLoggingRequest

StopLoggingRequest returns a request value for making 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.

// Example sending a request using StopLoggingRequest.
req := client.StopLoggingRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

func (*Client) UpdateTrailRequest added in v0.9.0

func (c *Client) UpdateTrailRequest(input *UpdateTrailInput) UpdateTrailRequest

UpdateTrailRequest returns a request value for making 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.

// Example sending a request using UpdateTrailRequest.
req := client.UpdateTrailRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

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

type CreateTrailInput

type CreateTrailInput struct {

	// 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.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies whether log file integrity validation is enabled. The default is
	// false.
	//
	// When you disable log file integrity validation, the chain of digest files
	// is broken after one hour. CloudTrail will not create digest files for log
	// files that were delivered during a period in which log file integrity validation
	// was disabled. For example, if you enable log file integrity validation at
	// noon on January 1, disable it at noon on January 2, and re-enable it at noon
	// on January 10, digest files will not be created for the log files delivered
	// from noon on January 2 to noon on January 10. The same applies whenever you
	// stop CloudTrail logging or delete a trail.
	EnableLogFileValidation *bool `type:"boolean"`

	// Specifies whether the trail is publishing events from global services such
	// as IAM to the log files.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail is created in the current region or in all regions.
	// The default is false.
	IsMultiRegionTrail *bool `type:"boolean"`

	// 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.
	IsOrganizationTrail *bool `type:"boolean"`

	// 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.
	//
	// Examples:
	//
	//    * alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	//
	//    * 12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies the name of the trail. The name 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)
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// Specifies the name of the Amazon S3 bucket designated for publishing log
	// files. See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
	//
	// S3BucketName is a required field
	S3BucketName *string `type:"string" required:"true"`

	// 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 (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	// The maximum length is 200 characters.
	S3KeyPrefix *string `type:"string"`

	// Specifies the name of the Amazon SNS topic defined for notification of log
	// file delivery. The maximum length is 256 characters.
	SnsTopicName *string `type:"string"`
	// contains filtered or unexported fields
}

Specifies the settings for each trail. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrailRequest

func (CreateTrailInput) String

func (s CreateTrailInput) String() string

String returns the string representation

func (*CreateTrailInput) Validate

func (s *CreateTrailInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateTrailOutput

type CreateTrailOutput struct {

	// Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
	// logs will be delivered.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies whether the trail is publishing events from global services such
	// as IAM to the log files.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail exists in one region or in all regions.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is an organization trail.
	IsOrganizationTrail *bool `type:"boolean"`

	// 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-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies whether log file integrity validation is enabled.
	LogFileValidationEnabled *bool `type:"boolean"`

	// Specifies the name of the trail.
	Name *string `type:"string"`

	// Specifies the name of the Amazon S3 bucket designated for publishing log
	// files.
	S3BucketName *string `type:"string"`

	// 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 (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	S3KeyPrefix *string `type:"string"`

	// 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-2:123456789012:MyTopic
	SnsTopicARN *string `type:"string"`

	// This field is deprecated. Use SnsTopicARN.
	SnsTopicName *string `deprecated:"true" type:"string"`

	// Specifies the ARN of the trail that was created. The format of a trail ARN
	// is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	TrailARN *string `type:"string"`
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrailResponse

func (CreateTrailOutput) String

func (s CreateTrailOutput) String() string

String returns the string representation

type CreateTrailRequest

type CreateTrailRequest struct {
	*aws.Request
	Input *CreateTrailInput
	Copy  func(*CreateTrailInput) CreateTrailRequest
}

CreateTrailRequest is the request type for the CreateTrail API operation.

func (CreateTrailRequest) Send

Send marshals and sends the CreateTrail API request.

type CreateTrailResponse added in v0.9.0

type CreateTrailResponse struct {
	*CreateTrailOutput
	// contains filtered or unexported fields
}

CreateTrailResponse is the response type for the CreateTrail API operation.

func (*CreateTrailResponse) SDKResponseMetdata added in v0.9.0

func (r *CreateTrailResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateTrail request.

type DataResource

type DataResource struct {

	// The resource type in which you want to log data events. You can specify AWS::S3::Object
	// or AWS::Lambda::Function resources.
	Type *string `type:"string"`

	// An array of Amazon Resource Name (ARN) strings or partial ARN strings for
	// the specified objects.
	//
	//    * To log data events for all objects in all S3 buckets in your AWS account,
	//    specify the prefix as arn:aws:s3:::. This will also enable logging of
	//    data event activity performed by any user or role in your AWS account,
	//    even if that activity is performed on a bucket that belongs to another
	//    AWS account.
	//
	//    * To log data events for all objects in all S3 buckets that include my-bucket
	//    in their names, specify the prefix as aws:s3:::my-bucket. The trail logs
	//    data events for all objects in all buckets whose name contains a match
	//    for my-bucket.
	//
	//    * To log data events for all objects in an S3 bucket, specify the bucket
	//    and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs
	//    data events for all objects in this S3 bucket.
	//
	//    * To log data events for specific objects, specify the S3 bucket and object
	//    prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data
	//    events for objects in this S3 bucket that match the prefix.
	//
	//    * To log data events for all functions in your AWS account, specify the
	//    prefix as arn:aws:lambda. This will also enable logging of Invoke activity
	//    performed by any user or role in your AWS account, even if that activity
	//    is performed on a function that belongs to another AWS account.
	//
	//    * To log data eents for a specific Lambda function, specify the function
	//    ARN. Lambda function ARNs are exact. Unlike S3, you cannot use matching.
	//    For example, if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld,
	//    data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld.
	//    They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2.
	Values []string `type:"list"`
	// contains filtered or unexported fields
}

The Amazon S3 buckets or AWS Lambda functions that you specify in your event selectors for your trail to log data events. Data events provide insight into the resource operations performed on or within a resource itself. These are also known as data plane operations. You can specify up to 250 data resources for a trail.

The total number of allowed data resources is 250. This number can be distributed between 1 and 5 event selectors, but the total cannot exceed 250 across all selectors.

The following example demonstrates how logging works when you configure logging of all data events for an S3 bucket named bucket-1. In this example, the CloudTrail user spcified an empty prefix, and the option to log both Read and Write data events.

A user uploads an image file to bucket-1.

The PutObject API operation is an Amazon S3 object-level API. It is recorded as a data event in CloudTrail. Because the CloudTrail user specified an S3 bucket with an empty prefix, events that occur on any object in that bucket are logged. The trail processes and logs the event.

A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2.

The PutObject API operation occurred for an object in an S3 bucket that the CloudTrail user didn't specify for the trail. The trail doesn’t log the event.

The following example demonstrates how logging works when you configure logging of AWS Lambda data events for a Lambda function named MyLambdaFunction, but not for all AWS Lambda functions.

A user runs a script that includes a call to the MyLambdaFunction function and the MyOtherLambdaFunction function.

The Invoke API operation on MyLambdaFunction is an AWS Lambda API. It is recorded as a data event in CloudTrail. Because the CloudTrail user specified logging data events for MyLambdaFunction, any invocations of that function are logged. The trail processes and logs the event.

The Invoke API operation on MyOtherLambdaFunction is an AWS Lambda API. Because the CloudTrail user did not specify logging data events for all Lambda functions, the Invoke operation for MyOtherLambdaFunction does not match the function specified for the trail. The trail doesn’t log the event. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DataResource

func (DataResource) String

func (s DataResource) String() string

String returns the string representation

type DeleteTrailInput

type DeleteTrailInput struct {

	// Specifies the name or the CloudTrail ARN of the trail to be deleted. The
	// format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

The request that specifies the name of a trail to delete. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrailRequest

func (DeleteTrailInput) String

func (s DeleteTrailInput) String() string

String returns the string representation

func (*DeleteTrailInput) Validate

func (s *DeleteTrailInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteTrailOutput

type DeleteTrailOutput struct {
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrailResponse

func (DeleteTrailOutput) String

func (s DeleteTrailOutput) String() string

String returns the string representation

type DeleteTrailRequest

type DeleteTrailRequest struct {
	*aws.Request
	Input *DeleteTrailInput
	Copy  func(*DeleteTrailInput) DeleteTrailRequest
}

DeleteTrailRequest is the request type for the DeleteTrail API operation.

func (DeleteTrailRequest) Send

Send marshals and sends the DeleteTrail API request.

type DeleteTrailResponse added in v0.9.0

type DeleteTrailResponse struct {
	*DeleteTrailOutput
	// contains filtered or unexported fields
}

DeleteTrailResponse is the response type for the DeleteTrail API operation.

func (*DeleteTrailResponse) SDKResponseMetdata added in v0.9.0

func (r *DeleteTrailResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteTrail request.

type DescribeTrailsInput

type DescribeTrailsInput struct {

	// Specifies whether to include shadow trails in the response. A shadow trail
	// is the replication in a region of a trail that was created in a different
	// region, or in the case of an organization trail, the replication of an organization
	// trail in member accounts. If you do not include shadow trails, organization
	// trails in a member account and region replication trails will not be returned.
	// The default is true.
	IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"`

	// Specifies a list of trail names, trail ARNs, or both, of the trails to describe.
	// The format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// If an empty list is specified, information for the trail in the current region
	// is returned.
	//
	//    * If an empty list is specified and IncludeShadowTrails is false, then
	//    information for all trails in the current region is returned.
	//
	//    * If an empty list is specified and IncludeShadowTrails is null or true,
	//    then information for all trails in the current region and any associated
	//    shadow trails in other regions is returned.
	//
	// If one or more trail names are specified, information is returned only if
	// the names match the names of trails belonging only to the current region.
	// To return information about a trail in another region, you must specify its
	// trail ARN.
	TrailNameList []string `locationName:"trailNameList" type:"list"`
	// contains filtered or unexported fields
}

Returns information about the trail. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrailsRequest

func (DescribeTrailsInput) String

func (s DescribeTrailsInput) String() string

String returns the string representation

type DescribeTrailsOutput

type DescribeTrailsOutput struct {

	// The list of trail objects.
	TrailList []Trail `locationName:"trailList" type:"list"`
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrailsResponse

func (DescribeTrailsOutput) String

func (s DescribeTrailsOutput) String() string

String returns the string representation

type DescribeTrailsRequest

type DescribeTrailsRequest struct {
	*aws.Request
	Input *DescribeTrailsInput
	Copy  func(*DescribeTrailsInput) DescribeTrailsRequest
}

DescribeTrailsRequest is the request type for the DescribeTrails API operation.

func (DescribeTrailsRequest) Send

Send marshals and sends the DescribeTrails API request.

type DescribeTrailsResponse added in v0.9.0

type DescribeTrailsResponse struct {
	*DescribeTrailsOutput
	// contains filtered or unexported fields
}

DescribeTrailsResponse is the response type for the DescribeTrails API operation.

func (*DescribeTrailsResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeTrailsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeTrails request.

type Event

type Event struct {

	// The AWS access key ID that was used to sign the request. If the request was
	// made with temporary security credentials, this is the access key ID of the
	// temporary credentials.
	AccessKeyId *string `type:"string"`

	// A JSON string that contains a representation of the event returned.
	CloudTrailEvent *string `type:"string"`

	// The CloudTrail ID of the event returned.
	EventId *string `type:"string"`

	// The name of the event returned.
	EventName *string `type:"string"`

	// The AWS service that the request was made to.
	EventSource *string `type:"string"`

	// The date and time of the event returned.
	EventTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Information about whether the event is a write event or a read event.
	ReadOnly *string `type:"string"`

	// A list of resources referenced by the event returned.
	Resources []Resource `type:"list"`

	// A user name or role name of the requester that called the API in the event
	// returned.
	Username *string `type:"string"`
	// contains filtered or unexported fields
}

Contains information about an event that was returned by a lookup request. The result includes a representation of a CloudTrail event. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/Event

func (Event) String

func (s Event) String() string

String returns the string representation

type EventSelector

type EventSelector struct {

	// CloudTrail supports data event logging for Amazon S3 objects and AWS Lambda
	// functions. You can specify up to 250 resources for an individual event selector,
	// but the total number of data resources cannot exceed 250 across all event
	// selectors in a trail. This limit does not apply if you configure resource
	// logging for all data events.
	//
	// For more information, see Data Events (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events)
	// and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
	// in the AWS CloudTrail User Guide.
	DataResources []DataResource `type:"list"`

	// Specify if you want your event selector to include management events for
	// your trail.
	//
	// For more information, see Management Events (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events)
	// in the AWS CloudTrail User Guide.
	//
	// By default, the value is true.
	IncludeManagementEvents *bool `type:"boolean"`

	// Specify if you want your trail to log read-only events, write-only events,
	// or all. For example, the EC2 GetConsoleOutput is a read-only API operation
	// and RunInstances is a write-only API operation.
	//
	// By default, the value is All.
	ReadWriteType ReadWriteType `type:"string" enum:"true"`
	// contains filtered or unexported fields
}

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. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/EventSelector

func (EventSelector) String

func (s EventSelector) String() string

String returns the string representation

type GetEventSelectorsInput

type GetEventSelectorsInput struct {

	// Specifies the name of the trail or trail ARN. If you specify a trail name,
	// the string 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 not valid.
	//
	//    * Not be in IP address format (for example, 192.168.5.4)
	//
	// If you specify a trail ARN, it must be in the format:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// TrailName is a required field
	TrailName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectorsRequest

func (GetEventSelectorsInput) String

func (s GetEventSelectorsInput) String() string

String returns the string representation

func (*GetEventSelectorsInput) Validate

func (s *GetEventSelectorsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetEventSelectorsOutput

type GetEventSelectorsOutput struct {

	// The event selectors that are configured for the trail.
	EventSelectors []EventSelector `type:"list"`

	// The specified trail ARN that has the event selectors.
	TrailARN *string `type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectorsResponse

func (GetEventSelectorsOutput) String

func (s GetEventSelectorsOutput) String() string

String returns the string representation

type GetEventSelectorsRequest

type GetEventSelectorsRequest struct {
	*aws.Request
	Input *GetEventSelectorsInput
	Copy  func(*GetEventSelectorsInput) GetEventSelectorsRequest
}

GetEventSelectorsRequest is the request type for the GetEventSelectors API operation.

func (GetEventSelectorsRequest) Send

Send marshals and sends the GetEventSelectors API request.

type GetEventSelectorsResponse added in v0.9.0

type GetEventSelectorsResponse struct {
	*GetEventSelectorsOutput
	// contains filtered or unexported fields
}

GetEventSelectorsResponse is the response type for the GetEventSelectors API operation.

func (*GetEventSelectorsResponse) SDKResponseMetdata added in v0.9.0

func (r *GetEventSelectorsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetEventSelectors request.

type GetTrailStatusInput

type GetTrailStatusInput struct {

	// Specifies the name or the CloudTrail ARN of the trail for which you are requesting
	// status. To get the status of a shadow trail (a replication of the trail in
	// another region), you must specify its ARN. The format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

The name of a trail about which you want the current status. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatusRequest

func (GetTrailStatusInput) String

func (s GetTrailStatusInput) String() string

String returns the string representation

func (*GetTrailStatusInput) Validate

func (s *GetTrailStatusInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetTrailStatusOutput

type GetTrailStatusOutput struct {

	// Whether the CloudTrail is currently logging AWS API calls.
	IsLogging *bool `type:"boolean"`

	// Displays any CloudWatch Logs error that CloudTrail encountered when attempting
	// to deliver logs to CloudWatch Logs.
	LatestCloudWatchLogsDeliveryError *string `type:"string"`

	// Displays the most recent date and time when CloudTrail delivered logs to
	// CloudWatch Logs.
	LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// This field is deprecated.
	LatestDeliveryAttemptSucceeded *string `type:"string"`

	// This field is deprecated.
	LatestDeliveryAttemptTime *string `type:"string"`

	// Displays any Amazon S3 error that CloudTrail encountered when attempting
	// to deliver log files to the designated bucket. For more information see the
	// topic Error Responses (http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
	// in the Amazon S3 API Reference.
	//
	// This error occurs only when there is a problem with the destination S3 bucket
	// and will not occur for timeouts. To resolve the issue, create a new bucket
	// and call UpdateTrail to specify the new bucket, or fix the existing objects
	// so that CloudTrail can again write to the bucket.
	LatestDeliveryError *string `type:"string"`

	// Specifies the date and time that CloudTrail last delivered log files to an
	// account's Amazon S3 bucket.
	LatestDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Displays any Amazon S3 error that CloudTrail encountered when attempting
	// to deliver a digest file to the designated bucket. For more information see
	// the topic Error Responses (http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
	// in the Amazon S3 API Reference.
	//
	// This error occurs only when there is a problem with the destination S3 bucket
	// and will not occur for timeouts. To resolve the issue, create a new bucket
	// and call UpdateTrail to specify the new bucket, or fix the existing objects
	// so that CloudTrail can again write to the bucket.
	LatestDigestDeliveryError *string `type:"string"`

	// Specifies the date and time that CloudTrail last delivered a digest file
	// to an account's Amazon S3 bucket.
	LatestDigestDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// This field is deprecated.
	LatestNotificationAttemptSucceeded *string `type:"string"`

	// This field is deprecated.
	LatestNotificationAttemptTime *string `type:"string"`

	// Displays any Amazon SNS error that CloudTrail encountered when attempting
	// to send a notification. For more information about Amazon SNS errors, see
	// the Amazon SNS Developer Guide (http://docs.aws.amazon.com/sns/latest/dg/welcome.html).
	LatestNotificationError *string `type:"string"`

	// Specifies the date and time of the most recent Amazon SNS notification that
	// CloudTrail has written a new log file to an account's Amazon S3 bucket.
	LatestNotificationTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Specifies the most recent date and time when CloudTrail started recording
	// API calls for an AWS account.
	StartLoggingTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Specifies the most recent date and time when CloudTrail stopped recording
	// API calls for an AWS account.
	StopLoggingTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// This field is deprecated.
	TimeLoggingStarted *string `type:"string"`

	// This field is deprecated.
	TimeLoggingStopped *string `type:"string"`
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatusResponse

func (GetTrailStatusOutput) String

func (s GetTrailStatusOutput) String() string

String returns the string representation

type GetTrailStatusRequest

type GetTrailStatusRequest struct {
	*aws.Request
	Input *GetTrailStatusInput
	Copy  func(*GetTrailStatusInput) GetTrailStatusRequest
}

GetTrailStatusRequest is the request type for the GetTrailStatus API operation.

func (GetTrailStatusRequest) Send

Send marshals and sends the GetTrailStatus API request.

type GetTrailStatusResponse added in v0.9.0

type GetTrailStatusResponse struct {
	*GetTrailStatusOutput
	// contains filtered or unexported fields
}

GetTrailStatusResponse is the response type for the GetTrailStatus API operation.

func (*GetTrailStatusResponse) SDKResponseMetdata added in v0.9.0

func (r *GetTrailStatusResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetTrailStatus request.

type ListPublicKeysInput

type ListPublicKeysInput struct {

	// Optionally specifies, in UTC, the end of the time range to look up public
	// keys for CloudTrail digest files. If not specified, the current time is used.
	EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Reserved for future use.
	NextToken *string `type:"string"`

	// Optionally specifies, in UTC, the start of the time range to look up public
	// keys for CloudTrail digest files. If not specified, the current time is used,
	// and the current public key is returned.
	StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
	// contains filtered or unexported fields
}

Requests the public keys for a specified time range. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeysRequest

func (ListPublicKeysInput) String

func (s ListPublicKeysInput) String() string

String returns the string representation

type ListPublicKeysOutput

type ListPublicKeysOutput struct {

	// Reserved for future use.
	NextToken *string `type:"string"`

	// Contains an array of PublicKey objects.
	//
	// The returned public keys may have validity time ranges that overlap.
	PublicKeyList []PublicKey `type:"list"`
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeysResponse

func (ListPublicKeysOutput) String

func (s ListPublicKeysOutput) String() string

String returns the string representation

type ListPublicKeysRequest

type ListPublicKeysRequest struct {
	*aws.Request
	Input *ListPublicKeysInput
	Copy  func(*ListPublicKeysInput) ListPublicKeysRequest
}

ListPublicKeysRequest is the request type for the ListPublicKeys API operation.

func (ListPublicKeysRequest) Send

Send marshals and sends the ListPublicKeys API request.

type ListPublicKeysResponse added in v0.9.0

type ListPublicKeysResponse struct {
	*ListPublicKeysOutput
	// contains filtered or unexported fields
}

ListPublicKeysResponse is the response type for the ListPublicKeys API operation.

func (*ListPublicKeysResponse) SDKResponseMetdata added in v0.9.0

func (r *ListPublicKeysResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListPublicKeys request.

type ListTagsInput

type ListTagsInput struct {

	// Reserved for future use.
	NextToken *string `type:"string"`

	// Specifies a list of trail ARNs whose tags will be listed. The list has a
	// limit of 20 ARNs. The format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// ResourceIdList is a required field
	ResourceIdList []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Specifies a list of trail tags to return. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTagsRequest

func (ListTagsInput) String

func (s ListTagsInput) String() string

String returns the string representation

func (*ListTagsInput) Validate

func (s *ListTagsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListTagsOutput

type ListTagsOutput struct {

	// Reserved for future use.
	NextToken *string `type:"string"`

	// A list of resource tags.
	ResourceTagList []ResourceTag `type:"list"`
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTagsResponse

func (ListTagsOutput) String

func (s ListTagsOutput) String() string

String returns the string representation

type ListTagsRequest

type ListTagsRequest struct {
	*aws.Request
	Input *ListTagsInput
	Copy  func(*ListTagsInput) ListTagsRequest
}

ListTagsRequest is the request type for the ListTags API operation.

func (ListTagsRequest) Send

Send marshals and sends the ListTags API request.

type ListTagsResponse added in v0.9.0

type ListTagsResponse struct {
	*ListTagsOutput
	// contains filtered or unexported fields
}

ListTagsResponse is the response type for the ListTags API operation.

func (*ListTagsResponse) SDKResponseMetdata added in v0.9.0

func (r *ListTagsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListTags request.

type LookupAttribute

type LookupAttribute struct {

	// Specifies an attribute on which to filter the events returned.
	//
	// AttributeKey is a required field
	AttributeKey LookupAttributeKey `type:"string" required:"true" enum:"true"`

	// Specifies a value for the specified AttributeKey.
	//
	// AttributeValue is a required field
	AttributeValue *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Specifies an attribute and value that filter the events returned. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupAttribute

func (LookupAttribute) String

func (s LookupAttribute) String() string

String returns the string representation

func (*LookupAttribute) Validate

func (s *LookupAttribute) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type LookupAttributeKey

type LookupAttributeKey string
const (
	LookupAttributeKeyEventId      LookupAttributeKey = "EventId"
	LookupAttributeKeyEventName    LookupAttributeKey = "EventName"
	LookupAttributeKeyReadOnly     LookupAttributeKey = "ReadOnly"
	LookupAttributeKeyUsername     LookupAttributeKey = "Username"
	LookupAttributeKeyResourceType LookupAttributeKey = "ResourceType"
	LookupAttributeKeyResourceName LookupAttributeKey = "ResourceName"
	LookupAttributeKeyEventSource  LookupAttributeKey = "EventSource"
	LookupAttributeKeyAccessKeyId  LookupAttributeKey = "AccessKeyId"
)

Enum values for LookupAttributeKey

func (LookupAttributeKey) MarshalValue added in v0.3.0

func (enum LookupAttributeKey) MarshalValue() (string, error)

func (LookupAttributeKey) MarshalValueBuf added in v0.3.0

func (enum LookupAttributeKey) MarshalValueBuf(b []byte) ([]byte, error)

type LookupEventsInput

type LookupEventsInput struct {

	// Specifies that only events that occur before or at the specified time are
	// returned. If the specified end time is before the specified start time, an
	// error is returned.
	EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Contains a list of lookup attributes. Currently the list can contain only
	// one item.
	LookupAttributes []LookupAttribute `type:"list"`

	// The number of events to return. Possible values are 1 through 50. The default
	// is 50.
	MaxResults *int64 `min:"1" type:"integer"`

	// The token to use to get the next page of results after a previous API call.
	// This token must be passed in with the same parameters that were specified
	// in the the original call. For example, if the original call specified an
	// AttributeKey of 'Username' with a value of 'root', the call with NextToken
	// should include those same parameters.
	NextToken *string `type:"string"`

	// Specifies that only events that occur after or at the specified time are
	// returned. If the specified start time is after the specified end time, an
	// error is returned.
	StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
	// contains filtered or unexported fields
}

Contains a request for LookupEvents. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEventsRequest

func (LookupEventsInput) String

func (s LookupEventsInput) String() string

String returns the string representation

func (*LookupEventsInput) Validate

func (s *LookupEventsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type LookupEventsOutput

type LookupEventsOutput struct {

	// A list of events returned based on the lookup attributes specified and the
	// CloudTrail event. The events list is sorted by time. The most recent event
	// is listed first.
	Events []Event `type:"list"`

	// The token to use to get the next page of results after a previous API call.
	// If the token does not appear, there are no more results to return. The token
	// must be passed in with the same parameters as the previous call. For example,
	// if the original call specified an AttributeKey of 'Username' with a value
	// of 'root', the call with NextToken should include those same parameters.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

Contains a response to a LookupEvents action. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEventsResponse

func (LookupEventsOutput) String

func (s LookupEventsOutput) String() string

String returns the string representation

type LookupEventsPaginator added in v0.9.0

type LookupEventsPaginator struct {
	aws.Pager
}

LookupEventsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewLookupEventsPaginator added in v0.9.0

func NewLookupEventsPaginator(req LookupEventsRequest) LookupEventsPaginator

NewLookupEventsRequestPaginator returns a paginator for LookupEvents. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

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

// Example iterating over pages.
req := client.LookupEventsRequest(input)
p := cloudtrail.NewLookupEventsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*LookupEventsPaginator) CurrentPage added in v0.9.0

func (p *LookupEventsPaginator) CurrentPage() *LookupEventsOutput

type LookupEventsRequest

type LookupEventsRequest struct {
	*aws.Request
	Input *LookupEventsInput
	Copy  func(*LookupEventsInput) LookupEventsRequest
}

LookupEventsRequest is the request type for the LookupEvents API operation.

func (LookupEventsRequest) Send

Send marshals and sends the LookupEvents API request.

type LookupEventsResponse added in v0.9.0

type LookupEventsResponse struct {
	*LookupEventsOutput
	// contains filtered or unexported fields
}

LookupEventsResponse is the response type for the LookupEvents API operation.

func (*LookupEventsResponse) SDKResponseMetdata added in v0.9.0

func (r *LookupEventsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the LookupEvents request.

type PublicKey

type PublicKey struct {

	// The fingerprint of the public key.
	Fingerprint *string `type:"string"`

	// The ending time of validity of the public key.
	ValidityEndTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// The starting time of validity of the public key.
	ValidityStartTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// The DER encoded public key value in PKCS#1 format.
	//
	// Value is automatically base64 encoded/decoded by the SDK.
	Value []byte `type:"blob"`
	// contains filtered or unexported fields
}

Contains information about a returned public key. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PublicKey

func (PublicKey) String

func (s PublicKey) String() string

String returns the string representation

type PutEventSelectorsInput

type PutEventSelectorsInput struct {

	// Specifies the settings for your event selectors. You can configure up to
	// five event selectors for a trail.
	//
	// EventSelectors is a required field
	EventSelectors []EventSelector `type:"list" required:"true"`

	// Specifies the name of the trail or trail ARN. If you specify a trail name,
	// the string 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)
	//
	// If you specify a trail ARN, it must be in the format:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// TrailName is a required field
	TrailName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectorsRequest

func (PutEventSelectorsInput) String

func (s PutEventSelectorsInput) String() string

String returns the string representation

func (*PutEventSelectorsInput) Validate

func (s *PutEventSelectorsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutEventSelectorsOutput

type PutEventSelectorsOutput struct {

	// Specifies the event selectors configured for your trail.
	EventSelectors []EventSelector `type:"list"`

	// Specifies the ARN of the trail that was updated with event selectors. The
	// format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	TrailARN *string `type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectorsResponse

func (PutEventSelectorsOutput) String

func (s PutEventSelectorsOutput) String() string

String returns the string representation

type PutEventSelectorsRequest

type PutEventSelectorsRequest struct {
	*aws.Request
	Input *PutEventSelectorsInput
	Copy  func(*PutEventSelectorsInput) PutEventSelectorsRequest
}

PutEventSelectorsRequest is the request type for the PutEventSelectors API operation.

func (PutEventSelectorsRequest) Send

Send marshals and sends the PutEventSelectors API request.

type PutEventSelectorsResponse added in v0.9.0

type PutEventSelectorsResponse struct {
	*PutEventSelectorsOutput
	// contains filtered or unexported fields
}

PutEventSelectorsResponse is the response type for the PutEventSelectors API operation.

func (*PutEventSelectorsResponse) SDKResponseMetdata added in v0.9.0

func (r *PutEventSelectorsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the PutEventSelectors request.

type ReadWriteType

type ReadWriteType string
const (
	ReadWriteTypeReadOnly  ReadWriteType = "ReadOnly"
	ReadWriteTypeWriteOnly ReadWriteType = "WriteOnly"
	ReadWriteTypeAll       ReadWriteType = "All"
)

Enum values for ReadWriteType

func (ReadWriteType) MarshalValue added in v0.3.0

func (enum ReadWriteType) MarshalValue() (string, error)

func (ReadWriteType) MarshalValueBuf added in v0.3.0

func (enum ReadWriteType) MarshalValueBuf(b []byte) ([]byte, error)

type RemoveTagsInput

type RemoveTagsInput struct {

	// Specifies the ARN of the trail from which tags should be removed. The format
	// of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// ResourceId is a required field
	ResourceId *string `type:"string" required:"true"`

	// Specifies a list of tags to be removed.
	TagsList []Tag `type:"list"`
	// contains filtered or unexported fields
}

Specifies the tags to remove from a trail. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTagsRequest

func (RemoveTagsInput) String

func (s RemoveTagsInput) String() string

String returns the string representation

func (*RemoveTagsInput) Validate

func (s *RemoveTagsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type RemoveTagsOutput

type RemoveTagsOutput struct {
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTagsResponse

func (RemoveTagsOutput) String

func (s RemoveTagsOutput) String() string

String returns the string representation

type RemoveTagsRequest

type RemoveTagsRequest struct {
	*aws.Request
	Input *RemoveTagsInput
	Copy  func(*RemoveTagsInput) RemoveTagsRequest
}

RemoveTagsRequest is the request type for the RemoveTags API operation.

func (RemoveTagsRequest) Send

Send marshals and sends the RemoveTags API request.

type RemoveTagsResponse added in v0.9.0

type RemoveTagsResponse struct {
	*RemoveTagsOutput
	// contains filtered or unexported fields
}

RemoveTagsResponse is the response type for the RemoveTags API operation.

func (*RemoveTagsResponse) SDKResponseMetdata added in v0.9.0

func (r *RemoveTagsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the RemoveTags request.

type Resource

type Resource struct {

	// The name of the resource referenced by the event returned. These are user-created
	// names whose values will depend on the environment. For example, the resource
	// name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567"
	// for an EC2 Instance.
	ResourceName *string `type:"string"`

	// The type of a resource referenced by the event returned. When the resource
	// type cannot be determined, null is returned. Some examples of resource types
	// are: Instance for EC2, Trail for CloudTrail, DBInstance for RDS, and AccessKey
	// for IAM. For a list of resource types supported for event lookup, see Resource
	// Types Supported for Event Lookup (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/lookup_supported_resourcetypes.html).
	ResourceType *string `type:"string"`
	// contains filtered or unexported fields
}

Specifies the type and name of a resource referenced by an event. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/Resource

func (Resource) String

func (s Resource) String() string

String returns the string representation

type ResourceTag

type ResourceTag struct {

	// Specifies the ARN of the resource.
	ResourceId *string `type:"string"`

	// A list of tags.
	TagsList []Tag `type:"list"`
	// contains filtered or unexported fields
}

A resource tag. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ResourceTag

func (ResourceTag) String

func (s ResourceTag) String() string

String returns the string representation

type StartLoggingInput

type StartLoggingInput struct {

	// Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
	// logs AWS API calls. The format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

The request to CloudTrail to start logging AWS API calls for an account. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLoggingRequest

func (StartLoggingInput) String

func (s StartLoggingInput) String() string

String returns the string representation

func (*StartLoggingInput) Validate

func (s *StartLoggingInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type StartLoggingOutput

type StartLoggingOutput struct {
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLoggingResponse

func (StartLoggingOutput) String

func (s StartLoggingOutput) String() string

String returns the string representation

type StartLoggingRequest

type StartLoggingRequest struct {
	*aws.Request
	Input *StartLoggingInput
	Copy  func(*StartLoggingInput) StartLoggingRequest
}

StartLoggingRequest is the request type for the StartLogging API operation.

func (StartLoggingRequest) Send

Send marshals and sends the StartLogging API request.

type StartLoggingResponse added in v0.9.0

type StartLoggingResponse struct {
	*StartLoggingOutput
	// contains filtered or unexported fields
}

StartLoggingResponse is the response type for the StartLogging API operation.

func (*StartLoggingResponse) SDKResponseMetdata added in v0.9.0

func (r *StartLoggingResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the StartLogging request.

type StopLoggingInput

type StopLoggingInput struct {

	// Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
	// will stop logging AWS API calls. The format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Passes the request to CloudTrail to stop logging AWS API calls for the specified account. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLoggingRequest

func (StopLoggingInput) String

func (s StopLoggingInput) String() string

String returns the string representation

func (*StopLoggingInput) Validate

func (s *StopLoggingInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type StopLoggingOutput

type StopLoggingOutput struct {
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLoggingResponse

func (StopLoggingOutput) String

func (s StopLoggingOutput) String() string

String returns the string representation

type StopLoggingRequest

type StopLoggingRequest struct {
	*aws.Request
	Input *StopLoggingInput
	Copy  func(*StopLoggingInput) StopLoggingRequest
}

StopLoggingRequest is the request type for the StopLogging API operation.

func (StopLoggingRequest) Send

Send marshals and sends the StopLogging API request.

type StopLoggingResponse added in v0.9.0

type StopLoggingResponse struct {
	*StopLoggingOutput
	// contains filtered or unexported fields
}

StopLoggingResponse is the response type for the StopLogging API operation.

func (*StopLoggingResponse) SDKResponseMetdata added in v0.9.0

func (r *StopLoggingResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the StopLogging request.

type Tag

type Tag struct {

	// The key in a key-value pair. The key must be must be no longer than 128 Unicode
	// characters. The key must be unique for the resource to which it applies.
	//
	// Key is a required field
	Key *string `type:"string" required:"true"`

	// The value in a key-value pair of a tag. The value must be no longer than
	// 256 Unicode characters.
	Value *string `type:"string"`
	// contains filtered or unexported fields
}

A custom key-value pair associated with a resource such as a CloudTrail trail. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/Tag

func (Tag) String

func (s Tag) String() string

String returns the string representation

func (*Tag) Validate

func (s *Tag) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Trail

type Trail struct {

	// Specifies an Amazon Resource Name (ARN), a unique identifier that represents
	// the log group to which CloudTrail logs will be delivered.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies if the trail has custom event selectors.
	HasCustomEventSelectors *bool `type:"boolean"`

	// The region in which the trail was created.
	HomeRegion *string `type:"string"`

	// Set to True to include AWS API calls from AWS global services such as IAM.
	// Otherwise, False.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail belongs only to one region or exists in all regions.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is an organization trail.
	IsOrganizationTrail *bool `type:"boolean"`

	// 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-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies whether log file validation is enabled.
	LogFileValidationEnabled *bool `type:"boolean"`

	// Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
	Name *string `type:"string"`

	// Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.
	// See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
	S3BucketName *string `type:"string"`

	// 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 (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).The
	// maximum length is 200 characters.
	S3KeyPrefix *string `type:"string"`

	// 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-2:123456789012:MyTopic
	SnsTopicARN *string `type:"string"`

	// This field is deprecated. Use SnsTopicARN.
	SnsTopicName *string `deprecated:"true" type:"string"`

	// Specifies the ARN of the trail. The format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	TrailARN *string `type:"string"`
	// contains filtered or unexported fields
}

The settings for a trail. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/Trail

func (Trail) String

func (s Trail) String() string

String returns the string representation

type UpdateTrailInput

type UpdateTrailInput struct {

	// 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.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies whether log file validation is enabled. The default is false.
	//
	// When you disable log file integrity validation, the chain of digest files
	// is broken after one hour. CloudTrail will not create digest files for log
	// files that were delivered during a period in which log file integrity validation
	// was disabled. For example, if you enable log file integrity validation at
	// noon on January 1, disable it at noon on January 2, and re-enable it at noon
	// on January 10, digest files will not be created for the log files delivered
	// from noon on January 2 to noon on January 10. The same applies whenever you
	// stop CloudTrail logging or delete a trail.
	EnableLogFileValidation *bool `type:"boolean"`

	// Specifies whether the trail is publishing events from global services such
	// as IAM to the log files.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// 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.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is applied to 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. If the
	// trail is not an organization trail and this is set to true, the trail will
	// be created in all AWS accounts that belong to the organization. If the trail
	// is an organization trail and this is set to false, the trail will remain
	// in the current AWS account but be deleted from all member accounts in the
	// organization.
	IsOrganizationTrail *bool `type:"boolean"`

	// 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.
	//
	// Examples:
	//
	//    * alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	//
	//    * 12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies the name of the trail or trail ARN. If Name is a trail name, the
	// string 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)
	//
	// If Name is a trail ARN, it must be in the format:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// Specifies the name of the Amazon S3 bucket designated for publishing log
	// files. See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
	S3BucketName *string `type:"string"`

	// 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 (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	// The maximum length is 200 characters.
	S3KeyPrefix *string `type:"string"`

	// Specifies the name of the Amazon SNS topic defined for notification of log
	// file delivery. The maximum length is 256 characters.
	SnsTopicName *string `type:"string"`
	// contains filtered or unexported fields
}

Specifies settings to update for the trail. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrailRequest

func (UpdateTrailInput) String

func (s UpdateTrailInput) String() string

String returns the string representation

func (*UpdateTrailInput) Validate

func (s *UpdateTrailInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type UpdateTrailOutput

type UpdateTrailOutput struct {

	// Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
	// logs will be delivered.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies whether the trail is publishing events from global services such
	// as IAM to the log files.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail exists in one region or in all regions.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is an organization trail.
	IsOrganizationTrail *bool `type:"boolean"`

	// 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-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies whether log file integrity validation is enabled.
	LogFileValidationEnabled *bool `type:"boolean"`

	// Specifies the name of the trail.
	Name *string `type:"string"`

	// Specifies the name of the Amazon S3 bucket designated for publishing log
	// files.
	S3BucketName *string `type:"string"`

	// 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 (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	S3KeyPrefix *string `type:"string"`

	// 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-2:123456789012:MyTopic
	SnsTopicARN *string `type:"string"`

	// This field is deprecated. Use SnsTopicARN.
	SnsTopicName *string `deprecated:"true" type:"string"`

	// Specifies the ARN of the trail that was updated. The format of a trail ARN
	// is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	TrailARN *string `type:"string"`
	// contains filtered or unexported fields
}

Returns the objects or data listed below if successful. Otherwise, returns an error. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrailResponse

func (UpdateTrailOutput) String

func (s UpdateTrailOutput) String() string

String returns the string representation

type UpdateTrailRequest

type UpdateTrailRequest struct {
	*aws.Request
	Input *UpdateTrailInput
	Copy  func(*UpdateTrailInput) UpdateTrailRequest
}

UpdateTrailRequest is the request type for the UpdateTrail API operation.

func (UpdateTrailRequest) Send

Send marshals and sends the UpdateTrail API request.

type UpdateTrailResponse added in v0.9.0

type UpdateTrailResponse struct {
	*UpdateTrailOutput
	// contains filtered or unexported fields
}

UpdateTrailResponse is the response type for the UpdateTrail API operation.

func (*UpdateTrailResponse) SDKResponseMetdata added in v0.9.0

func (r *UpdateTrailResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the UpdateTrail request.

Directories

Path Synopsis
Package cloudtrailiface provides an interface to enable mocking the AWS CloudTrail service client for testing your code.
Package cloudtrailiface provides an interface to enable mocking the AWS CloudTrail service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL