mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+171
-147
@@ -1,6 +1,5 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudtrail provides a client for AWS CloudTrail.
|
||||
package cloudtrail
|
||||
|
||||
import (
|
||||
@@ -16,19 +15,18 @@ const opAddTags = "AddTags"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See AddTags for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See AddTags for more information on using the AddTags
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -141,19 +139,18 @@ const opCreateTrail = "CreateTrail"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See CreateTrail for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See CreateTrail for more information on using the CreateTrail
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -300,19 +297,18 @@ const opDeleteTrail = "DeleteTrail"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DeleteTrail for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See DeleteTrail for more information on using the DeleteTrail
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -402,19 +398,18 @@ const opDescribeTrails = "DescribeTrails"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DescribeTrails for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See DescribeTrails for more information on using the DescribeTrails
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -486,19 +481,18 @@ const opGetEventSelectors = "GetEventSelectors"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See GetEventSelectors for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See GetEventSelectors for more information on using the GetEventSelectors
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -600,19 +594,18 @@ const opGetTrailStatus = "GetTrailStatus"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See GetTrailStatus for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See GetTrailStatus for more information on using the GetTrailStatus
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -700,19 +693,18 @@ const opListPublicKeys = "ListPublicKeys"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See ListPublicKeys for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See ListPublicKeys for more information on using the ListPublicKeys
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -797,19 +789,18 @@ const opListTags = "ListTags"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See ListTags for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See ListTags for more information on using the ListTags
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -912,19 +903,18 @@ const opLookupEvents = "LookupEvents"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See LookupEvents for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See LookupEvents for more information on using the LookupEvents
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -1061,8 +1051,12 @@ func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*Lookup
|
||||
func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error {
|
||||
p := request.Pagination{
|
||||
NewRequest: func() (*request.Request, error) {
|
||||
inCpy := *input
|
||||
req, _ := c.LookupEventsRequest(&inCpy)
|
||||
var inCpy *LookupEventsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.LookupEventsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
@@ -1080,19 +1074,18 @@ const opPutEventSelectors = "PutEventSelectors"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See PutEventSelectors for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See PutEventSelectors for more information on using the PutEventSelectors
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -1225,19 +1218,18 @@ const opRemoveTags = "RemoveTags"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See RemoveTags for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See RemoveTags for more information on using the RemoveTags
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -1341,19 +1333,18 @@ const opStartLogging = "StartLogging"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See StartLogging for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See StartLogging for more information on using the StartLogging
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -1445,19 +1436,18 @@ const opStopLogging = "StopLogging"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See StopLogging for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See StopLogging for more information on using the StopLogging
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -1551,19 +1541,18 @@ const opUpdateTrail = "UpdateTrail"
|
||||
|
||||
// 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.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See UpdateTrail for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// 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.
|
||||
// See UpdateTrail for more information on using the UpdateTrail
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// 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)
|
||||
@@ -2464,7 +2453,9 @@ type GetEventSelectorsInput struct {
|
||||
// If you specify a trail ARN, it must be in the format:
|
||||
//
|
||||
// arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
|
||||
TrailName *string `type:"string"`
|
||||
//
|
||||
// TrailName is a required field
|
||||
TrailName *string `type:"string" required:"true"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
@@ -2477,6 +2468,19 @@ func (s GetEventSelectorsInput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// Validate inspects the fields of the type to determine if they are valid.
|
||||
func (s *GetEventSelectorsInput) Validate() error {
|
||||
invalidParams := request.ErrInvalidParams{Context: "GetEventSelectorsInput"}
|
||||
if s.TrailName == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("TrailName"))
|
||||
}
|
||||
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetTrailName sets the TrailName field's value.
|
||||
func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput {
|
||||
s.TrailName = &v
|
||||
@@ -3173,7 +3177,9 @@ type PutEventSelectorsInput struct {
|
||||
|
||||
// Specifies the settings for your event selectors. You can configure up to
|
||||
// five event selectors for a trail.
|
||||
EventSelectors []*EventSelector `type:"list"`
|
||||
//
|
||||
// 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:
|
||||
@@ -3193,7 +3199,9 @@ type PutEventSelectorsInput struct {
|
||||
// If you specify a trail ARN, it must be in the format:
|
||||
//
|
||||
// arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
|
||||
TrailName *string `type:"string"`
|
||||
//
|
||||
// TrailName is a required field
|
||||
TrailName *string `type:"string" required:"true"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
@@ -3206,6 +3214,22 @@ func (s PutEventSelectorsInput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// Validate inspects the fields of the type to determine if they are valid.
|
||||
func (s *PutEventSelectorsInput) Validate() error {
|
||||
invalidParams := request.ErrInvalidParams{Context: "PutEventSelectorsInput"}
|
||||
if s.EventSelectors == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("EventSelectors"))
|
||||
}
|
||||
if s.TrailName == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("TrailName"))
|
||||
}
|
||||
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetEventSelectors sets the EventSelectors field's value.
|
||||
func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput {
|
||||
s.EventSelectors = v
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudtrailiface provides an interface to enable mocking the AWS CloudTrail service client
|
||||
// for testing your code.
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // AWS CloudTrail.
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// 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 AWS CloudTrail with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the AWS CloudTrail client CloudTrail for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/#New
|
||||
package cloudtrail
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudtrail
|
||||
|
||||
|
||||
-379
@@ -1,379 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudtrail_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/cloudtrail"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudTrail_AddTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.AddTagsInput{
|
||||
ResourceId: aws.String("String"), // Required
|
||||
TagsList: []*cloudtrail.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("String"), // Required
|
||||
Value: aws.String("String"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.AddTags(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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_CreateTrail() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.CreateTrailInput{
|
||||
Name: aws.String("String"), // Required
|
||||
S3BucketName: aws.String("String"), // Required
|
||||
CloudWatchLogsLogGroupArn: aws.String("String"),
|
||||
CloudWatchLogsRoleArn: aws.String("String"),
|
||||
EnableLogFileValidation: aws.Bool(true),
|
||||
IncludeGlobalServiceEvents: aws.Bool(true),
|
||||
IsMultiRegionTrail: aws.Bool(true),
|
||||
KmsKeyId: aws.String("String"),
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_DeleteTrail() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_DescribeTrails() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.DescribeTrailsInput{
|
||||
IncludeShadowTrails: aws.Bool(true),
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_GetEventSelectors() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.GetEventSelectorsInput{
|
||||
TrailName: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.GetEventSelectors(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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_GetTrailStatus() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_ListPublicKeys() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.ListPublicKeysInput{
|
||||
EndTime: aws.Time(time.Now()),
|
||||
NextToken: aws.String("String"),
|
||||
StartTime: aws.Time(time.Now()),
|
||||
}
|
||||
resp, err := svc.ListPublicKeys(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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_ListTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.ListTagsInput{
|
||||
ResourceIdList: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.ListTags(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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_LookupEvents() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_PutEventSelectors() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.PutEventSelectorsInput{
|
||||
EventSelectors: []*cloudtrail.EventSelector{
|
||||
{ // Required
|
||||
DataResources: []*cloudtrail.DataResource{
|
||||
{ // Required
|
||||
Type: aws.String("String"),
|
||||
Values: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
IncludeManagementEvents: aws.Bool(true),
|
||||
ReadWriteType: aws.String("ReadWriteType"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TrailName: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.PutEventSelectors(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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_RemoveTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.RemoveTagsInput{
|
||||
ResourceId: aws.String("String"), // Required
|
||||
TagsList: []*cloudtrail.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("String"), // Required
|
||||
Value: aws.String("String"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.RemoveTags(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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_StartLogging() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_StopLogging() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudTrail_UpdateTrail() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudtrail.New(sess)
|
||||
|
||||
params := &cloudtrail.UpdateTrailInput{
|
||||
Name: aws.String("String"), // Required
|
||||
CloudWatchLogsLogGroupArn: aws.String("String"),
|
||||
CloudWatchLogsRoleArn: aws.String("String"),
|
||||
EnableLogFileValidation: aws.Bool(true),
|
||||
IncludeGlobalServiceEvents: aws.Bool(true),
|
||||
IsMultiRegionTrail: aws.Bool(true),
|
||||
KmsKeyId: aws.String("String"),
|
||||
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)
|
||||
}
|
||||
+6
-24
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudtrail
|
||||
|
||||
@@ -11,30 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// This is the CloudTrail API Reference. It provides descriptions of actions,
|
||||
// data types, common parameters, and common errors for 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 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.
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01
|
||||
// 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user