cloudtrail - ActiveState ActiveGo 1.8
...

Package cloudtrail

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

Overview ▾

Package cloudtrail provides the client and types for making API requests to AWS 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 the client for AWS CloudTrail you will first need to create a new instance of it.

When creating a client for an AWS service you'll first need to have a Session already created. The Session provides configuration that can be shared between multiple service clients. Additional configuration can be applied to the Session and service's client when they are constructed. The aws package's Config type contains several fields such as Region for the AWS Region the client should make API requests too. The optional Config value can be provided as the variadic argument for Sessions and client creation.

Once the service's client is created you can use it to make API requests the AWS service. These clients are safe to use concurrently.

// Create a session to share configuration, and load external configuration.
sess := session.Must(session.NewSession())

// Create the service's client with the session.
svc := cloudtrail.New(sess)

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

See aws package's Config type for more information on configuration options. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

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

Once the client is created you can make an API request to the service. Each API method takes a input parameter, and returns the service response and an error.

The API method will document which error codes the service can be returned by the operation if the service models the API operation's errors. These errors will also be available as const strings prefixed with "ErrCode".

result, err := svc.AddTags(params)
if err != nil {
    // Cast err to awserr.Error to handle specific error codes.
    aerr, ok := err.(awserr.Error)
    if ok && aerr.Code() == <error code to check for> {
        // Specific error code handling
    }
    return err
}

fmt.Println("AddTags result:")
fmt.Println(result)

Using the Client with Context

The service's client also provides methods to make API requests with a Context value. This allows you to control the timeout, and cancellation of pending requests. These methods also take request Option as variadic parameter to apply additional configuration to the API request.

ctx := context.Background()

result, err := svc.AddTagsWithContext(ctx, params)

See the request package documentation for more information on using Context pattern with the SDK. https://docs.aws.amazon.com/sdk-for-go/api/aws/request/

Index ▾

Constants
type AddTagsInput
    func (s AddTagsInput) GoString() string
    func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput
    func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput
    func (s AddTagsInput) String() string
    func (s *AddTagsInput) Validate() error
type AddTagsOutput
    func (s AddTagsOutput) GoString() string
    func (s AddTagsOutput) String() string
type CloudTrail
    func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudTrail
    func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error)
    func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput)
    func (c *CloudTrail) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error)
    func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error)
    func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput)
    func (c *CloudTrail) CreateTrailWithContext(ctx aws.Context, input *CreateTrailInput, opts ...request.Option) (*CreateTrailOutput, error)
    func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error)
    func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput)
    func (c *CloudTrail) DeleteTrailWithContext(ctx aws.Context, input *DeleteTrailInput, opts ...request.Option) (*DeleteTrailOutput, error)
    func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error)
    func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput)
    func (c *CloudTrail) DescribeTrailsWithContext(ctx aws.Context, input *DescribeTrailsInput, opts ...request.Option) (*DescribeTrailsOutput, error)
    func (c *CloudTrail) GetEventSelectors(input *GetEventSelectorsInput) (*GetEventSelectorsOutput, error)
    func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (req *request.Request, output *GetEventSelectorsOutput)
    func (c *CloudTrail) GetEventSelectorsWithContext(ctx aws.Context, input *GetEventSelectorsInput, opts ...request.Option) (*GetEventSelectorsOutput, error)
    func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error)
    func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput)
    func (c *CloudTrail) GetTrailStatusWithContext(ctx aws.Context, input *GetTrailStatusInput, opts ...request.Option) (*GetTrailStatusOutput, error)
    func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error)
    func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput)
    func (c *CloudTrail) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error)
    func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error)
    func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput)
    func (c *CloudTrail) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error)
    func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error)
    func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool) error
    func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error
    func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput)
    func (c *CloudTrail) LookupEventsWithContext(ctx aws.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error)
    func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error)
    func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (req *request.Request, output *PutEventSelectorsOutput)
    func (c *CloudTrail) PutEventSelectorsWithContext(ctx aws.Context, input *PutEventSelectorsInput, opts ...request.Option) (*PutEventSelectorsOutput, error)
    func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error)
    func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput)
    func (c *CloudTrail) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error)
    func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error)
    func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput)
    func (c *CloudTrail) StartLoggingWithContext(ctx aws.Context, input *StartLoggingInput, opts ...request.Option) (*StartLoggingOutput, error)
    func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error)
    func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput)
    func (c *CloudTrail) StopLoggingWithContext(ctx aws.Context, input *StopLoggingInput, opts ...request.Option) (*StopLoggingOutput, error)
    func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error)
    func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput)
    func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailInput, opts ...request.Option) (*UpdateTrailOutput, error)
