Documentation ¶
Overview ¶
Package cloudtrail provides a client for AWS CloudTrail.
Index ¶
- type CloudTrail
- func (c *CloudTrail) CreateTrail(req *CreateTrailRequest) (resp *CreateTrailResponse, err error)
- func (c *CloudTrail) DeleteTrail(req *DeleteTrailRequest) (resp *DeleteTrailResponse, err error)
- func (c *CloudTrail) DescribeTrails(req *DescribeTrailsRequest) (resp *DescribeTrailsResponse, err error)
- func (c *CloudTrail) GetTrailStatus(req *GetTrailStatusRequest) (resp *GetTrailStatusResponse, err error)
- func (c *CloudTrail) StartLogging(req *StartLoggingRequest) (resp *StartLoggingResponse, err error)
- func (c *CloudTrail) StopLogging(req *StopLoggingRequest) (resp *StopLoggingResponse, err error)
- func (c *CloudTrail) UpdateTrail(req *UpdateTrailRequest) (resp *UpdateTrailResponse, err error)
- type CloudTrailAPI
- type CreateTrailRequest
- type CreateTrailResponse
- type DeleteTrailRequest
- type DeleteTrailResponse
- type DescribeTrailsRequest
- type DescribeTrailsResponse
- type GetTrailStatusRequest
- type GetTrailStatusResponse
- type StartLoggingRequest
- type StartLoggingResponse
- type StopLoggingRequest
- type StopLoggingResponse
- type Trail
- type UpdateTrailRequest
- type UpdateTrailResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudTrail ¶
type CloudTrail struct {
// contains filtered or unexported fields
}
CloudTrail is a client for AWS CloudTrail.
func New ¶
func New(creds aws.CredentialsProvider, region string, client *http.Client) *CloudTrail
New returns a new CloudTrail client.
func (*CloudTrail) CreateTrail ¶
func (c *CloudTrail) CreateTrail(req *CreateTrailRequest) (resp *CreateTrailResponse, err error)
CreateTrail from the command line, use create-subscription . Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.
func (*CloudTrail) DeleteTrail ¶
func (c *CloudTrail) DeleteTrail(req *DeleteTrailRequest) (resp *DeleteTrailResponse, err error)
DeleteTrail is undocumented.
func (*CloudTrail) DescribeTrails ¶
func (c *CloudTrail) DescribeTrails(req *DescribeTrailsRequest) (resp *DescribeTrailsResponse, err error)
DescribeTrails retrieves settings for the trail associated with the current region for your account.
func (*CloudTrail) GetTrailStatus ¶
func (c *CloudTrail) GetTrailStatus(req *GetTrailStatusRequest) (resp *GetTrailStatusResponse, err error)
GetTrailStatus 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.
func (*CloudTrail) StartLogging ¶
func (c *CloudTrail) StartLogging(req *StartLoggingRequest) (resp *StartLoggingResponse, err error)
StartLogging starts the recording of AWS API calls and log file delivery for a trail.
func (*CloudTrail) StopLogging ¶
func (c *CloudTrail) StopLogging(req *StopLoggingRequest) (resp *StopLoggingResponse, err error)
StopLogging 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.
func (*CloudTrail) UpdateTrail ¶
func (c *CloudTrail) UpdateTrail(req *UpdateTrailRequest) (resp *UpdateTrailResponse, err error)
UpdateTrail 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.
type CloudTrailAPI ¶
type CloudTrailAPI interface { CreateTrail(req *CreateTrailRequest) (resp *CreateTrailResponse, err error) DeleteTrail(req *DeleteTrailRequest) (resp *DeleteTrailResponse, err error) DescribeTrails(req *DescribeTrailsRequest) (resp *DescribeTrailsResponse, err error) GetTrailStatus(req *GetTrailStatusRequest) (resp *GetTrailStatusResponse, err error) StartLogging(req *StartLoggingRequest) (resp *StartLoggingResponse, err error) StopLogging(req *StopLoggingRequest) (resp *StopLoggingResponse, err error) UpdateTrail(req *UpdateTrailRequest) (resp *UpdateTrailResponse, err error) }
type CreateTrailRequest ¶
type CreateTrailRequest struct { CloudWatchLogsLogGroupARN aws.StringValue `json:"CloudWatchLogsLogGroupArn,omitempty"` CloudWatchLogsRoleARN aws.StringValue `json:"CloudWatchLogsRoleArn,omitempty"` IncludeGlobalServiceEvents aws.BooleanValue `json:"IncludeGlobalServiceEvents,omitempty"` Name aws.StringValue `json:"Name"` S3BucketName aws.StringValue `json:"S3BucketName"` S3KeyPrefix aws.StringValue `json:"S3KeyPrefix,omitempty"` SNSTopicName aws.StringValue `json:"SnsTopicName,omitempty"` }
CreateTrailRequest is undocumented.
type CreateTrailResponse ¶
type CreateTrailResponse struct { CloudWatchLogsLogGroupARN aws.StringValue `json:"CloudWatchLogsLogGroupArn,omitempty"` CloudWatchLogsRoleARN aws.StringValue `json:"CloudWatchLogsRoleArn,omitempty"` IncludeGlobalServiceEvents aws.BooleanValue `json:"IncludeGlobalServiceEvents,omitempty"` Name aws.StringValue `json:"Name,omitempty"` S3BucketName aws.StringValue `json:"S3BucketName,omitempty"` S3KeyPrefix aws.StringValue `json:"S3KeyPrefix,omitempty"` SNSTopicName aws.StringValue `json:"SnsTopicName,omitempty"` }
CreateTrailResponse is undocumented.
type DeleteTrailRequest ¶
type DeleteTrailRequest struct {
Name aws.StringValue `json:"Name"`
}
DeleteTrailRequest is undocumented.
type DescribeTrailsRequest ¶
type DescribeTrailsRequest struct {
TrailNameList []string `json:"trailNameList,omitempty"`
}
DescribeTrailsRequest is undocumented.
type DescribeTrailsResponse ¶
type DescribeTrailsResponse struct {
TrailList []Trail `json:"trailList,omitempty"`
}
DescribeTrailsResponse is undocumented.
type GetTrailStatusRequest ¶
type GetTrailStatusRequest struct {
Name aws.StringValue `json:"Name"`
}
GetTrailStatusRequest is undocumented.
type GetTrailStatusResponse ¶
type GetTrailStatusResponse struct { IsLogging aws.BooleanValue `json:"IsLogging,omitempty"` LatestCloudWatchLogsDeliveryError aws.StringValue `json:"LatestCloudWatchLogsDeliveryError,omitempty"` LatestCloudWatchLogsDeliveryTime time.Time `json:"LatestCloudWatchLogsDeliveryTime,omitempty"` LatestDeliveryError aws.StringValue `json:"LatestDeliveryError,omitempty"` LatestDeliveryTime time.Time `json:"LatestDeliveryTime,omitempty"` LatestNotificationError aws.StringValue `json:"LatestNotificationError,omitempty"` LatestNotificationTime time.Time `json:"LatestNotificationTime,omitempty"` StartLoggingTime time.Time `json:"StartLoggingTime,omitempty"` StopLoggingTime time.Time `json:"StopLoggingTime,omitempty"` }
GetTrailStatusResponse is undocumented.
type StartLoggingRequest ¶
type StartLoggingRequest struct {
Name aws.StringValue `json:"Name"`
}
StartLoggingRequest is undocumented.
type StartLoggingResponse ¶
type StartLoggingResponse struct { }
StartLoggingResponse is undocumented.
type StopLoggingRequest ¶
type StopLoggingRequest struct {
Name aws.StringValue `json:"Name"`
}
StopLoggingRequest is undocumented.
type Trail ¶
type Trail struct { CloudWatchLogsLogGroupARN aws.StringValue `json:"CloudWatchLogsLogGroupArn,omitempty"` CloudWatchLogsRoleARN aws.StringValue `json:"CloudWatchLogsRoleArn,omitempty"` IncludeGlobalServiceEvents aws.BooleanValue `json:"IncludeGlobalServiceEvents,omitempty"` Name aws.StringValue `json:"Name,omitempty"` S3BucketName aws.StringValue `json:"S3BucketName,omitempty"` S3KeyPrefix aws.StringValue `json:"S3KeyPrefix,omitempty"` SNSTopicName aws.StringValue `json:"SnsTopicName,omitempty"` }
Trail is undocumented.
type UpdateTrailRequest ¶
type UpdateTrailRequest struct { CloudWatchLogsLogGroupARN aws.StringValue `json:"CloudWatchLogsLogGroupArn,omitempty"` CloudWatchLogsRoleARN aws.StringValue `json:"CloudWatchLogsRoleArn,omitempty"` IncludeGlobalServiceEvents aws.BooleanValue `json:"IncludeGlobalServiceEvents,omitempty"` Name aws.StringValue `json:"Name"` S3BucketName aws.StringValue `json:"S3BucketName,omitempty"` S3KeyPrefix aws.StringValue `json:"S3KeyPrefix,omitempty"` SNSTopicName aws.StringValue `json:"SnsTopicName,omitempty"` }
UpdateTrailRequest is undocumented.
type UpdateTrailResponse ¶
type UpdateTrailResponse struct { CloudWatchLogsLogGroupARN aws.StringValue `json:"CloudWatchLogsLogGroupArn,omitempty"` CloudWatchLogsRoleARN aws.StringValue `json:"CloudWatchLogsRoleArn,omitempty"` IncludeGlobalServiceEvents aws.BooleanValue `json:"IncludeGlobalServiceEvents,omitempty"` Name aws.StringValue `json:"Name,omitempty"` S3BucketName aws.StringValue `json:"S3BucketName,omitempty"` S3KeyPrefix aws.StringValue `json:"S3KeyPrefix,omitempty"` SNSTopicName aws.StringValue `json:"SnsTopicName,omitempty"` }
UpdateTrailResponse is undocumented.