Documentation ¶
Overview ¶
Package cloudtrail provides a client for AWS CloudTrail.
Index ¶
- Constants
- type CloudTrail
- func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error)
- func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput)
- func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error)
- func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput)
- func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error)
- func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput)
- func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error)
- func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput)
- func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error)
- func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput)
- func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error)
- func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput)
- func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error)
- func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput)
- func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error)
- func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput)
- type CreateTrailInput
- type CreateTrailOutput
- type DeleteTrailInput
- type DeleteTrailOutput
- type DescribeTrailsInput
- type DescribeTrailsOutput
- type Event
- type GetTrailStatusInput
- type GetTrailStatusOutput
- type LookupAttribute
- type LookupEventsInput
- type LookupEventsOutput
- type Resource
- type StartLoggingInput
- type StartLoggingOutput
- type StopLoggingInput
- type StopLoggingOutput
- type Trail
- type UpdateTrailInput
- type UpdateTrailOutput
Examples ¶
Constants ¶
const ( // @enum LookupAttributeKey LookupAttributeKeyEventId = "EventId" // @enum LookupAttributeKey LookupAttributeKeyEventName = "EventName" // @enum LookupAttributeKey LookupAttributeKeyUsername = "Username" // @enum LookupAttributeKey LookupAttributeKeyResourceType = "ResourceType" // @enum LookupAttributeKey LookupAttributeKeyResourceName = "ResourceName" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type 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 using 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 CloudTrail User Guide for information about the data that is included with each AWS API call listed in the log files.
func (*CloudTrail) CreateTrail ¶
func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error)
From the command line, use create-subscription.
Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" ) func main() { svc := cloudtrail.New(nil) params := &cloudtrail.CreateTrailInput{ Name: aws.String("String"), // Required S3BucketName: aws.String("String"), // Required CloudWatchLogsLogGroupArn: aws.String("String"), CloudWatchLogsRoleArn: aws.String("String"), IncludeGlobalServiceEvents: aws.Bool(true), S3KeyPrefix: aws.String("String"), SnsTopicName: aws.String("String"), } resp, err := svc.CreateTrail(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*CloudTrail) CreateTrailRequest ¶
func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput)
CreateTrailRequest generates a request for the CreateTrail operation.
func (*CloudTrail) DeleteTrail ¶
func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error)
Deletes a trail.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" ) func main() { svc := cloudtrail.New(nil) params := &cloudtrail.DeleteTrailInput{ Name: aws.String("String"), // Required } resp, err := svc.DeleteTrail(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*CloudTrail) DeleteTrailRequest ¶
func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput)
DeleteTrailRequest generates a request for the DeleteTrail operation.
func (*CloudTrail) DescribeTrails ¶
func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error)
Retrieves settings for the trail associated with the current region for your account.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" ) func main() { svc := cloudtrail.New(nil) params := &cloudtrail.DescribeTrailsInput{ TrailNameList: []*string{ aws.String("String"), // Required // More values... }, } resp, err := svc.DescribeTrails(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*CloudTrail) DescribeTrailsRequest ¶
func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput)
DescribeTrailsRequest generates a request for the DescribeTrails operation.
func (*CloudTrail) GetTrailStatus ¶
func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error)
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" ) func main() { svc := cloudtrail.New(nil) params := &cloudtrail.GetTrailStatusInput{ Name: aws.String("String"), // Required } resp, err := svc.GetTrailStatus(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*CloudTrail) GetTrailStatusRequest ¶
func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput)
GetTrailStatusRequest generates a request for the GetTrailStatus operation.
func (*CloudTrail) LookupEvents ¶
func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error)
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 five different attributes: time range (defined by a start time and end time), user name, event name, resource type, and resource name. All attributes are optional. The maximum number of attributes that can be specified in any one lookup request are time range and one other attribute. 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.
Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred.
Example ¶
package main import ( "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" ) func main() { svc := cloudtrail.New(nil) params := &cloudtrail.LookupEventsInput{ EndTime: aws.Time(time.Now()), LookupAttributes: []*cloudtrail.LookupAttribute{ { // Required AttributeKey: aws.String("LookupAttributeKey"), // Required AttributeValue: aws.String("String"), // Required }, // More values... }, MaxResults: aws.Int64(1), NextToken: aws.String("NextToken"), StartTime: aws.Time(time.Now()), } resp, err := svc.LookupEvents(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*CloudTrail) LookupEventsRequest ¶
func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput)
LookupEventsRequest generates a request for the LookupEvents operation.
func (*CloudTrail) StartLogging ¶
func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error)
Starts the recording of AWS API calls and log file delivery for a trail.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" ) func main() { svc := cloudtrail.New(nil) params := &cloudtrail.StartLoggingInput{ Name: aws.String("String"), // Required } resp, err := svc.StartLogging(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*CloudTrail) StartLoggingRequest ¶
func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput)
StartLoggingRequest generates a request for the StartLogging operation.
func (*CloudTrail) StopLogging ¶
func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error)
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" ) func main() { svc := cloudtrail.New(nil) params := &cloudtrail.StopLoggingInput{ Name: aws.String("String"), // Required } resp, err := svc.StopLogging(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*CloudTrail) StopLoggingRequest ¶
func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput)
StopLoggingRequest generates a request for the StopLogging operation.
func (*CloudTrail) UpdateTrail ¶
func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error)
From the command line, use update-subscription.
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.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" ) func main() { svc := cloudtrail.New(nil) params := &cloudtrail.UpdateTrailInput{ Name: aws.String("String"), // Required CloudWatchLogsLogGroupArn: aws.String("String"), CloudWatchLogsRoleArn: aws.String("String"), IncludeGlobalServiceEvents: aws.Bool(true), S3BucketName: aws.String("String"), S3KeyPrefix: aws.String("String"), SnsTopicName: aws.String("String"), } resp, err := svc.UpdateTrail(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
Output:
func (*CloudTrail) UpdateTrailRequest ¶
func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput)
UpdateTrailRequest generates a request for the UpdateTrail operation.
type CreateTrailInput ¶
type CreateTrailInput struct { // Specifies a log group name using an Amazon Resource Name (ARN), a unique // identifier that represents the log group to which CloudTrail logs will be // delivered. Not required unless you specify CloudWatchLogsRoleArn. CloudWatchLogsLogGroupArn *string `type:"string"` // Specifies the role for the CloudWatch Logs endpoint to assume to write to // a user’s log group. CloudWatchLogsRoleArn *string `type:"string"` // Specifies whether the trail is publishing events from global services such // as IAM to the log files. IncludeGlobalServiceEvents *bool `type:"boolean"` // Specifies the name of the trail. Name *string `type:"string" required:"true"` // Specifies the name of the Amazon S3 bucket designated for publishing log // files. S3BucketName *string `type:"string" required:"true"` // Specifies the Amazon S3 key prefix that precedes the name of the bucket you // have designated for log file delivery. S3KeyPrefix *string `type:"string"` // Specifies the name of the Amazon SNS topic defined for notification of log // file delivery. SnsTopicName *string `type:"string"` // contains filtered or unexported fields }
Specifies the settings for each trail.
func (CreateTrailInput) GoString ¶ added in v0.6.5
func (s CreateTrailInput) GoString() string
GoString returns the string representation
func (CreateTrailInput) String ¶ added in v0.6.5
func (s CreateTrailInput) String() string
String returns the string representation
type CreateTrailOutput ¶
type CreateTrailOutput struct { // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail // logs will be delivered. CloudWatchLogsLogGroupArn *string `type:"string"` // Specifies the role for the CloudWatch Logs endpoint to assume to write to // a user’s log group. CloudWatchLogsRoleArn *string `type:"string"` // Specifies whether the trail is publishing events from global services such // as IAM to the log files. IncludeGlobalServiceEvents *bool `type:"boolean"` // Specifies 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 precedes the name of the bucket you // have designated for log file delivery. S3KeyPrefix *string `type:"string"` // Specifies the name of the Amazon SNS topic defined for notification of log // file delivery. SnsTopicName *string `type:"string"` // contains filtered or unexported fields }
Returns the objects or data listed below if successful. Otherwise, returns an error.
func (CreateTrailOutput) GoString ¶ added in v0.6.5
func (s CreateTrailOutput) GoString() string
GoString returns the string representation
func (CreateTrailOutput) String ¶ added in v0.6.5
func (s CreateTrailOutput) String() string
String returns the string representation
type DeleteTrailInput ¶
type DeleteTrailInput struct { // The name of a trail to be deleted. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
The request that specifies the name of a trail to delete.
func (DeleteTrailInput) GoString ¶ added in v0.6.5
func (s DeleteTrailInput) GoString() string
GoString returns the string representation
func (DeleteTrailInput) String ¶ added in v0.6.5
func (s DeleteTrailInput) String() string
String returns the string representation
type DeleteTrailOutput ¶
type DeleteTrailOutput struct {
// contains filtered or unexported fields
}
Returns the objects or data listed below if successful. Otherwise, returns an error.
func (DeleteTrailOutput) GoString ¶ added in v0.6.5
func (s DeleteTrailOutput) GoString() string
GoString returns the string representation
func (DeleteTrailOutput) String ¶ added in v0.6.5
func (s DeleteTrailOutput) String() string
String returns the string representation
type DescribeTrailsInput ¶
type DescribeTrailsInput struct { // The trail returned. TrailNameList []*string `locationName:"trailNameList" type:"list"` // contains filtered or unexported fields }
Returns information about the trail.
func (DescribeTrailsInput) GoString ¶ added in v0.6.5
func (s DescribeTrailsInput) GoString() string
GoString returns the string representation
func (DescribeTrailsInput) String ¶ added in v0.6.5
func (s DescribeTrailsInput) String() string
String returns the string representation
type DescribeTrailsOutput ¶
type DescribeTrailsOutput struct { // The list of trails. TrailList []*Trail `locationName:"trailList" type:"list"` // contains filtered or unexported fields }
Returns the objects or data listed below if successful. Otherwise, returns an error.
func (DescribeTrailsOutput) GoString ¶ added in v0.6.5
func (s DescribeTrailsOutput) GoString() string
GoString returns the string representation
func (DescribeTrailsOutput) String ¶ added in v0.6.5
func (s DescribeTrailsOutput) String() string
String returns the string representation
type 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 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 }
Contains information about an event that was returned by a lookup request. The result includes a representation of a CloudTrail event.
type GetTrailStatusInput ¶
type GetTrailStatusInput struct { // The name of the trail for which you are requesting the current status. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
The name of a trail about which you want the current status.
func (GetTrailStatusInput) GoString ¶ added in v0.6.5
func (s GetTrailStatusInput) GoString() string
GoString returns the string representation
func (GetTrailStatusInput) String ¶ added in v0.6.5
func (s GetTrailStatusInput) String() string
String returns the string representation
type GetTrailStatusOutput ¶
type GetTrailStatusOutput struct { // Whether the CloudTrail is currently logging AWS API calls. IsLogging *bool `type:"boolean"` // Displays any CloudWatch Logs error that CloudTrail encountered when attempting // to deliver logs to CloudWatch Logs. LatestCloudWatchLogsDeliveryError *string `type:"string"` // Displays the most recent date and time when CloudTrail delivered logs to // CloudWatch Logs. LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"` // 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. 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 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"` // contains filtered or unexported fields }
Returns the objects or data listed below if successful. Otherwise, returns an error.
func (GetTrailStatusOutput) GoString ¶ added in v0.6.5
func (s GetTrailStatusOutput) GoString() string
GoString returns the string representation
func (GetTrailStatusOutput) String ¶ added in v0.6.5
func (s GetTrailStatusOutput) String() string
String returns the string representation
type LookupAttribute ¶
type LookupAttribute struct { // Specifies an attribute on which to filter the events returned. AttributeKey *string `type:"string" required:"true" enum:"LookupAttributeKey"` // Specifies a value for the specified AttributeKey. AttributeValue *string `type:"string" required:"true"` // contains filtered or unexported fields }
Specifies an attribute and value that filter the events returned.
func (LookupAttribute) GoString ¶ added in v0.6.5
func (s LookupAttribute) GoString() string
GoString returns the string representation
func (LookupAttribute) String ¶ added in v0.6.5
func (s LookupAttribute) String() string
String returns the string representation
type LookupEventsInput ¶
type LookupEventsInput struct { // Specifies that only events that occur before or at the specified time are // returned. If the specified end time is before the specified start time, an // error is returned. EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` // Contains a list of lookup attributes. Currently the list can contain only // one item. LookupAttributes []*LookupAttribute `type:"list"` // The number of events to return. Possible values are 1 through 50. The default // is 10. MaxResults *int64 `type:"integer"` // The token to use to get the next page of results after a previous API call. // This token must be passed in with the same parameters that were specified // in the the original call. For example, if the original call specified an // AttributeKey of 'Username' with a value of 'root', the call with NextToken // should include those same parameters. NextToken *string `type:"string"` // Specifies that only events that occur after or at the specified time are // returned. If the specified start time is after the specified end time, an // error is returned. StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` // contains filtered or unexported fields }
Contains a request for LookupEvents.
func (LookupEventsInput) GoString ¶ added in v0.6.5
func (s LookupEventsInput) GoString() string
GoString returns the string representation
func (LookupEventsInput) String ¶ added in v0.6.5
func (s LookupEventsInput) String() string
String returns the string representation
type LookupEventsOutput ¶
type LookupEventsOutput struct { // A list of events returned based on the lookup attributes specified and the // CloudTrail event. The events list is sorted by time. The most recent event // is listed first. Events []*Event `type:"list"` // The token to use to get the next page of results after a previous API call. // If the token does not appear, there are no more results to return. The token // must be passed in with the same parameters as the previous call. For example, // if the original call specified an AttributeKey of 'Username' with a value // of 'root', the call with NextToken should include those same parameters. NextToken *string `type:"string"` // contains filtered or unexported fields }
Contains a response to a LookupEvents action.
func (LookupEventsOutput) GoString ¶ added in v0.6.5
func (s LookupEventsOutput) GoString() string
GoString returns the string representation
func (LookupEventsOutput) String ¶ added in v0.6.5
func (s LookupEventsOutput) String() string
String returns the string representation
type Resource ¶
type Resource struct { // The name of the resource referenced by the event returned. These are user-created // names whose values will depend on the environment. For example, the resource // name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567" // for an EC2 Instance. ResourceName *string `type:"string"` // The type of a resource referenced by the event returned. When the resource // type cannot be determined, null is returned. Some examples of resource types // are: Instance for EC2, Trail for CloudTrail, DBInstance for RDS, and AccessKey // for IAM. For a list of resource types supported for event lookup, see Resource // Types Supported for Event Lookup (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/lookup_supported_resourcetypes.html). ResourceType *string `type:"string"` // contains filtered or unexported fields }
Specifies the type and name of a resource referenced by an event.
type StartLoggingInput ¶
type StartLoggingInput struct { // The name of the trail for which CloudTrail logs AWS API calls. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
The request to CloudTrail to start logging AWS API calls for an account.
func (StartLoggingInput) GoString ¶ added in v0.6.5
func (s StartLoggingInput) GoString() string
GoString returns the string representation
func (StartLoggingInput) String ¶ added in v0.6.5
func (s StartLoggingInput) String() string
String returns the string representation
type StartLoggingOutput ¶
type StartLoggingOutput struct {
// contains filtered or unexported fields
}
Returns the objects or data listed below if successful. Otherwise, returns an error.
func (StartLoggingOutput) GoString ¶ added in v0.6.5
func (s StartLoggingOutput) GoString() string
GoString returns the string representation
func (StartLoggingOutput) String ¶ added in v0.6.5
func (s StartLoggingOutput) String() string
String returns the string representation
type StopLoggingInput ¶
type StopLoggingInput struct { // Communicates to CloudTrail the name of the trail for which to stop logging // AWS API calls. Name *string `type:"string" required:"true"` // contains filtered or unexported fields }
Passes the request to CloudTrail to stop logging AWS API calls for the specified account.
func (StopLoggingInput) GoString ¶ added in v0.6.5
func (s StopLoggingInput) GoString() string
GoString returns the string representation
func (StopLoggingInput) String ¶ added in v0.6.5
func (s StopLoggingInput) String() string
String returns the string representation
type StopLoggingOutput ¶
type StopLoggingOutput struct {
// contains filtered or unexported fields
}
Returns the objects or data listed below if successful. Otherwise, returns an error.
func (StopLoggingOutput) GoString ¶ added in v0.6.5
func (s StopLoggingOutput) GoString() string
GoString returns the string representation
func (StopLoggingOutput) String ¶ added in v0.6.5
func (s StopLoggingOutput) String() string
String returns the string representation
type Trail ¶
type Trail struct { // Specifies an Amazon Resource Name (ARN), a unique identifier that represents // the log group to which CloudTrail logs will be delivered. CloudWatchLogsLogGroupArn *string `type:"string"` // Specifies the role for the CloudWatch Logs endpoint to assume to write to // a user’s log group. CloudWatchLogsRoleArn *string `type:"string"` // Set to True to include AWS API calls from AWS global services such as IAM. // Otherwise, False. IncludeGlobalServiceEvents *bool `type:"boolean"` // Name of the trail set by calling CreateTrail. Name *string `type:"string"` // Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. S3BucketName *string `type:"string"` // Value of the Amazon S3 prefix. S3KeyPrefix *string `type:"string"` // Name of the existing Amazon SNS topic that CloudTrail uses to notify the // account owner when new CloudTrail log files have been delivered. SnsTopicName *string `type:"string"` // contains filtered or unexported fields }
The settings for a trail.
type UpdateTrailInput ¶
type UpdateTrailInput struct { // Specifies a log group name using an Amazon Resource Name (ARN), a unique // identifier that represents the log group to which CloudTrail logs will be // delivered. Not required unless you specify CloudWatchLogsRoleArn. CloudWatchLogsLogGroupArn *string `type:"string"` // Specifies the role for the CloudWatch Logs endpoint to assume to write to // a user’s log group. CloudWatchLogsRoleArn *string `type:"string"` // Specifies whether the trail is publishing events from global services such // as IAM to the log files. IncludeGlobalServiceEvents *bool `type:"boolean"` // Specifies the name of the trail. Name *string `type:"string" required:"true"` // Specifies the name of the Amazon S3 bucket designated for publishing log // files. S3BucketName *string `type:"string"` // Specifies the Amazon S3 key prefix that precedes the name of the bucket you // have designated for log file delivery. S3KeyPrefix *string `type:"string"` // Specifies the name of the Amazon SNS topic defined for notification of log // file delivery. SnsTopicName *string `type:"string"` // contains filtered or unexported fields }
Specifies settings to update for the trail.
func (UpdateTrailInput) GoString ¶ added in v0.6.5
func (s UpdateTrailInput) GoString() string
GoString returns the string representation
func (UpdateTrailInput) String ¶ added in v0.6.5
func (s UpdateTrailInput) String() string
String returns the string representation
type UpdateTrailOutput ¶
type UpdateTrailOutput struct { // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail // logs will be delivered. CloudWatchLogsLogGroupArn *string `type:"string"` // Specifies the role for the CloudWatch Logs endpoint to assume to write to // a user’s log group. CloudWatchLogsRoleArn *string `type:"string"` // Specifies whether the trail is publishing events from global services such // as IAM to the log files. IncludeGlobalServiceEvents *bool `type:"boolean"` // Specifies 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 precedes the name of the bucket you // have designated for log file delivery. S3KeyPrefix *string `type:"string"` // Specifies the name of the Amazon SNS topic defined for notification of log // file delivery. SnsTopicName *string `type:"string"` // contains filtered or unexported fields }
Returns the objects or data listed below if successful. Otherwise, returns an error.
func (UpdateTrailOutput) GoString ¶ added in v0.6.5
func (s UpdateTrailOutput) GoString() string
GoString returns the string representation
func (UpdateTrailOutput) String ¶ added in v0.6.5
func (s UpdateTrailOutput) String() string
String returns the string representation
Directories ¶
Path | Synopsis |
---|---|
Package cloudtrailiface provides an interface for the AWS CloudTrail.
|
Package cloudtrailiface provides an interface for the AWS CloudTrail. |