type CreateTrailInput
    func (s CreateTrailInput) GoString() string
    func (s *CreateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailInput
    func (s *CreateTrailInput) SetCloudWatchLogsRoleArn(v string) *CreateTrailInput
    func (s *CreateTrailInput) SetEnableLogFileValidation(v bool) *CreateTrailInput
    func (s *CreateTrailInput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailInput
    func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput
    func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput
    func (s *CreateTrailInput) SetName(v string) *CreateTrailInput
    func (s *CreateTrailInput) SetS3BucketName(v string) *CreateTrailInput
    func (s *CreateTrailInput) SetS3KeyPrefix(v string) *CreateTrailInput
    func (s *CreateTrailInput) SetSnsTopicName(v string) *CreateTrailInput
    func (s CreateTrailInput) String() string
    func (s *CreateTrailInput) Validate() error
type CreateTrailOutput
    func (s CreateTrailOutput) GoString() string
    func (s *CreateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailOutput
    func (s *CreateTrailOutput) SetCloudWatchLogsRoleArn(v string) *CreateTrailOutput
    func (s *CreateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailOutput
    func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput
    func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput
    func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput
    func (s *CreateTrailOutput) SetName(v string) *CreateTrailOutput
    func (s *CreateTrailOutput) SetS3BucketName(v string) *CreateTrailOutput
    func (s *CreateTrailOutput) SetS3KeyPrefix(v string) *CreateTrailOutput
    func (s *CreateTrailOutput) SetSnsTopicARN(v string) *CreateTrailOutput
    func (s *CreateTrailOutput) SetSnsTopicName(v string) *CreateTrailOutput
    func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput
    func (s CreateTrailOutput) String() string
type DataResource
    func (s DataResource) GoString() string
    func (s *DataResource) SetType(v string) *DataResource
    func (s *DataResource) SetValues(v []*string) *DataResource
    func (s DataResource) String() string
type DeleteTrailInput
    func (s DeleteTrailInput) GoString() string
    func (s *DeleteTrailInput) SetName(v string) *DeleteTrailInput
    func (s DeleteTrailInput) String() string
    func (s *DeleteTrailInput) Validate() error
type DeleteTrailOutput
    func (s DeleteTrailOutput) GoString() string
    func (s DeleteTrailOutput) String() string
type DescribeTrailsInput
    func (s DescribeTrailsInput) GoString() string
    func (s *DescribeTrailsInput) SetIncludeShadowTrails(v bool) *DescribeTrailsInput
    func (s *DescribeTrailsInput) SetTrailNameList(v []*string) *DescribeTrailsInput
    func (s DescribeTrailsInput) String() string
type DescribeTrailsOutput
    func (s DescribeTrailsOutput) GoString() string
    func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput
    func (s DescribeTrailsOutput) String() string
type Event
    func (s Event) GoString() string
    func (s *Event) SetCloudTrailEvent(v string) *Event
    func (s *Event) SetEventId(v string) *Event
    func (s *Event) SetEventName(v string) *Event
    func (s *Event) SetEventSource(v string) *Event
    func (s *Event) SetEventTime(v time.Time) *Event
    func (s *Event) SetResources(v []*Resource) *Event
    func (s *Event) SetUsername(v string) *Event
    func (s Event) String() string
type EventSelector
    func (s EventSelector) GoString() string
    func (s *EventSelector) SetDataResources(v []*DataResource) *EventSelector
    func (s *EventSelector) SetIncludeManagementEvents(v bool) *EventSelector
    func (s *EventSelector) SetReadWriteType(v string) *EventSelector
    func (s EventSelector) String() string
type GetEventSelectorsInput
    func (s GetEventSelectorsInput) GoString() string
    func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput
    func (s GetEventSelectorsInput) String() string
    func (s *GetEventSelectorsInput) Validate() error
type GetEventSelectorsOutput
    func (s GetEventSelectorsOutput) GoString() string
    func (s *GetEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *GetEventSelectorsOutput
    func (s *GetEventSelectorsOutput) SetTrailARN(v string) *GetEventSelectorsOutput
    func (s GetEventSelectorsOutput) String() string
type GetTrailStatusInput
    func (s GetTrailStatusInput) GoString() string
    func (s *GetTrailStatusInput) SetName(v string) *GetTrailStatusInput
    func (s GetTrailStatusInput) String() string
    func (s *GetTrailStatusInput) Validate() error
type GetTrailStatusOutput
    func (s GetTrailStatusOutput) GoString() string
    func (s *GetTrailStatusOutput) SetIsLogging(v bool) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime(v time.Time) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptTime(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestDeliveryError(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestDeliveryTime(v time.Time) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestDigestDeliveryError(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestDigestDeliveryTime(v time.Time) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestNotificationAttemptTime(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestNotificationError(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetLatestNotificationTime(v time.Time) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetStartLoggingTime(v time.Time) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetStopLoggingTime(v time.Time) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetTimeLoggingStarted(v string) *GetTrailStatusOutput
    func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOutput
    func (s GetTrailStatusOutput) String() string
type ListPublicKeysInput
    func (s ListPublicKeysInput) GoString() string
    func (s *ListPublicKeysInput) SetEndTime(v time.Time) *ListPublicKeysInput
    func (s *ListPublicKeysInput) SetNextToken(v string) *ListPublicKeysInput
    func (s *ListPublicKeysInput) SetStartTime(v time.Time) *ListPublicKeysInput
    func (s ListPublicKeysInput) String() string
type ListPublicKeysOutput
    func (s ListPublicKeysOutput) GoString() string
    func (s *ListPublicKeysOutput) SetNextToken(v string) *ListPublicKeysOutput
    func (s *ListPublicKeysOutput) SetPublicKeyList(v []*PublicKey) *ListPublicKeysOutput
    func (s ListPublicKeysOutput) String() string
type ListTagsInput
    func (s ListTagsInput) GoString() string
    func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput
    func (s *ListTagsInput) SetResourceIdList(v []*string) *ListTagsInput
    func (s ListTagsInput) String() string
    func (s *ListTagsInput) Validate() error
type ListTagsOutput
    func (s ListTagsOutput) GoString() string
    func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput
    func (s *ListTagsOutput) SetResourceTagList(v []*ResourceTag) *ListTagsOutput
    func (s ListTagsOutput) String() string
type LookupAttribute
    func (s LookupAttribute) GoString() string
    func (s *LookupAttribute) SetAttributeKey(v string) *LookupAttribute
    func (s *LookupAttribute) SetAttributeValue(v string) *LookupAttribute
    func (s LookupAttribute) String() string
    func (s *LookupAttribute) Validate() error
type LookupEventsInput
    func (s LookupEventsInput) GoString() string
    func (s *LookupEventsInput) SetEndTime(v time.Time) *LookupEventsInput
    func (s *LookupEventsInput) SetLookupAttributes(v []*LookupAttribute) *LookupEventsInput
    func (s *LookupEventsInput) SetMaxResults(v int64) *LookupEventsInput
    func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput
    func (s *LookupEventsInput) SetStartTime(v time.Time) *LookupEventsInput
    func (s LookupEventsInput) String() string
    func (s *LookupEventsInput) Validate() error
type LookupEventsOutput
    func (s LookupEventsOutput) GoString() string
    func (s *LookupEventsOutput) SetEvents(v []*Event) *LookupEventsOutput
    func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput
    func (s LookupEventsOutput) String() string
type PublicKey
    func (s PublicKey) GoString() string
    func (s *PublicKey) SetFingerprint(v string) *PublicKey
    func (s *PublicKey) SetValidityEndTime(v time.Time) *PublicKey
    func (s *PublicKey) SetValidityStartTime(v time.Time) *PublicKey
    func (s *PublicKey) SetValue(v []byte) *PublicKey
    func (s PublicKey) String() string
type PutEventSelectorsInput
    func (s PutEventSelectorsInput) GoString() string
    func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput
    func (s *PutEventSelectorsInput) SetTrailName(v string) *PutEventSelectorsInput
    func (s PutEventSelectorsInput) String() string
    func (s *PutEventSelectorsInput) Validate() error
type PutEventSelectorsOutput
    func (s PutEventSelectorsOutput) GoString() string
    func (s *PutEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsOutput
    func (s *PutEventSelectorsOutput) SetTrailARN(v string) *PutEventSelectorsOutput
    func (s PutEventSelectorsOutput) String() string
type RemoveTagsInput
    func (s RemoveTagsInput) GoString() string
    func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput
    func (s *RemoveTagsInput) SetTagsList(v []*Tag) *RemoveTagsInput
    func (s RemoveTagsInput) String() string
    func (s *RemoveTagsInput) Validate() error
type RemoveTagsOutput
    func (s RemoveTagsOutput) GoString() string
    func (s RemoveTagsOutput) String() string
type Resource
    func (s Resource) GoString() string
    func (s *Resource) SetResourceName(v string) *Resource
    func (s *Resource) SetResourceType(v string) *Resource
    func (s Resource) String() string
type ResourceTag
    func (s ResourceTag) GoString() string
    func (s *ResourceTag) SetResourceId(v string) *ResourceTag
    func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag
    func (s ResourceTag) String() string
type StartLoggingInput
    func (s StartLoggingInput) GoString() string
    func (s *StartLoggingInput) SetName(v string) *StartLoggingInput
    func (s StartLoggingInput) String() string
    func (s *StartLoggingInput) Validate() error
type StartLoggingOutput
    func (s StartLoggingOutput) GoString() string
    func (s StartLoggingOutput) String() string
type StopLoggingInput
    func (s StopLoggingInput) GoString() string
    func (s *StopLoggingInput) SetName(v string) *StopLoggingInput
    func (s StopLoggingInput) String() string
    func (s *StopLoggingInput) Validate() error
type StopLoggingOutput
    func (s StopLoggingOutput) GoString() string
    func (s StopLoggingOutput) String() string
type Tag
    func (s Tag) GoString() string
    func (s *Tag) SetKey(v string) *Tag
    func (s *Tag) SetValue(v string) *Tag
    func (s Tag) String() string
    func (s *Tag) Validate() error
type Trail
    func (s Trail) GoString() string
    func (s *Trail) SetCloudWatchLogsLogGroupArn(v string) *Trail
    func (s *Trail) SetCloudWatchLogsRoleArn(v string) *Trail
    func (s *Trail) SetHasCustomEventSelectors(v bool) *Trail
    func (s *Trail) SetHomeRegion(v string) *Trail
    func (s *Trail) SetIncludeGlobalServiceEvents(v bool) *Trail
    func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail
    func (s *Trail) SetKmsKeyId(v string) *Trail
    func (s *Trail) SetLogFileValidationEnabled(v bool) *Trail
    func (s *Trail) SetName(v string) *Trail
    func (s *Trail) SetS3BucketName(v string) *Trail
    func (s *Trail) SetS3KeyPrefix(v string) *Trail
    func (s *Trail) SetSnsTopicARN(v string) *Trail
    func (s *Trail) SetSnsTopicName(v string) *Trail
    func (s *Trail) SetTrailARN(v string) *Trail
    func (s Trail) String() string
type UpdateTrailInput
    func (s UpdateTrailInput) GoString() string
    func (s *UpdateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailInput
    func (s *UpdateTrailInput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailInput
    func (s *UpdateTrailInput) SetEnableLogFileValidation(v bool) *UpdateTrailInput
    func (s *UpdateTrailInput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailInput
    func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput
    func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput
    func (s *UpdateTrailInput) SetName(v string) *UpdateTrailInput
    func (s *UpdateTrailInput) SetS3BucketName(v string) *UpdateTrailInput
    func (s *UpdateTrailInput) SetS3KeyPrefix(v string) *UpdateTrailInput
    func (s *UpdateTrailInput) SetSnsTopicName(v string) *UpdateTrailInput
    func (s UpdateTrailInput) String() string
    func (s *UpdateTrailInput) Validate() error
type UpdateTrailOutput
    func (s UpdateTrailOutput) GoString() string
    func (s *UpdateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetLogFileValidationEnabled(v bool) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetName(v string) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetS3BucketName(v string) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetS3KeyPrefix(v string) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetSnsTopicARN(v string) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetSnsTopicName(v string) *UpdateTrailOutput
    func (s *UpdateTrailOutput) SetTrailARN(v string) *UpdateTrailOutput
    func (s UpdateTrailOutput) String() string

Package files

api.go doc.go errors.go service.go

Constants

const (
    // LookupAttributeKeyEventId is a LookupAttributeKey enum value
    LookupAttributeKeyEventId = "EventId"

    // LookupAttributeKeyEventName is a LookupAttributeKey enum value
    LookupAttributeKeyEventName = "EventName"

    // LookupAttributeKeyUsername is a LookupAttributeKey enum value
    LookupAttributeKeyUsername = "Username"

    // LookupAttributeKeyResourceType is a LookupAttributeKey enum value
    LookupAttributeKeyResourceType = "ResourceType"

    // LookupAttributeKeyResourceName is a LookupAttributeKey enum value
    LookupAttributeKeyResourceName = "ResourceName"

    // LookupAttributeKeyEventSource is a LookupAttributeKey enum value
    LookupAttributeKeyEventSource = "EventSource"
)
const (
    // ReadWriteTypeReadOnly is a ReadWriteType enum value
    ReadWriteTypeReadOnly = "ReadOnly"

    // ReadWriteTypeWriteOnly is a ReadWriteType enum value
    ReadWriteTypeWriteOnly = "WriteOnly"

    // ReadWriteTypeAll is a ReadWriteType enum value
    ReadWriteTypeAll = "All"
)
const (

    // ErrCodeARNInvalidException for service response error code
    // "ARNInvalidException".
    //
    // 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-1:123456789012:trail/MyTrail
    ErrCodeARNInvalidException = "ARNInvalidException"

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

    // 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
    // an invalid number of event selectors, data resources, or an invalid value
    // for a parameter:
    //
    //    * 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.
    //
    //    * 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"

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

    // 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"
)

Service information constants

const (
    ServiceName = "cloudtrail" // Service endpoint prefix API calls made to.
    EndpointsID = ServiceName  // Service ID for Regions and Endpoints metadata.
)

type AddTagsInput

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

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-1: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
}

func (AddTagsInput) GoString

func (s AddTagsInput) GoString() string

GoString returns the string representation

func (*AddTagsInput) SetResourceId

func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput

SetResourceId sets the ResourceId field's value.

func (*AddTagsInput) SetTagsList

func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput

SetTagsList sets the TagsList field's value.

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

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

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

func (AddTagsOutput) GoString

func (s AddTagsOutput) GoString() string

GoString returns the string representation

func (AddTagsOutput) String

func (s AddTagsOutput) String() string

String returns the string representation

type CloudTrail

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

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

type CloudTrail struct {
    *client.Client
}

func New

func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudTrail

New creates a new instance of the CloudTrail client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

// Create a CloudTrail client from just a session.
svc := cloudtrail.New(mySession)

// Create a CloudTrail client with additional configuration
svc := cloudtrail.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*CloudTrail) AddTags

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

AddTags API operation for AWS CloudTrail.

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

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

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

Returned Error Codes:

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

* ErrCodeARNInvalidException "ARNInvalidException"
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-1:123456789012:trail/MyTrail

* ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException"
This exception is thrown when the specified resource type is not supported
by CloudTrail.

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

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

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

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

func (*CloudTrail) AddTagsRequest

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

AddTagsRequest generates a "aws/request.Request" representing the client's request for the AddTags operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See AddTags for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the AddTags method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the AddTagsRequest method.
req, resp := client.AddTagsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) AddTagsWithContext

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

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

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

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

func (*CloudTrail) CreateTrail

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

CreateTrail API operation for AWS CloudTrail.

Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.

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

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

Returned Error Codes:

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

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

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

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

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

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

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

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

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

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

* ErrCodeTrailNotProvidedException "TrailNotProvidedException"
This exception is deprecated.

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

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

* ErrCodeKmsKeyDisabledException "KmsKeyDisabledException"
This exception is deprecated.

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

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

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

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

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

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

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

func (*CloudTrail) CreateTrailRequest

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

CreateTrailRequest generates a "aws/request.Request" representing the client's request for the CreateTrail operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See CreateTrail for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the CreateTrail method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the CreateTrailRequest method.
req, resp := client.CreateTrailRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) CreateTrailWithContext

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

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

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

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

func (*CloudTrail) DeleteTrail

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

DeleteTrail API operation for AWS CloudTrail.

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

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

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

Returned Error Codes:

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

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

func (*CloudTrail) DeleteTrailRequest

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

DeleteTrailRequest generates a "aws/request.Request" representing the client's request for the DeleteTrail operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DeleteTrail for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DeleteTrail method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DeleteTrailRequest method.
req, resp := client.DeleteTrailRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) DeleteTrailWithContext

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

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

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

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

func (*CloudTrail) DescribeTrails

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

DescribeTrails API operation for AWS CloudTrail.

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

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

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

Returned Error Codes:

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

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

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

func (*CloudTrail) DescribeTrailsRequest

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

DescribeTrailsRequest generates a "aws/request.Request" representing the client's request for the DescribeTrails operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeTrails for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeTrails method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeTrailsRequest method.
req, resp := client.DescribeTrailsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) DescribeTrailsWithContext

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

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

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

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

func (*CloudTrail) GetEventSelectors

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

GetEventSelectors API operation for AWS CloudTrail.

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

* The S3 objects that you are logging for data events.

* If your event selector includes management events.

* If your event selector includes read-only events, write-only events,
or all.

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.

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

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

Returned Error Codes:

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

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

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

func (*CloudTrail) GetEventSelectorsRequest

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

GetEventSelectorsRequest generates a "aws/request.Request" representing the client's request for the GetEventSelectors operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See GetEventSelectors for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the GetEventSelectors method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the GetEventSelectorsRequest method.
req, resp := client.GetEventSelectorsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) GetEventSelectorsWithContext

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

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

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

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

func (*CloudTrail) GetTrailStatus

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

GetTrailStatus API operation for AWS CloudTrail.

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

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

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

Returned Error Codes:

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

func (*CloudTrail) GetTrailStatusRequest

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

GetTrailStatusRequest generates a "aws/request.Request" representing the client's request for the GetTrailStatus operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See GetTrailStatus for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the GetTrailStatus method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the GetTrailStatusRequest method.
req, resp := client.GetTrailStatusRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) GetTrailStatusWithContext

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

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

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

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

func (*CloudTrail) ListPublicKeys

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

ListPublicKeys API operation for AWS CloudTrail.

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

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

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

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

Returned Error Codes:

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

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

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

* ErrCodeInvalidTokenException "InvalidTokenException"
Reserved for future use.

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

func (*CloudTrail) ListPublicKeysRequest

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

ListPublicKeysRequest generates a "aws/request.Request" representing the client's request for the ListPublicKeys operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See ListPublicKeys for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the ListPublicKeys method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the ListPublicKeysRequest method.
req, resp := client.ListPublicKeysRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) ListPublicKeysWithContext

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

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

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

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

func (*CloudTrail) ListTags

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

ListTags API operation for AWS CloudTrail.

Lists the tags for the trail in the current region.

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

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

Returned Error Codes:

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

* ErrCodeARNInvalidException "ARNInvalidException"
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-1:123456789012:trail/MyTrail

* ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException"
This exception is thrown when the specified resource type is not supported
by CloudTrail.

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

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

* ErrCodeInvalidTokenException "InvalidTokenException"
Reserved for future use.

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

func (*CloudTrail) ListTagsRequest

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

ListTagsRequest generates a "aws/request.Request" representing the client's request for the ListTags operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See ListTags for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the ListTags method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the ListTagsRequest method.
req, resp := client.ListTagsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) ListTagsWithContext

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

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

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

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

func (*CloudTrail) LookupEvents

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

LookupEvents API operation for AWS CloudTrail.

Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account. Events for a region can be looked up for the times in which you had CloudTrail turned on in that region during the last seven days. Lookup supports the following attributes:

* Event ID

* Event name

* Event source

* Resource name

* Resource type

* User name

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

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

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

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

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

Returned Error Codes:

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

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

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

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

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

func (*CloudTrail) LookupEventsPages

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

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

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

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

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

func (*CloudTrail) LookupEventsPagesWithContext

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

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

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

func (*CloudTrail) LookupEventsRequest

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

LookupEventsRequest generates a "aws/request.Request" representing the client's request for the LookupEvents operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See LookupEvents for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the LookupEvents method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the LookupEventsRequest method.
req, resp := client.LookupEventsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) LookupEventsWithContext

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

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

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

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

func (*CloudTrail) PutEventSelectors

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

PutEventSelectors API operation for AWS CloudTrail.

Configures an event selector for your trail. Use event selectors to specify whether you want your trail to log management and/or 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) in the AWS CloudTrail User Guide.

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

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

Returned Error Codes:

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

* ErrCodeInvalidEventSelectorsException "InvalidEventSelectorsException"
This exception is thrown when the PutEventSelectors operation is called with
an invalid number of event selectors, data resources, or an invalid value
for a parameter:

   * 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.

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

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

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

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

func (*CloudTrail) PutEventSelectorsRequest

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

PutEventSelectorsRequest generates a "aws/request.Request" representing the client's request for the PutEventSelectors operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See PutEventSelectors for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the PutEventSelectors method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the PutEventSelectorsRequest method.
req, resp := client.PutEventSelectorsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) PutEventSelectorsWithContext

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

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

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

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

func (*CloudTrail) RemoveTags

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

RemoveTags API operation for AWS CloudTrail.

Removes the specified tags from a trail.

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

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

Returned Error Codes:

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

* ErrCodeARNInvalidException "ARNInvalidException"
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-1:123456789012:trail/MyTrail

* ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException"
This exception is thrown when the specified resource type is not supported
by CloudTrail.

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

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

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

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

func (*CloudTrail) RemoveTagsRequest

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

RemoveTagsRequest generates a "aws/request.Request" representing the client's request for the RemoveTags operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See RemoveTags for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the RemoveTags method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the RemoveTagsRequest method.
req, resp := client.RemoveTagsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) RemoveTagsWithContext

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

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

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

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

func (*CloudTrail) StartLogging

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

StartLogging API operation for AWS CloudTrail.

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

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

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

Returned Error Codes:

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

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

func (*CloudTrail) StartLoggingRequest

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

StartLoggingRequest generates a "aws/request.Request" representing the client's request for the StartLogging operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See StartLogging for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the StartLogging method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the StartLoggingRequest method.
req, resp := client.StartLoggingRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) StartLoggingWithContext

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

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

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

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

func (*CloudTrail) StopLogging

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

StopLogging API operation for AWS CloudTrail.

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

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

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

Returned Error Codes:

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

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

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

func (*CloudTrail) StopLoggingRequest

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

StopLoggingRequest generates a "aws/request.Request" representing the client's request for the StopLogging operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See StopLogging for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the StopLogging method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the StopLoggingRequest method.
req, resp := client.StopLoggingRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) StopLoggingWithContext

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

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

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

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

func (*CloudTrail) UpdateTrail

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

UpdateTrail API operation for AWS CloudTrail.

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

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

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

Returned Error Codes:

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

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

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

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

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

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

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

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

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

* ErrCodeInvalidTrailNameException "InvalidTrailNameException"
This exception is thrown when the provided trail name is not valid. Trail
names must meet the following requirements:

   * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   (_), or dashes (-)

   * Start with a letter or number, and end with a letter or number

   * Be between 3 and 128 characters

   * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   and my--namespace are invalid.

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

* ErrCodeTrailNotProvidedException "TrailNotProvidedException"
This exception is deprecated.

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

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

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

* ErrCodeKmsKeyDisabledException "KmsKeyDisabledException"
This exception is deprecated.

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

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

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

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

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

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

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

func (*CloudTrail) UpdateTrailRequest

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

UpdateTrailRequest generates a "aws/request.Request" representing the client's request for the UpdateTrail operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See UpdateTrail for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the UpdateTrail method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the UpdateTrailRequest method.
req, resp := client.UpdateTrailRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

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

func (*CloudTrail) UpdateTrailWithContext

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

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

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

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

type CreateTrailInput

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

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 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-1:123456789012:alias/MyAliasName
    //
    //    * arn:aws:kms:us-east-1: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
}

func (CreateTrailInput) GoString

func (s CreateTrailInput) GoString() string

GoString returns the string representation

func (*CreateTrailInput) SetCloudWatchLogsLogGroupArn

func (s *CreateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailInput

SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.

func (*CreateTrailInput) SetCloudWatchLogsRoleArn

func (s *CreateTrailInput) SetCloudWatchLogsRoleArn(v string) *CreateTrailInput

SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.

func (*CreateTrailInput) SetEnableLogFileValidation

func (s *CreateTrailInput) SetEnableLogFileValidation(v bool) *CreateTrailInput

SetEnableLogFileValidation sets the EnableLogFileValidation field's value.

func (*CreateTrailInput) SetIncludeGlobalServiceEvents

func (s *CreateTrailInput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailInput

SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.

func (*CreateTrailInput) SetIsMultiRegionTrail

func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput

SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.

func (*CreateTrailInput) SetKmsKeyId

func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput

SetKmsKeyId sets the KmsKeyId field's value.

func (*CreateTrailInput) SetName

func (s *CreateTrailInput) SetName(v string) *CreateTrailInput

SetName sets the Name field's value.

func (*CreateTrailInput) SetS3BucketName

func (s *CreateTrailInput) SetS3BucketName(v string) *CreateTrailInput

SetS3BucketName sets the S3BucketName field's value.

func (*CreateTrailInput) SetS3KeyPrefix

func (s *CreateTrailInput) SetS3KeyPrefix(v string) *CreateTrailInput

SetS3KeyPrefix sets the S3KeyPrefix field's value.

func (*CreateTrailInput) SetSnsTopicName

func (s *CreateTrailInput) SetSnsTopicName(v string) *CreateTrailInput

SetSnsTopicName sets the SnsTopicName field's value.

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

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

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 the KMS key ID that encrypts the logs delivered by CloudTrail.
    // The value is a fully specified ARN to a KMS key in the format:
    //
    // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
    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-1: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-1:123456789012:trail/MyTrail
    TrailARN *string `type:"string"`
    // contains filtered or unexported fields
}

func (CreateTrailOutput) GoString

func (s CreateTrailOutput) GoString() string

GoString returns the string representation

func (*CreateTrailOutput) SetCloudWatchLogsLogGroupArn

func (s *CreateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailOutput

SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.

func (*CreateTrailOutput) SetCloudWatchLogsRoleArn

func (s *CreateTrailOutput) SetCloudWatchLogsRoleArn(v string) *CreateTrailOutput

SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.

func (*CreateTrailOutput) SetIncludeGlobalServiceEvents

func (s *CreateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailOutput

SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.

func (*CreateTrailOutput) SetIsMultiRegionTrail

func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput

SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.

func (*CreateTrailOutput) SetKmsKeyId

func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput

SetKmsKeyId sets the KmsKeyId field's value.

func (*CreateTrailOutput) SetLogFileValidationEnabled

func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput

SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.

func (*CreateTrailOutput) SetName

func (s *CreateTrailOutput) SetName(v string) *CreateTrailOutput

SetName sets the Name field's value.

func (*CreateTrailOutput) SetS3BucketName

func (s *CreateTrailOutput) SetS3BucketName(v string) *CreateTrailOutput

SetS3BucketName sets the S3BucketName field's value.

func (*CreateTrailOutput) SetS3KeyPrefix

func (s *CreateTrailOutput) SetS3KeyPrefix(v string) *CreateTrailOutput

SetS3KeyPrefix sets the S3KeyPrefix field's value.

func (*CreateTrailOutput) SetSnsTopicARN

func (s *CreateTrailOutput) SetSnsTopicARN(v string) *CreateTrailOutput

SetSnsTopicARN sets the SnsTopicARN field's value.

func (*CreateTrailOutput) SetSnsTopicName

func (s *CreateTrailOutput) SetSnsTopicName(v string) *CreateTrailOutput

SetSnsTopicName sets the SnsTopicName field's value.

func (*CreateTrailOutput) SetTrailARN

func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput

SetTrailARN sets the TrailARN field's value.

func (CreateTrailOutput) String

func (s CreateTrailOutput) String() string

String returns the string representation

type DataResource

The Amazon S3 objects that you specify in your event selectors for your trail to log data events. Data events are object-level API operations that access S3 objects, such as GetObject, DeleteObject, and PutObject. You can specify up to 250 S3 buckets and object prefixes for a trail.

Example

You create an event selector for a trail and specify an S3 bucket and an empty prefix, such as arn:aws:s3:::bucket-1/.

You upload an image file to bucket-1.

The PutObject API operation occurs on an object in the S3 bucket that you specified in the event selector. The trail processes and logs the event.

You upload another image file to a different S3 bucket named arn:aws:s3:::bucket-2.

The event occurs on an object in an S3 bucket that you didn't specify in the event selector. The trail doesn’t log the event. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DataResource

type DataResource struct {

    // The resource type in which you want to log data events. You can specify only
    // the following value: AWS::S3::Object.
    Type *string `type:"string"`

    // A list of ARN-like strings for the specified S3 objects.
    //
    // 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.
    Values []*string `type:"list"`
    // contains filtered or unexported fields
}

func (DataResource) GoString

func (s DataResource) GoString() string

GoString returns the string representation

func (*DataResource) SetType

func (s *DataResource) SetType(v string) *DataResource

SetType sets the Type field's value.

func (*DataResource) SetValues

func (s *DataResource) SetValues(v []*string) *DataResource

SetValues sets the Values field's value.

func (DataResource) String

func (s DataResource) String() string

String returns the string representation

type DeleteTrailInput

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

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-1:123456789012:trail/MyTrail
    //
    // Name is a required field
    Name *string `type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (DeleteTrailInput) GoString

func (s DeleteTrailInput) GoString() string

GoString returns the string representation

func (*DeleteTrailInput) SetName

func (s *DeleteTrailInput) SetName(v string) *DeleteTrailInput

SetName sets the Name field's value.

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

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

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

func (DeleteTrailOutput) GoString

func (s DeleteTrailOutput) GoString() string

GoString returns the string representation

func (DeleteTrailOutput) String

func (s DeleteTrailOutput) String() string

String returns the string representation

type DescribeTrailsInput

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

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. 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-1: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
}

func (DescribeTrailsInput) GoString

func (s DescribeTrailsInput) GoString() string

GoString returns the string representation

func (*DescribeTrailsInput) SetIncludeShadowTrails

func (s *DescribeTrailsInput) SetIncludeShadowTrails(v bool) *DescribeTrailsInput

SetIncludeShadowTrails sets the IncludeShadowTrails field's value.

func (*DescribeTrailsInput) SetTrailNameList

func (s *DescribeTrailsInput) SetTrailNameList(v []*string) *DescribeTrailsInput

SetTrailNameList sets the TrailNameList field's value.

func (DescribeTrailsInput) String

func (s DescribeTrailsInput) String() string

String returns the string representation

type DescribeTrailsOutput

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

type DescribeTrailsOutput struct {

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

func (DescribeTrailsOutput) GoString

func (s DescribeTrailsOutput) GoString() string

GoString returns the string representation

func (*DescribeTrailsOutput) SetTrailList

func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput

SetTrailList sets the TrailList field's value.

func (DescribeTrailsOutput) String

func (s DescribeTrailsOutput) String() string

String returns the string representation

type Event

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

type Event struct {

    // 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"`

    // 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
}

func (Event) GoString

func (s Event) GoString() string

GoString returns the string representation

func (*Event) SetCloudTrailEvent

func (s *Event) SetCloudTrailEvent(v string) *Event

SetCloudTrailEvent sets the CloudTrailEvent field's value.

func (*Event) SetEventId

func (s *Event) SetEventId(v string) *Event

SetEventId sets the EventId field's value.

func (*Event) SetEventName

func (s *Event) SetEventName(v string) *Event

SetEventName sets the EventName field's value.

func (*Event) SetEventSource

func (s *Event) SetEventSource(v string) *Event

SetEventSource sets the EventSource field's value.

func (*Event) SetEventTime

func (s *Event) SetEventTime(v time.Time) *Event

SetEventTime sets the EventTime field's value.

func (*Event) SetResources

func (s *Event) SetResources(v []*Resource) *Event

SetResources sets the Resources field's value.

func (*Event) SetUsername

func (s *Event) SetUsername(v string) *Event

SetUsername sets the Username field's value.

func (Event) String

func (s Event) String() string

String returns the string representation

type EventSelector

Use event selectors to specify whether you want your trail to log management and/or 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

type EventSelector struct {

    // CloudTrail supports logging only data events for S3 objects. You can specify
    // up to 250 S3 buckets and object prefixes for a trail.
    //
    // 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)
    // 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 *string `type:"string" enum:"ReadWriteType"`
    // contains filtered or unexported fields
}

func (EventSelector) GoString

func (s EventSelector) GoString() string

GoString returns the string representation

func (*EventSelector) SetDataResources

func (s *EventSelector) SetDataResources(v []*DataResource) *EventSelector

SetDataResources sets the DataResources field's value.

func (*EventSelector) SetIncludeManagementEvents

func (s *EventSelector) SetIncludeManagementEvents(v bool) *EventSelector

SetIncludeManagementEvents sets the IncludeManagementEvents field's value.

func (*EventSelector) SetReadWriteType

func (s *EventSelector) SetReadWriteType(v string) *EventSelector

SetReadWriteType sets the ReadWriteType field's value.

func (EventSelector) String

func (s EventSelector) String() string

String returns the string representation

type GetEventSelectorsInput

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

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 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-1:123456789012:trail/MyTrail
    //
    // TrailName is a required field
    TrailName *string `type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (GetEventSelectorsInput) GoString

func (s GetEventSelectorsInput) GoString() string

GoString returns the string representation

func (*GetEventSelectorsInput) SetTrailName

func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput

SetTrailName sets the TrailName field's value.

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

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

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
}

func (GetEventSelectorsOutput) GoString

func (s GetEventSelectorsOutput) GoString() string

GoString returns the string representation

func (*GetEventSelectorsOutput) SetEventSelectors

func (s *GetEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *GetEventSelectorsOutput

SetEventSelectors sets the EventSelectors field's value.

func (*GetEventSelectorsOutput) SetTrailARN

func (s *GetEventSelectorsOutput) SetTrailARN(v string) *GetEventSelectorsOutput

SetTrailARN sets the TrailARN field's value.

func (GetEventSelectorsOutput) String

func (s GetEventSelectorsOutput) String() string

String returns the string representation

type GetTrailStatusInput

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

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-1:123456789012:trail/MyTrail
    //
    // Name is a required field
    Name *string `type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (GetTrailStatusInput) GoString

func (s GetTrailStatusInput) GoString() string

GoString returns the string representation

func (*GetTrailStatusInput) SetName

func (s *GetTrailStatusInput) SetName(v string) *GetTrailStatusInput

SetName sets the Name field's value.

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

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

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
}

func (GetTrailStatusOutput) GoString

func (s GetTrailStatusOutput) GoString() string

GoString returns the string representation

func (*GetTrailStatusOutput) SetIsLogging

func (s *GetTrailStatusOutput) SetIsLogging(v bool) *GetTrailStatusOutput

SetIsLogging sets the IsLogging field's value.

func (*GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError

func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError(v string) *GetTrailStatusOutput

SetLatestCloudWatchLogsDeliveryError sets the LatestCloudWatchLogsDeliveryError field's value.

func (*GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime

func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime(v time.Time) *GetTrailStatusOutput

SetLatestCloudWatchLogsDeliveryTime sets the LatestCloudWatchLogsDeliveryTime field's value.

func (*GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded

func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded(v string) *GetTrailStatusOutput

SetLatestDeliveryAttemptSucceeded sets the LatestDeliveryAttemptSucceeded field's value.

func (*GetTrailStatusOutput) SetLatestDeliveryAttemptTime

func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptTime(v string) *GetTrailStatusOutput

SetLatestDeliveryAttemptTime sets the LatestDeliveryAttemptTime field's value.

func (*GetTrailStatusOutput) SetLatestDeliveryError

func (s *GetTrailStatusOutput) SetLatestDeliveryError(v string) *GetTrailStatusOutput

SetLatestDeliveryError sets the LatestDeliveryError field's value.

func (*GetTrailStatusOutput) SetLatestDeliveryTime

func (s *GetTrailStatusOutput) SetLatestDeliveryTime(v time.Time) *GetTrailStatusOutput

SetLatestDeliveryTime sets the LatestDeliveryTime field's value.

func (*GetTrailStatusOutput) SetLatestDigestDeliveryError

func (s *GetTrailStatusOutput) SetLatestDigestDeliveryError(v string) *GetTrailStatusOutput

SetLatestDigestDeliveryError sets the LatestDigestDeliveryError field's value.

func (*GetTrailStatusOutput) SetLatestDigestDeliveryTime

func (s *GetTrailStatusOutput) SetLatestDigestDeliveryTime(v time.Time) *GetTrailStatusOutput

SetLatestDigestDeliveryTime sets the LatestDigestDeliveryTime field's value.

func (*GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded

func (s *GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded(v string) *GetTrailStatusOutput

SetLatestNotificationAttemptSucceeded sets the LatestNotificationAttemptSucceeded field's value.

func (*GetTrailStatusOutput) SetLatestNotificationAttemptTime

func (s *GetTrailStatusOutput) SetLatestNotificationAttemptTime(v string) *GetTrailStatusOutput

SetLatestNotificationAttemptTime sets the LatestNotificationAttemptTime field's value.

func (*GetTrailStatusOutput) SetLatestNotificationError

func (s *GetTrailStatusOutput) SetLatestNotificationError(v string) *GetTrailStatusOutput

SetLatestNotificationError sets the LatestNotificationError field's value.

func (*GetTrailStatusOutput) SetLatestNotificationTime

func (s *GetTrailStatusOutput) SetLatestNotificationTime(v time.Time) *GetTrailStatusOutput

SetLatestNotificationTime sets the LatestNotificationTime field's value.

func (*GetTrailStatusOutput) SetStartLoggingTime

func (s *GetTrailStatusOutput) SetStartLoggingTime(v time.Time) *GetTrailStatusOutput

SetStartLoggingTime sets the StartLoggingTime field's value.

func (*GetTrailStatusOutput) SetStopLoggingTime

func (s *GetTrailStatusOutput) SetStopLoggingTime(v time.Time) *GetTrailStatusOutput

SetStopLoggingTime sets the StopLoggingTime field's value.

func (*GetTrailStatusOutput) SetTimeLoggingStarted

func (s *GetTrailStatusOutput) SetTimeLoggingStarted(v string) *GetTrailStatusOutput

SetTimeLoggingStarted sets the TimeLoggingStarted field's value.

func (*GetTrailStatusOutput) SetTimeLoggingStopped

func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOutput

SetTimeLoggingStopped sets the TimeLoggingStopped field's value.

func (GetTrailStatusOutput) String

func (s GetTrailStatusOutput) String() string

String returns the string representation

type ListPublicKeysInput

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

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
}

func (ListPublicKeysInput) GoString

func (s ListPublicKeysInput) GoString() string

GoString returns the string representation

func (*ListPublicKeysInput) SetEndTime

func (s *ListPublicKeysInput) SetEndTime(v time.Time) *ListPublicKeysInput

SetEndTime sets the EndTime field's value.

func (*ListPublicKeysInput) SetNextToken

func (s *ListPublicKeysInput) SetNextToken(v string) *ListPublicKeysInput

SetNextToken sets the NextToken field's value.

func (*ListPublicKeysInput) SetStartTime

func (s *ListPublicKeysInput) SetStartTime(v time.Time) *ListPublicKeysInput

SetStartTime sets the StartTime field's value.

func (ListPublicKeysInput) String

func (s ListPublicKeysInput) String() string

String returns the string representation

type ListPublicKeysOutput

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

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
}

func (ListPublicKeysOutput) GoString

func (s ListPublicKeysOutput) GoString() string

GoString returns the string representation

func (*ListPublicKeysOutput) SetNextToken

func (s *ListPublicKeysOutput) SetNextToken(v string) *ListPublicKeysOutput

SetNextToken sets the NextToken field's value.

func (*ListPublicKeysOutput) SetPublicKeyList

func (s *ListPublicKeysOutput) SetPublicKeyList(v []*PublicKey) *ListPublicKeysOutput

SetPublicKeyList sets the PublicKeyList field's value.

func (ListPublicKeysOutput) String

func (s ListPublicKeysOutput) String() string

String returns the string representation

type ListTagsInput

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

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-1:123456789012:trail/MyTrail
    //
    // ResourceIdList is a required field
    ResourceIdList []*string `type:"list" required:"true"`
    // contains filtered or unexported fields
}

func (ListTagsInput) GoString

func (s ListTagsInput) GoString() string

GoString returns the string representation

func (*ListTagsInput) SetNextToken

func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput

SetNextToken sets the NextToken field's value.

func (*ListTagsInput) SetResourceIdList

func (s *ListTagsInput) SetResourceIdList(v []*string) *ListTagsInput

SetResourceIdList sets the ResourceIdList field's value.

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

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

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
}

func (ListTagsOutput) GoString

func (s ListTagsOutput) GoString() string

GoString returns the string representation

func (*ListTagsOutput) SetNextToken

func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput

SetNextToken sets the NextToken field's value.

func (*ListTagsOutput) SetResourceTagList

func (s *ListTagsOutput) SetResourceTagList(v []*ResourceTag) *ListTagsOutput

SetResourceTagList sets the ResourceTagList field's value.

func (ListTagsOutput) String

func (s ListTagsOutput) String() string

String returns the string representation

type LookupAttribute

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

type LookupAttribute struct {

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

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

func (LookupAttribute) GoString

func (s LookupAttribute) GoString() string

GoString returns the string representation

func (*LookupAttribute) SetAttributeKey

func (s *LookupAttribute) SetAttributeKey(v string) *LookupAttribute

SetAttributeKey sets the AttributeKey field's value.

func (*LookupAttribute) SetAttributeValue

func (s *LookupAttribute) SetAttributeValue(v string) *LookupAttribute

SetAttributeValue sets the AttributeValue field's value.

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 LookupEventsInput

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

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 10.
    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
}

func (LookupEventsInput) GoString

func (s LookupEventsInput) GoString() string

GoString returns the string representation

func (*LookupEventsInput) SetEndTime

func (s *LookupEventsInput) SetEndTime(v time.Time) *LookupEventsInput

SetEndTime sets the EndTime field's value.

func (*LookupEventsInput) SetLookupAttributes

func (s *LookupEventsInput) SetLookupAttributes(v []*LookupAttribute) *LookupEventsInput

SetLookupAttributes sets the LookupAttributes field's value.

func (*LookupEventsInput) SetMaxResults

func (s *LookupEventsInput) SetMaxResults(v int64) *LookupEventsInput

SetMaxResults sets the MaxResults field's value.

func (*LookupEventsInput) SetNextToken

func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput

SetNextToken sets the NextToken field's value.

func (*LookupEventsInput) SetStartTime

func (s *LookupEventsInput) SetStartTime(v time.Time) *LookupEventsInput

SetStartTime sets the StartTime field's value.

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

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

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
}

func (LookupEventsOutput) GoString

func (s LookupEventsOutput) GoString() string

GoString returns the string representation

func (*LookupEventsOutput) SetEvents

func (s *LookupEventsOutput) SetEvents(v []*Event) *LookupEventsOutput

SetEvents sets the Events field's value.

func (*LookupEventsOutput) SetNextToken

func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput

SetNextToken sets the NextToken field's value.

func (LookupEventsOutput) String

func (s LookupEventsOutput) String() string

String returns the string representation

type PublicKey

Contains information about a returned public key. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/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
}

func (PublicKey) GoString

func (s PublicKey) GoString() string

GoString returns the string representation

func (*PublicKey) SetFingerprint

func (s *PublicKey) SetFingerprint(v string) *PublicKey

SetFingerprint sets the Fingerprint field's value.

func (*PublicKey) SetValidityEndTime

func (s *PublicKey) SetValidityEndTime(v time.Time) *PublicKey

SetValidityEndTime sets the ValidityEndTime field's value.

func (*PublicKey) SetValidityStartTime

func (s *PublicKey) SetValidityStartTime(v time.Time) *PublicKey

SetValidityStartTime sets the ValidityStartTime field's value.

func (*PublicKey) SetValue

func (s *PublicKey) SetValue(v []byte) *PublicKey

SetValue sets the Value field's value.

func (PublicKey) String

func (s PublicKey) String() string

String returns the string representation

type PutEventSelectorsInput

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

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-1:123456789012:trail/MyTrail
    //
    // TrailName is a required field
    TrailName *string `type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (PutEventSelectorsInput) GoString

func (s PutEventSelectorsInput) GoString() string

GoString returns the string representation

func (*PutEventSelectorsInput) SetEventSelectors

func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput

SetEventSelectors sets the EventSelectors field's value.

func (*PutEventSelectorsInput) SetTrailName

func (s *PutEventSelectorsInput) SetTrailName(v string) *PutEventSelectorsInput

SetTrailName sets the TrailName field's value.

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

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

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-1:123456789012:trail/MyTrail
    TrailARN *string `type:"string"`
    // contains filtered or unexported fields
}

func (PutEventSelectorsOutput) GoString

func (s PutEventSelectorsOutput) GoString() string

GoString returns the string representation

func (*PutEventSelectorsOutput) SetEventSelectors

func (s *PutEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsOutput

SetEventSelectors sets the EventSelectors field's value.

func (*PutEventSelectorsOutput) SetTrailARN

func (s *PutEventSelectorsOutput) SetTrailARN(v string) *PutEventSelectorsOutput

SetTrailARN sets the TrailARN field's value.

func (PutEventSelectorsOutput) String

func (s PutEventSelectorsOutput) String() string

String returns the string representation

type RemoveTagsInput

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

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-1: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
}

func (RemoveTagsInput) GoString

func (s RemoveTagsInput) GoString() string

GoString returns the string representation

func (*RemoveTagsInput) SetResourceId

func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput

SetResourceId sets the ResourceId field's value.

func (*RemoveTagsInput) SetTagsList

func (s *RemoveTagsInput) SetTagsList(v []*Tag) *RemoveTagsInput

SetTagsList sets the TagsList field's value.

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

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

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

func (RemoveTagsOutput) GoString

func (s RemoveTagsOutput) GoString() string

GoString returns the string representation

func (RemoveTagsOutput) String

func (s RemoveTagsOutput) String() string

String returns the string representation

type Resource

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

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
}

func (Resource) GoString

func (s Resource) GoString() string

GoString returns the string representation

func (*Resource) SetResourceName

func (s *Resource) SetResourceName(v string) *Resource

SetResourceName sets the ResourceName field's value.

func (*Resource) SetResourceType

func (s *Resource) SetResourceType(v string) *Resource

SetResourceType sets the ResourceType field's value.

func (Resource) String

func (s Resource) String() string

String returns the string representation

type ResourceTag

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

func (ResourceTag) GoString

func (s ResourceTag) GoString() string

GoString returns the string representation

func (*ResourceTag) SetResourceId

func (s *ResourceTag) SetResourceId(v string) *ResourceTag

SetResourceId sets the ResourceId field's value.

func (*ResourceTag) SetTagsList

func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag

SetTagsList sets the TagsList field's value.

func (ResourceTag) String

func (s ResourceTag) String() string

String returns the string representation

type StartLoggingInput

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

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-1:123456789012:trail/MyTrail
    //
    // Name is a required field
    Name *string `type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (StartLoggingInput) GoString

func (s StartLoggingInput) GoString() string

GoString returns the string representation

func (*StartLoggingInput) SetName

func (s *StartLoggingInput) SetName(v string) *StartLoggingInput

SetName sets the Name field's value.

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

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

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

func (StartLoggingOutput) GoString

func (s StartLoggingOutput) GoString() string

GoString returns the string representation

func (StartLoggingOutput) String

func (s StartLoggingOutput) String() string

String returns the string representation

type StopLoggingInput

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

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-1:123456789012:trail/MyTrail
    //
    // Name is a required field
    Name *string `type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (StopLoggingInput) GoString

func (s StopLoggingInput) GoString() string

GoString returns the string representation

func (*StopLoggingInput) SetName

func (s *StopLoggingInput) SetName(v string) *StopLoggingInput

SetName sets the Name field's value.

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

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

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

func (StopLoggingOutput) GoString

func (s StopLoggingOutput) GoString() string

GoString returns the string representation

func (StopLoggingOutput) String

func (s StopLoggingOutput) String() string

String returns the string representation

type Tag

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

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
}

func (Tag) GoString

func (s Tag) GoString() string

GoString returns the string representation

func (*Tag) SetKey

func (s *Tag) SetKey(v string) *Tag

SetKey sets the Key field's value.

func (*Tag) SetValue

func (s *Tag) SetValue(v string) *Tag

SetValue sets the Value field's value.

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

The settings for a trail. Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/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 the KMS key ID that encrypts the logs delivered by CloudTrail.
    // The value is a fully specified ARN to a KMS key in the format:
    //
    // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
    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-1: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-1:123456789012:trail/MyTrail
    TrailARN *string `type:"string"`
    // contains filtered or unexported fields
}

func (Trail) GoString

func (s Trail) GoString() string

GoString returns the string representation

func (*Trail) SetCloudWatchLogsLogGroupArn

func (s *Trail) SetCloudWatchLogsLogGroupArn(v string) *Trail

SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.

func (*Trail) SetCloudWatchLogsRoleArn

func (s *Trail) SetCloudWatchLogsRoleArn(v string) *Trail

SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.

func (*Trail) SetHasCustomEventSelectors

func (s *Trail) SetHasCustomEventSelectors(v bool) *Trail

SetHasCustomEventSelectors sets the HasCustomEventSelectors field's value.

func (*Trail) SetHomeRegion

func (s *Trail) SetHomeRegion(v string) *Trail

SetHomeRegion sets the HomeRegion field's value.

func (*Trail) SetIncludeGlobalServiceEvents

func (s *Trail) SetIncludeGlobalServiceEvents(v bool) *Trail

SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.

func (*Trail) SetIsMultiRegionTrail

func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail

SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.

func (*Trail) SetKmsKeyId

func (s *Trail) SetKmsKeyId(v string) *Trail

SetKmsKeyId sets the KmsKeyId field's value.

func (*Trail) SetLogFileValidationEnabled

func (s *Trail) SetLogFileValidationEnabled(v bool) *Trail

SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.

func (*Trail) SetName

func (s *Trail) SetName(v string) *Trail

SetName sets the Name field's value.

func (*Trail) SetS3BucketName

func (s *Trail) SetS3BucketName(v string) *Trail

SetS3BucketName sets the S3BucketName field's value.

func (*Trail) SetS3KeyPrefix

func (s *Trail) SetS3KeyPrefix(v string) *Trail

SetS3KeyPrefix sets the S3KeyPrefix field's value.

func (*Trail) SetSnsTopicARN

func (s *Trail) SetSnsTopicARN(v string) *Trail

SetSnsTopicARN sets the SnsTopicARN field's value.

func (*Trail) SetSnsTopicName

func (s *Trail) SetSnsTopicName(v string) *Trail

SetSnsTopicName sets the SnsTopicName field's value.

func (*Trail) SetTrailARN

func (s *Trail) SetTrailARN(v string) *Trail

SetTrailARN sets the TrailARN field's value.

func (Trail) String

func (s Trail) String() string

String returns the string representation

type UpdateTrailInput

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

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 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-1:123456789012:alias/MyAliasName
    //
    //    * arn:aws:kms:us-east-1: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-1: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
}

func (UpdateTrailInput) GoString

func (s UpdateTrailInput) GoString() string

GoString returns the string representation

func (*UpdateTrailInput) SetCloudWatchLogsLogGroupArn

func (s *UpdateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailInput

SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.

func (*UpdateTrailInput) SetCloudWatchLogsRoleArn

func (s *UpdateTrailInput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailInput

SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.

func (*UpdateTrailInput) SetEnableLogFileValidation

func (s *UpdateTrailInput) SetEnableLogFileValidation(v bool) *UpdateTrailInput

SetEnableLogFileValidation sets the EnableLogFileValidation field's value.

func (*UpdateTrailInput) SetIncludeGlobalServiceEvents

func (s *UpdateTrailInput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailInput

SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.

func (*UpdateTrailInput) SetIsMultiRegionTrail

func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput

SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.

func (*UpdateTrailInput) SetKmsKeyId

func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput

SetKmsKeyId sets the KmsKeyId field's value.

func (*UpdateTrailInput) SetName

func (s *UpdateTrailInput) SetName(v string) *UpdateTrailInput

SetName sets the Name field's value.

func (*UpdateTrailInput) SetS3BucketName

func (s *UpdateTrailInput) SetS3BucketName(v string) *UpdateTrailInput

SetS3BucketName sets the S3BucketName field's value.

func (*UpdateTrailInput) SetS3KeyPrefix

func (s *UpdateTrailInput) SetS3KeyPrefix(v string) *UpdateTrailInput

SetS3KeyPrefix sets the S3KeyPrefix field's value.

func (*UpdateTrailInput) SetSnsTopicName

func (s *UpdateTrailInput) SetSnsTopicName(v string) *UpdateTrailInput

SetSnsTopicName sets the SnsTopicName field's value.

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

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

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 the KMS key ID that encrypts the logs delivered by CloudTrail.
    // The value is a fully specified ARN to a KMS key in the format:
    //
    // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
    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-1: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-1:123456789012:trail/MyTrail
    TrailARN *string `type:"string"`
    // contains filtered or unexported fields
}

func (UpdateTrailOutput) GoString

func (s UpdateTrailOutput) GoString() string

GoString returns the string representation

func (*UpdateTrailOutput) SetCloudWatchLogsLogGroupArn

func (s *UpdateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailOutput

SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.

func (*UpdateTrailOutput) SetCloudWatchLogsRoleArn

func (s *UpdateTrailOutput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailOutput

SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.

func (*UpdateTrailOutput) SetIncludeGlobalServiceEvents

func (s *UpdateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailOutput

SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.

func (*UpdateTrailOutput) SetIsMultiRegionTrail

func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput

SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.

func (*UpdateTrailOutput) SetKmsKeyId

func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput

SetKmsKeyId sets the KmsKeyId field's value.

func (*UpdateTrailOutput) SetLogFileValidationEnabled

func (s *UpdateTrailOutput) SetLogFileValidationEnabled(v bool) *UpdateTrailOutput

SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.

func (*UpdateTrailOutput) SetName

func (s *UpdateTrailOutput) SetName(v string) *UpdateTrailOutput

SetName sets the Name field's value.

func (*UpdateTrailOutput) SetS3BucketName

func (s *UpdateTrailOutput) SetS3BucketName(v string) *UpdateTrailOutput

SetS3BucketName sets the S3BucketName field's value.

func (*UpdateTrailOutput) SetS3KeyPrefix

func (s *UpdateTrailOutput) SetS3KeyPrefix(v string) *UpdateTrailOutput

SetS3KeyPrefix sets the S3KeyPrefix field's value.

func (*UpdateTrailOutput) SetSnsTopicARN

func (s *UpdateTrailOutput) SetSnsTopicARN(v string) *UpdateTrailOutput

SetSnsTopicARN sets the SnsTopicARN field's value.

func (*UpdateTrailOutput) SetSnsTopicName

func (s *UpdateTrailOutput) SetSnsTopicName(v string) *UpdateTrailOutput

SetSnsTopicName sets the SnsTopicName field's value.

func (*UpdateTrailOutput) SetTrailARN

func (s *UpdateTrailOutput) SetTrailARN(v string) *UpdateTrailOutput

SetTrailARN sets the TrailARN field's value.

func (UpdateTrailOutput) String

func (s UpdateTrailOutput) String() string

String returns the string representation

Subdirectories

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