Documentation ¶
Overview ¶
Package cloudwatchlogs provides a client for Amazon CloudWatch Logs.
Index ¶
- Constants
- type CancelExportTaskInput
- type CancelExportTaskOutput
- type CloudWatchLogs
- func (c *CloudWatchLogs) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error)
- func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput)
- func (c *CloudWatchLogs) CreateExportTask(input *CreateExportTaskInput) (*CreateExportTaskOutput, error)
- func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) (req *request.Request, output *CreateExportTaskOutput)
- func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error)
- func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput)
- func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error)
- func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput)
- func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error)
- func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput)
- func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error)
- func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput)
- func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error)
- func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput)
- func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error)
- func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput)
- func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error)
- func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput)
- func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error)
- func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput)
- func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error)
- func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, ...) error
- func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput)
- func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error)
- func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput)
- func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error)
- func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, ...) error
- func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput)
- func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error)
- func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, ...) error
- func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput)
- func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error)
- func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, ...) error
- func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput)
- func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error)
- func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, ...) error
- func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput)
- func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error)
- func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, ...) error
- func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput)
- func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error)
- func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, ...) error
- func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput)
- func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error)
- func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error)
- func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput)
- func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput)
- func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error)
- func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput)
- func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error)
- func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput)
- func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error)
- func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput)
- func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error)
- func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput)
- func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error)
- func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput)
- type CreateExportTaskInput
- type CreateExportTaskOutput
- type CreateLogGroupInput
- type CreateLogGroupOutput
- type CreateLogStreamInput
- type CreateLogStreamOutput
- type DeleteDestinationInput
- type DeleteDestinationOutput
- type DeleteLogGroupInput
- type DeleteLogGroupOutput
- type DeleteLogStreamInput
- type DeleteLogStreamOutput
- type DeleteMetricFilterInput
- type DeleteMetricFilterOutput
- type DeleteRetentionPolicyInput
- type DeleteRetentionPolicyOutput
- type DeleteSubscriptionFilterInput
- type DeleteSubscriptionFilterOutput
- type DescribeDestinationsInput
- type DescribeDestinationsOutput
- type DescribeExportTasksInput
- type DescribeExportTasksOutput
- type DescribeLogGroupsInput
- type DescribeLogGroupsOutput
- type DescribeLogStreamsInput
- type DescribeLogStreamsOutput
- type DescribeMetricFiltersInput
- type DescribeMetricFiltersOutput
- type DescribeSubscriptionFiltersInput
- type DescribeSubscriptionFiltersOutput
- type Destination
- type ExportTask
- type ExportTaskExecutionInfo
- type ExportTaskStatus
- type FilterLogEventsInput
- type FilterLogEventsOutput
- type FilteredLogEvent
- type GetLogEventsInput
- type GetLogEventsOutput
- type InputLogEvent
- type LogGroup
- type LogStream
- type MetricFilter
- type MetricFilterMatchRecord
- type MetricTransformation
- type OutputLogEvent
- type PutDestinationInput
- type PutDestinationOutput
- type PutDestinationPolicyInput
- type PutDestinationPolicyOutput
- type PutLogEventsInput
- type PutLogEventsOutput
- type PutMetricFilterInput
- type PutMetricFilterOutput
- type PutRetentionPolicyInput
- type PutRetentionPolicyOutput
- type PutSubscriptionFilterInput
- type PutSubscriptionFilterOutput
- type RejectedLogEventsInfo
- type SearchedLogStream
- type SubscriptionFilter
- type TestMetricFilterInput
- type TestMetricFilterOutput
Examples ¶
- CloudWatchLogs.CancelExportTask
- CloudWatchLogs.CreateExportTask
- CloudWatchLogs.CreateLogGroup
- CloudWatchLogs.CreateLogStream
- CloudWatchLogs.DeleteDestination
- CloudWatchLogs.DeleteLogGroup
- CloudWatchLogs.DeleteLogStream
- CloudWatchLogs.DeleteMetricFilter
- CloudWatchLogs.DeleteRetentionPolicy
- CloudWatchLogs.DeleteSubscriptionFilter
- CloudWatchLogs.DescribeDestinations
- CloudWatchLogs.DescribeExportTasks
- CloudWatchLogs.DescribeLogGroups
- CloudWatchLogs.DescribeLogStreams
- CloudWatchLogs.DescribeMetricFilters
- CloudWatchLogs.DescribeSubscriptionFilters
- CloudWatchLogs.FilterLogEvents
- CloudWatchLogs.GetLogEvents
- CloudWatchLogs.PutDestination
- CloudWatchLogs.PutDestinationPolicy
- CloudWatchLogs.PutLogEvents
- CloudWatchLogs.PutMetricFilter
- CloudWatchLogs.PutRetentionPolicy
- CloudWatchLogs.PutSubscriptionFilter
- CloudWatchLogs.TestMetricFilter
Constants ¶
const ( // @enum ExportTaskStatusCode ExportTaskStatusCodeCancelled = "CANCELLED" // @enum ExportTaskStatusCode ExportTaskStatusCodeCompleted = "COMPLETED" // @enum ExportTaskStatusCode ExportTaskStatusCodeFailed = "FAILED" // @enum ExportTaskStatusCode ExportTaskStatusCodePending = "PENDING" // @enum ExportTaskStatusCode ExportTaskStatusCodePendingCancel = "PENDING_CANCEL" // @enum ExportTaskStatusCode ExportTaskStatusCodeRunning = "RUNNING" )
const ( // @enum OrderBy OrderByLogStreamName = "LogStreamName" // @enum OrderBy OrderByLastEventTime = "LastEventTime" )
const ServiceName = "logs"
A ServiceName is the name of the service the client will make API calls to.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelExportTaskInput ¶ added in v0.9.9
type CancelExportTaskInput struct { // Id of the export task to cancel. TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (CancelExportTaskInput) GoString ¶ added in v0.9.9
func (s CancelExportTaskInput) GoString() string
GoString returns the string representation
func (CancelExportTaskInput) String ¶ added in v0.9.9
func (s CancelExportTaskInput) String() string
String returns the string representation
type CancelExportTaskOutput ¶ added in v0.9.9
type CancelExportTaskOutput struct {
// contains filtered or unexported fields
}
func (CancelExportTaskOutput) GoString ¶ added in v0.9.9
func (s CancelExportTaskOutput) GoString() string
GoString returns the string representation
func (CancelExportTaskOutput) String ¶ added in v0.9.9
func (s CancelExportTaskOutput) String() string
String returns the string representation
type CloudWatchLogs ¶
You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon Elastic Compute Cloud (Amazon EC2) instances, Amazon CloudTrail, or other sources. You can then retrieve the associated log data from CloudWatch Logs using the Amazon CloudWatch console, the CloudWatch Logs commands in the AWS CLI, the CloudWatch Logs API, or the CloudWatch Logs SDK.
You can use CloudWatch Logs to:
Monitor Logs from Amazon EC2 Instances in Real-time: You can use CloudWatch
Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs and send you a notification whenever the rate of errors exceeds a threshold you specify. CloudWatch Logs uses your log data for monitoring; so, no code changes are required. For example, you can monitor application logs for specific literal terms (such as "NullReferenceException") or count the number of occurrences of a literal term at a particular position in log data (such as "404" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a Amazon CloudWatch metric that you specify.
Monitor Amazon CloudTrail Logged Events: You can create alarms in Amazon
CloudWatch and receive notifications of particular API activity as captured by CloudTrail and use the notification to perform troubleshooting.
Archive Log Data: You can use CloudWatch Logs to store your log data in
highly durable storage. You can change the log retention setting so that any log events older than this setting are automatically deleted. The CloudWatch Logs agent makes it easy to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it. The service client's operations are safe to be used concurrently. It is not safe to mutate any of the client's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudWatchLogs
New creates a new instance of the CloudWatchLogs 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 CloudWatchLogs client from just a session. svc := cloudwatchlogs.New(mySession) // Create a CloudWatchLogs client with additional configuration svc := cloudwatchlogs.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*CloudWatchLogs) CancelExportTask ¶ added in v0.9.9
func (c *CloudWatchLogs) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error)
Cancels an export task if it is in PENDING or RUNNING state.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.CancelExportTaskInput{ TaskId: aws.String("ExportTaskId"), // Required } resp, err := svc.CancelExportTask(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 (*CloudWatchLogs) CancelExportTaskRequest ¶ added in v0.9.9
func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput)
CancelExportTaskRequest generates a request for the CancelExportTask operation.
func (*CloudWatchLogs) CreateExportTask ¶ added in v0.9.9
func (c *CloudWatchLogs) CreateExportTask(input *CreateExportTaskInput) (*CreateExportTaskOutput, error)
Creates an ExportTask which allows you to efficiently export data from a Log Group to your Amazon S3 bucket.
This is an asynchronous call. If all the required information is provided,
this API will initiate an export task and respond with the task Id. Once started, DescribeExportTasks can be used to get the status of an export task. You can only have one active (RUNNING or PENDING) export task at a time, per account.
You can export logs from multiple log groups or multiple time ranges to
the same Amazon S3 bucket. To separate out log data for each export task, you can specify a prefix that will be used as the Amazon S3 key prefix for all exported objects.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.CreateExportTaskInput{ Destination: aws.String("ExportDestinationBucket"), // Required From: aws.Int64(1), // Required LogGroupName: aws.String("LogGroupName"), // Required To: aws.Int64(1), // Required DestinationPrefix: aws.String("ExportDestinationPrefix"), LogStreamNamePrefix: aws.String("LogStreamName"), TaskName: aws.String("ExportTaskName"), } resp, err := svc.CreateExportTask(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 (*CloudWatchLogs) CreateExportTaskRequest ¶ added in v0.9.9
func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) (req *request.Request, output *CreateExportTaskOutput)
CreateExportTaskRequest generates a request for the CreateExportTask operation.
func (*CloudWatchLogs) CreateLogGroup ¶
func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error)
Creates a new log group with the specified name. The name of the log group must be unique within a region for an AWS account. You can create up to 500 log groups per account.
You must use the following guidelines when naming a log group: Log group
names can be between 1 and 512 characters long. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.CreateLogGroupInput{ LogGroupName: aws.String("LogGroupName"), // Required } resp, err := svc.CreateLogGroup(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 (*CloudWatchLogs) CreateLogGroupRequest ¶
func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput)
CreateLogGroupRequest generates a request for the CreateLogGroup operation.
func (*CloudWatchLogs) CreateLogStream ¶
func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error)
Creates a new log stream in the specified log group. The name of the log stream must be unique within the log group. There is no limit on the number of log streams that can exist in a log group.
You must use the following guidelines when naming a log stream: Log stream
names can be between 1 and 512 characters long. The ':' colon character is not allowed.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.CreateLogStreamInput{ LogGroupName: aws.String("LogGroupName"), // Required LogStreamName: aws.String("LogStreamName"), // Required } resp, err := svc.CreateLogStream(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 (*CloudWatchLogs) CreateLogStreamRequest ¶
func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput)
CreateLogStreamRequest generates a request for the CreateLogStream operation.
func (*CloudWatchLogs) DeleteDestination ¶ added in v0.7.2
func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error)
Deletes the destination with the specified name and eventually disables all the subscription filters that publish to it. This will not delete the physical resource encapsulated by the destination.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DeleteDestinationInput{ DestinationName: aws.String("DestinationName"), // Required } resp, err := svc.DeleteDestination(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 (*CloudWatchLogs) DeleteDestinationRequest ¶ added in v0.7.2
func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput)
DeleteDestinationRequest generates a request for the DeleteDestination operation.
func (*CloudWatchLogs) DeleteLogGroup ¶
func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error)
Deletes the log group with the specified name and permanently deletes all the archived log events associated with it.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DeleteLogGroupInput{ LogGroupName: aws.String("LogGroupName"), // Required } resp, err := svc.DeleteLogGroup(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 (*CloudWatchLogs) DeleteLogGroupRequest ¶
func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput)
DeleteLogGroupRequest generates a request for the DeleteLogGroup operation.
func (*CloudWatchLogs) DeleteLogStream ¶
func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error)
Deletes a log stream and permanently deletes all the archived log events associated with it.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DeleteLogStreamInput{ LogGroupName: aws.String("LogGroupName"), // Required LogStreamName: aws.String("LogStreamName"), // Required } resp, err := svc.DeleteLogStream(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 (*CloudWatchLogs) DeleteLogStreamRequest ¶
func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput)
DeleteLogStreamRequest generates a request for the DeleteLogStream operation.
func (*CloudWatchLogs) DeleteMetricFilter ¶
func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error)
Deletes a metric filter associated with the specified log group.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DeleteMetricFilterInput{ FilterName: aws.String("FilterName"), // Required LogGroupName: aws.String("LogGroupName"), // Required } resp, err := svc.DeleteMetricFilter(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 (*CloudWatchLogs) DeleteMetricFilterRequest ¶
func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput)
DeleteMetricFilterRequest generates a request for the DeleteMetricFilter operation.
func (*CloudWatchLogs) DeleteRetentionPolicy ¶
func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error)
Deletes the retention policy of the specified log group. Log events would not expire if they belong to log groups without a retention policy.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DeleteRetentionPolicyInput{ LogGroupName: aws.String("LogGroupName"), // Required } resp, err := svc.DeleteRetentionPolicy(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 (*CloudWatchLogs) DeleteRetentionPolicyRequest ¶
func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput)
DeleteRetentionPolicyRequest generates a request for the DeleteRetentionPolicy operation.
func (*CloudWatchLogs) DeleteSubscriptionFilter ¶ added in v0.6.1
func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error)
Deletes a subscription filter associated with the specified log group.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DeleteSubscriptionFilterInput{ FilterName: aws.String("FilterName"), // Required LogGroupName: aws.String("LogGroupName"), // Required } resp, err := svc.DeleteSubscriptionFilter(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 (*CloudWatchLogs) DeleteSubscriptionFilterRequest ¶ added in v0.6.1
func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput)
DeleteSubscriptionFilterRequest generates a request for the DeleteSubscriptionFilter operation.
func (*CloudWatchLogs) DescribeDestinations ¶ added in v0.7.2
func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error)
Returns all the destinations that are associated with the AWS account making the request. The list returned in the response is ASCII-sorted by destination name.
By default, this operation returns up to 50 destinations. If there are
more destinations to list, the response would contain a nextToken value in the response body. You can also limit the number of destinations returned in the response by specifying the limit parameter in the request.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DescribeDestinationsInput{ DestinationNamePrefix: aws.String("DestinationName"), Limit: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.DescribeDestinations(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 (*CloudWatchLogs) DescribeDestinationsPages ¶ added in v0.9.9
func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(p *DescribeDestinationsOutput, lastPage bool) (shouldContinue bool)) error
func (*CloudWatchLogs) DescribeDestinationsRequest ¶ added in v0.7.2
func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput)
DescribeDestinationsRequest generates a request for the DescribeDestinations operation.
func (*CloudWatchLogs) DescribeExportTasks ¶ added in v0.9.9
func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error)
Returns all the export tasks that are associated with the AWS account making the request. The export tasks can be filtered based on TaskId or TaskStatus.
By default, this operation returns up to 50 export tasks that satisfy the
specified filters. If there are more export tasks to list, the response would contain a nextToken value in the response body. You can also limit the number of export tasks returned in the response by specifying the limit parameter in the request.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DescribeExportTasksInput{ Limit: aws.Int64(1), NextToken: aws.String("NextToken"), StatusCode: aws.String("ExportTaskStatusCode"), TaskId: aws.String("ExportTaskId"), } resp, err := svc.DescribeExportTasks(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 (*CloudWatchLogs) DescribeExportTasksRequest ¶ added in v0.9.9
func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput)
DescribeExportTasksRequest generates a request for the DescribeExportTasks operation.
func (*CloudWatchLogs) DescribeLogGroups ¶
func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error)
Returns all the log groups that are associated with the AWS account making the request. The list returned in the response is ASCII-sorted by log group name.
By default, this operation returns up to 50 log groups. If there are more
log groups to list, the response would contain a nextToken value in the response body. You can also limit the number of log groups returned in the response by specifying the limit parameter in the request.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DescribeLogGroupsInput{ Limit: aws.Int64(1), LogGroupNamePrefix: aws.String("LogGroupName"), NextToken: aws.String("NextToken"), } resp, err := svc.DescribeLogGroups(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 (*CloudWatchLogs) DescribeLogGroupsPages ¶
func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(p *DescribeLogGroupsOutput, lastPage bool) (shouldContinue bool)) error
func (*CloudWatchLogs) DescribeLogGroupsRequest ¶
func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput)
DescribeLogGroupsRequest generates a request for the DescribeLogGroups operation.
func (*CloudWatchLogs) DescribeLogStreams ¶
func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error)
Returns all the log streams that are associated with the specified log group. The list returned in the response is ASCII-sorted by log stream name.
By default, this operation returns up to 50 log streams. If there are more
log streams to list, the response would contain a nextToken value in the response body. You can also limit the number of log streams returned in the response by specifying the limit parameter in the request. This operation has a limit of five transactions per second, after which transactions are throttled.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DescribeLogStreamsInput{ LogGroupName: aws.String("LogGroupName"), // Required Descending: aws.Bool(true), Limit: aws.Int64(1), LogStreamNamePrefix: aws.String("LogStreamName"), NextToken: aws.String("NextToken"), OrderBy: aws.String("OrderBy"), } resp, err := svc.DescribeLogStreams(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 (*CloudWatchLogs) DescribeLogStreamsPages ¶
func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(p *DescribeLogStreamsOutput, lastPage bool) (shouldContinue bool)) error
func (*CloudWatchLogs) DescribeLogStreamsRequest ¶
func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput)
DescribeLogStreamsRequest generates a request for the DescribeLogStreams operation.
func (*CloudWatchLogs) DescribeMetricFilters ¶
func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error)
Returns all the metrics filters associated with the specified log group. The list returned in the response is ASCII-sorted by filter name.
By default, this operation returns up to 50 metric filters. If there are
more metric filters to list, the response would contain a nextToken value in the response body. You can also limit the number of metric filters returned in the response by specifying the limit parameter in the request.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DescribeMetricFiltersInput{ LogGroupName: aws.String("LogGroupName"), // Required FilterNamePrefix: aws.String("FilterName"), Limit: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.DescribeMetricFilters(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 (*CloudWatchLogs) DescribeMetricFiltersPages ¶
func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(p *DescribeMetricFiltersOutput, lastPage bool) (shouldContinue bool)) error
func (*CloudWatchLogs) DescribeMetricFiltersRequest ¶
func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput)
DescribeMetricFiltersRequest generates a request for the DescribeMetricFilters operation.
func (*CloudWatchLogs) DescribeSubscriptionFilters ¶ added in v0.6.1
func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error)
Returns all the subscription filters associated with the specified log group. The list returned in the response is ASCII-sorted by filter name.
By default, this operation returns up to 50 subscription filters. If there
are more subscription filters to list, the response would contain a nextToken value in the response body. You can also limit the number of subscription filters returned in the response by specifying the limit parameter in the request.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.DescribeSubscriptionFiltersInput{ LogGroupName: aws.String("LogGroupName"), // Required FilterNamePrefix: aws.String("FilterName"), Limit: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.DescribeSubscriptionFilters(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 (*CloudWatchLogs) DescribeSubscriptionFiltersPages ¶ added in v0.9.9
func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(p *DescribeSubscriptionFiltersOutput, lastPage bool) (shouldContinue bool)) error
func (*CloudWatchLogs) DescribeSubscriptionFiltersRequest ¶ added in v0.6.1
func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput)
DescribeSubscriptionFiltersRequest generates a request for the DescribeSubscriptionFilters operation.
func (*CloudWatchLogs) FilterLogEvents ¶
func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error)
Retrieves log events, optionally filtered by a filter pattern from the specified log group. You can provide an optional time range to filter the results on the event timestamp. You can limit the streams searched to an explicit list of logStreamNames.
By default, this operation returns as much matching log events as can fit
in a response size of 1MB, up to 10,000 log events, or all the events found within a time-bounded scan window. If the response includes a nextToken, then there is more data to search, and the search can be resumed with a new request providing the nextToken. The response will contain a list of searchedLogStreams that contains information about which streams were searched in the request and whether they have been searched completely or require further pagination. The limit parameter in the request. can be used to specify the maximum number of events to return in a page.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.FilterLogEventsInput{ LogGroupName: aws.String("LogGroupName"), // Required EndTime: aws.Int64(1), FilterPattern: aws.String("FilterPattern"), Interleaved: aws.Bool(true), Limit: aws.Int64(1), LogStreamNames: []*string{ aws.String("LogStreamName"), // Required // More values... }, NextToken: aws.String("NextToken"), StartTime: aws.Int64(1), } resp, err := svc.FilterLogEvents(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 (*CloudWatchLogs) FilterLogEventsPages ¶ added in v0.9.9
func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(p *FilterLogEventsOutput, lastPage bool) (shouldContinue bool)) error
func (*CloudWatchLogs) FilterLogEventsRequest ¶
func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput)
FilterLogEventsRequest generates a request for the FilterLogEvents operation.
func (*CloudWatchLogs) GetLogEvents ¶
func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error)
Retrieves log events from the specified log stream. You can provide an optional time range to filter the results on the event timestamp.
By default, this operation returns as much log events as can fit in a response
size of 1MB, up to 10,000 log events. The response will always include a nextForwardToken and a nextBackwardToken in the response body. You can use any of these tokens in subsequent GetLogEvents requests to paginate through events in either forward or backward direction. You can also limit the number of log events returned in the response by specifying the limit parameter in the request.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.GetLogEventsInput{ LogGroupName: aws.String("LogGroupName"), // Required LogStreamName: aws.String("LogStreamName"), // Required EndTime: aws.Int64(1), Limit: aws.Int64(1), NextToken: aws.String("NextToken"), StartFromHead: aws.Bool(true), StartTime: aws.Int64(1), } resp, err := svc.GetLogEvents(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 (*CloudWatchLogs) GetLogEventsPages ¶
func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(p *GetLogEventsOutput, lastPage bool) (shouldContinue bool)) error
func (*CloudWatchLogs) GetLogEventsRequest ¶
func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput)
GetLogEventsRequest generates a request for the GetLogEvents operation.
func (*CloudWatchLogs) PutDestination ¶ added in v0.7.2
func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error)
Creates or updates a Destination. A destination encapsulates a physical resource (such as a Kinesis stream) and allows you to subscribe to a real-time stream of log events of a different account, ingested through PutLogEvents requests. Currently, the only supported physical resource is a Amazon Kinesis stream belonging to the same account as the destination.
A destination controls what is written to its Amazon Kinesis stream through
an access policy. By default, PutDestination does not set any access policy with the destination, which means a cross-account user will not be able to call PutSubscriptionFilter against this destination. To enable that, the destination owner must call PutDestinationPolicy after PutDestination.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.PutDestinationInput{ DestinationName: aws.String("DestinationName"), // Required RoleArn: aws.String("RoleArn"), // Required TargetArn: aws.String("TargetArn"), // Required } resp, err := svc.PutDestination(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 (*CloudWatchLogs) PutDestinationPolicy ¶ added in v0.7.2
func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error)
Creates or updates an access policy associated with an existing Destination. An access policy is an IAM policy document (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) that is used to authorize claims to register a subscription filter against a given destination.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.PutDestinationPolicyInput{ AccessPolicy: aws.String("AccessPolicy"), // Required DestinationName: aws.String("DestinationName"), // Required } resp, err := svc.PutDestinationPolicy(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 (*CloudWatchLogs) PutDestinationPolicyRequest ¶ added in v0.7.2
func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput)
PutDestinationPolicyRequest generates a request for the PutDestinationPolicy operation.
func (*CloudWatchLogs) PutDestinationRequest ¶ added in v0.7.2
func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput)
PutDestinationRequest generates a request for the PutDestination operation.
func (*CloudWatchLogs) PutLogEvents ¶
func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error)
Uploads a batch of log events to the specified log stream.
Every PutLogEvents request must include the sequenceToken obtained from
the response of the previous request. An upload in a newly created log stream does not require a sequenceToken.
The batch of events must satisfy the following constraints: The maximum
batch size is 1,048,576 bytes, and this size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event. None of the log events in the batch can be more than 2 hours in the future. None of the log events in the batch can be older than 14 days or the retention period of the log group. The log events in the batch must be in chronological ordered by their timestamp. The maximum number of log events in a batch is 10,000. A batch of log events in a single PutLogEvents request cannot span more than 24 hours. Otherwise, the PutLogEvents operation will fail.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.PutLogEventsInput{ LogEvents: []*cloudwatchlogs.InputLogEvent{ // Required { // Required Message: aws.String("EventMessage"), // Required Timestamp: aws.Int64(1), // Required }, // More values... }, LogGroupName: aws.String("LogGroupName"), // Required LogStreamName: aws.String("LogStreamName"), // Required SequenceToken: aws.String("SequenceToken"), } resp, err := svc.PutLogEvents(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 (*CloudWatchLogs) PutLogEventsRequest ¶
func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput)
PutLogEventsRequest generates a request for the PutLogEvents operation.
func (*CloudWatchLogs) PutMetricFilter ¶
func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error)
Creates or updates a metric filter and associates it with the specified log group. Metric filters allow you to configure rules to extract metric data from log events ingested through PutLogEvents requests.
The maximum number of metric filters that can be associated with a log
group is 100.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.PutMetricFilterInput{ FilterName: aws.String("FilterName"), // Required FilterPattern: aws.String("FilterPattern"), // Required LogGroupName: aws.String("LogGroupName"), // Required MetricTransformations: []*cloudwatchlogs.MetricTransformation{ // Required { // Required MetricName: aws.String("MetricName"), // Required MetricNamespace: aws.String("MetricNamespace"), // Required MetricValue: aws.String("MetricValue"), // Required }, // More values... }, } resp, err := svc.PutMetricFilter(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 (*CloudWatchLogs) PutMetricFilterRequest ¶
func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput)
PutMetricFilterRequest generates a request for the PutMetricFilter operation.
func (*CloudWatchLogs) PutRetentionPolicy ¶
func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error)
Sets the retention of the specified log group. A retention policy allows you to configure the number of days you want to retain log events in the specified log group.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.PutRetentionPolicyInput{ LogGroupName: aws.String("LogGroupName"), // Required RetentionInDays: aws.Int64(1), // Required } resp, err := svc.PutRetentionPolicy(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 (*CloudWatchLogs) PutRetentionPolicyRequest ¶
func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput)
PutRetentionPolicyRequest generates a request for the PutRetentionPolicy operation.
func (*CloudWatchLogs) PutSubscriptionFilter ¶ added in v0.6.1
func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error)
Creates or updates a subscription filter and associates it with the specified log group. Subscription filters allow you to subscribe to a real-time stream of log events ingested through PutLogEvents requests and have them delivered to a specific destination. Currently, the supported destinations are: An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery. A logical destination (used via an ARN of Destination) belonging to a different account, for cross-account delivery. An Amazon Kinesis Firehose stream belonging to the same account as the subscription filter, for same-account delivery. An AWS Lambda function belonging to the same account as the subscription filter, for same-account delivery.
Currently there can only be one subscription filter associated with a log
group.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.PutSubscriptionFilterInput{ DestinationArn: aws.String("DestinationArn"), // Required FilterName: aws.String("FilterName"), // Required FilterPattern: aws.String("FilterPattern"), // Required LogGroupName: aws.String("LogGroupName"), // Required RoleArn: aws.String("RoleArn"), } resp, err := svc.PutSubscriptionFilter(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 (*CloudWatchLogs) PutSubscriptionFilterRequest ¶ added in v0.6.1
func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput)
PutSubscriptionFilterRequest generates a request for the PutSubscriptionFilter operation.
func (*CloudWatchLogs) TestMetricFilter ¶
func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error)
Tests the filter pattern of a metric filter against a sample of log event messages. You can use this operation to validate the correctness of a metric filter pattern.
Example ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" ) func main() { svc := cloudwatchlogs.New(session.New()) params := &cloudwatchlogs.TestMetricFilterInput{ FilterPattern: aws.String("FilterPattern"), // Required LogEventMessages: []*string{ // Required aws.String("EventMessage"), // Required // More values... }, } resp, err := svc.TestMetricFilter(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 (*CloudWatchLogs) TestMetricFilterRequest ¶
func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput)
TestMetricFilterRequest generates a request for the TestMetricFilter operation.
type CreateExportTaskInput ¶ added in v0.9.9
type CreateExportTaskInput struct { // Name of Amazon S3 bucket to which the log data will be exported. // // Note: Only buckets in the same AWS region are supported. Destination *string `locationName:"destination" min:"1" type:"string" required:"true"` // Prefix that will be used as the start of Amazon S3 key for every object exported. // If not specified, this defaults to 'exportedlogs'. DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. It indicates the start time of the range for the request. Events // with a timestamp prior to this time will not be exported. From *int64 `locationName:"from" type:"long" required:"true"` // The name of the log group to export. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // Will only export log streams that match the provided logStreamNamePrefix. // If you don't specify a value, no prefix filter is applied. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` // The name of the export task. TaskName *string `locationName:"taskName" min:"1" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. It indicates the end time of the range for the request. Events // with a timestamp later than this time will not be exported. To *int64 `locationName:"to" type:"long" required:"true"` // contains filtered or unexported fields }
func (CreateExportTaskInput) GoString ¶ added in v0.9.9
func (s CreateExportTaskInput) GoString() string
GoString returns the string representation
func (CreateExportTaskInput) String ¶ added in v0.9.9
func (s CreateExportTaskInput) String() string
String returns the string representation
type CreateExportTaskOutput ¶ added in v0.9.9
type CreateExportTaskOutput struct { // Id of the export task that got created. TaskId *string `locationName:"taskId" min:"1" type:"string"` // contains filtered or unexported fields }
func (CreateExportTaskOutput) GoString ¶ added in v0.9.9
func (s CreateExportTaskOutput) GoString() string
GoString returns the string representation
func (CreateExportTaskOutput) String ¶ added in v0.9.9
func (s CreateExportTaskOutput) String() string
String returns the string representation
type CreateLogGroupInput ¶
type CreateLogGroupInput struct { // The name of the log group to create. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (CreateLogGroupInput) GoString ¶ added in v0.6.6
func (s CreateLogGroupInput) GoString() string
GoString returns the string representation
func (CreateLogGroupInput) String ¶ added in v0.6.6
func (s CreateLogGroupInput) String() string
String returns the string representation
type CreateLogGroupOutput ¶
type CreateLogGroupOutput struct {
// contains filtered or unexported fields
}
func (CreateLogGroupOutput) GoString ¶ added in v0.6.6
func (s CreateLogGroupOutput) GoString() string
GoString returns the string representation
func (CreateLogGroupOutput) String ¶ added in v0.6.6
func (s CreateLogGroupOutput) String() string
String returns the string representation
type CreateLogStreamInput ¶
type CreateLogStreamInput struct { // The name of the log group under which the log stream is to be created. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // The name of the log stream to create. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (CreateLogStreamInput) GoString ¶ added in v0.6.6
func (s CreateLogStreamInput) GoString() string
GoString returns the string representation
func (CreateLogStreamInput) String ¶ added in v0.6.6
func (s CreateLogStreamInput) String() string
String returns the string representation
type CreateLogStreamOutput ¶
type CreateLogStreamOutput struct {
// contains filtered or unexported fields
}
func (CreateLogStreamOutput) GoString ¶ added in v0.6.6
func (s CreateLogStreamOutput) GoString() string
GoString returns the string representation
func (CreateLogStreamOutput) String ¶ added in v0.6.6
func (s CreateLogStreamOutput) String() string
String returns the string representation
type DeleteDestinationInput ¶ added in v0.7.2
type DeleteDestinationInput struct { // The name of destination to delete. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteDestinationInput) GoString ¶ added in v0.7.2
func (s DeleteDestinationInput) GoString() string
GoString returns the string representation
func (DeleteDestinationInput) String ¶ added in v0.7.2
func (s DeleteDestinationInput) String() string
String returns the string representation
type DeleteDestinationOutput ¶ added in v0.7.2
type DeleteDestinationOutput struct {
// contains filtered or unexported fields
}
func (DeleteDestinationOutput) GoString ¶ added in v0.7.2
func (s DeleteDestinationOutput) GoString() string
GoString returns the string representation
func (DeleteDestinationOutput) String ¶ added in v0.7.2
func (s DeleteDestinationOutput) String() string
String returns the string representation
type DeleteLogGroupInput ¶
type DeleteLogGroupInput struct { // The name of the log group to delete. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteLogGroupInput) GoString ¶ added in v0.6.6
func (s DeleteLogGroupInput) GoString() string
GoString returns the string representation
func (DeleteLogGroupInput) String ¶ added in v0.6.6
func (s DeleteLogGroupInput) String() string
String returns the string representation
type DeleteLogGroupOutput ¶
type DeleteLogGroupOutput struct {
// contains filtered or unexported fields
}
func (DeleteLogGroupOutput) GoString ¶ added in v0.6.6
func (s DeleteLogGroupOutput) GoString() string
GoString returns the string representation
func (DeleteLogGroupOutput) String ¶ added in v0.6.6
func (s DeleteLogGroupOutput) String() string
String returns the string representation
type DeleteLogStreamInput ¶
type DeleteLogStreamInput struct { // The name of the log group under which the log stream to delete belongs. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // The name of the log stream to delete. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteLogStreamInput) GoString ¶ added in v0.6.6
func (s DeleteLogStreamInput) GoString() string
GoString returns the string representation
func (DeleteLogStreamInput) String ¶ added in v0.6.6
func (s DeleteLogStreamInput) String() string
String returns the string representation
type DeleteLogStreamOutput ¶
type DeleteLogStreamOutput struct {
// contains filtered or unexported fields
}
func (DeleteLogStreamOutput) GoString ¶ added in v0.6.6
func (s DeleteLogStreamOutput) GoString() string
GoString returns the string representation
func (DeleteLogStreamOutput) String ¶ added in v0.6.6
func (s DeleteLogStreamOutput) String() string
String returns the string representation
type DeleteMetricFilterInput ¶
type DeleteMetricFilterInput struct { // The name of the metric filter to delete. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` // The name of the log group that is associated with the metric filter to delete. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteMetricFilterInput) GoString ¶ added in v0.6.6
func (s DeleteMetricFilterInput) GoString() string
GoString returns the string representation
func (DeleteMetricFilterInput) String ¶ added in v0.6.6
func (s DeleteMetricFilterInput) String() string
String returns the string representation
type DeleteMetricFilterOutput ¶
type DeleteMetricFilterOutput struct {
// contains filtered or unexported fields
}
func (DeleteMetricFilterOutput) GoString ¶ added in v0.6.6
func (s DeleteMetricFilterOutput) GoString() string
GoString returns the string representation
func (DeleteMetricFilterOutput) String ¶ added in v0.6.6
func (s DeleteMetricFilterOutput) String() string
String returns the string representation
type DeleteRetentionPolicyInput ¶
type DeleteRetentionPolicyInput struct { // The name of the log group that is associated with the retention policy to // delete. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteRetentionPolicyInput) GoString ¶ added in v0.6.6
func (s DeleteRetentionPolicyInput) GoString() string
GoString returns the string representation
func (DeleteRetentionPolicyInput) String ¶ added in v0.6.6
func (s DeleteRetentionPolicyInput) String() string
String returns the string representation
type DeleteRetentionPolicyOutput ¶
type DeleteRetentionPolicyOutput struct {
// contains filtered or unexported fields
}
func (DeleteRetentionPolicyOutput) GoString ¶ added in v0.6.6
func (s DeleteRetentionPolicyOutput) GoString() string
GoString returns the string representation
func (DeleteRetentionPolicyOutput) String ¶ added in v0.6.6
func (s DeleteRetentionPolicyOutput) String() string
String returns the string representation
type DeleteSubscriptionFilterInput ¶ added in v0.6.1
type DeleteSubscriptionFilterInput struct { // The name of the subscription filter to delete. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` // The name of the log group that is associated with the subscription filter // to delete. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (DeleteSubscriptionFilterInput) GoString ¶ added in v0.6.6
func (s DeleteSubscriptionFilterInput) GoString() string
GoString returns the string representation
func (DeleteSubscriptionFilterInput) String ¶ added in v0.6.6
func (s DeleteSubscriptionFilterInput) String() string
String returns the string representation
type DeleteSubscriptionFilterOutput ¶ added in v0.6.1
type DeleteSubscriptionFilterOutput struct {
// contains filtered or unexported fields
}
func (DeleteSubscriptionFilterOutput) GoString ¶ added in v0.6.6
func (s DeleteSubscriptionFilterOutput) GoString() string
GoString returns the string representation
func (DeleteSubscriptionFilterOutput) String ¶ added in v0.6.6
func (s DeleteSubscriptionFilterOutput) String() string
String returns the string representation
type DescribeDestinationsInput ¶ added in v0.7.2
type DescribeDestinationsInput struct { // Will only return destinations that match the provided destinationNamePrefix. // If you don't specify a value, no prefix is applied. DestinationNamePrefix *string `min:"1" type:"string"` // The maximum number of results to return. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeDestinationsInput) GoString ¶ added in v0.7.2
func (s DescribeDestinationsInput) GoString() string
GoString returns the string representation
func (DescribeDestinationsInput) String ¶ added in v0.7.2
func (s DescribeDestinationsInput) String() string
String returns the string representation
type DescribeDestinationsOutput ¶ added in v0.7.2
type DescribeDestinationsOutput struct { Destinations []*Destination `locationName:"destinations" type:"list"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeDestinationsOutput) GoString ¶ added in v0.7.2
func (s DescribeDestinationsOutput) GoString() string
GoString returns the string representation
func (DescribeDestinationsOutput) String ¶ added in v0.7.2
func (s DescribeDestinationsOutput) String() string
String returns the string representation
type DescribeExportTasksInput ¶ added in v0.9.9
type DescribeExportTasksInput struct { // The maximum number of items returned in the response. If you don't specify // a value, the request would return up to 50 items. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous DescribeExportTasks // request. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // All export tasks that matches the specified status code will be returned. // This can return zero or more export tasks. StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"` // Export task that matches the specified task Id will be returned. This can // result in zero or one export task. TaskId *string `locationName:"taskId" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeExportTasksInput) GoString ¶ added in v0.9.9
func (s DescribeExportTasksInput) GoString() string
GoString returns the string representation
func (DescribeExportTasksInput) String ¶ added in v0.9.9
func (s DescribeExportTasksInput) String() string
String returns the string representation
type DescribeExportTasksOutput ¶ added in v0.9.9
type DescribeExportTasksOutput struct { // A list of export tasks. ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeExportTasksOutput) GoString ¶ added in v0.9.9
func (s DescribeExportTasksOutput) GoString() string
GoString returns the string representation
func (DescribeExportTasksOutput) String ¶ added in v0.9.9
func (s DescribeExportTasksOutput) String() string
String returns the string representation
type DescribeLogGroupsInput ¶
type DescribeLogGroupsInput struct { // The maximum number of items returned in the response. If you don't specify // a value, the request would return up to 50 items. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // Will only return log groups that match the provided logGroupNamePrefix. If // you don't specify a value, no prefix filter is applied. LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous DescribeLogGroups // request. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeLogGroupsInput) GoString ¶ added in v0.6.6
func (s DescribeLogGroupsInput) GoString() string
GoString returns the string representation
func (DescribeLogGroupsInput) String ¶ added in v0.6.6
func (s DescribeLogGroupsInput) String() string
String returns the string representation
type DescribeLogGroupsOutput ¶
type DescribeLogGroupsOutput struct { // A list of log groups. LogGroups []*LogGroup `locationName:"logGroups" type:"list"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeLogGroupsOutput) GoString ¶ added in v0.6.6
func (s DescribeLogGroupsOutput) GoString() string
GoString returns the string representation
func (DescribeLogGroupsOutput) String ¶ added in v0.6.6
func (s DescribeLogGroupsOutput) String() string
String returns the string representation
type DescribeLogStreamsInput ¶
type DescribeLogStreamsInput struct { // If set to true, results are returned in descending order. If you don't specify // a value or set it to false, results are returned in ascending order. Descending *bool `locationName:"descending" type:"boolean"` // The maximum number of items returned in the response. If you don't specify // a value, the request would return up to 50 items. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The log group name for which log streams are to be listed. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // Will only return log streams that match the provided logStreamNamePrefix. // If you don't specify a value, no prefix filter is applied. LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous DescribeLogStreams // request. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // Specifies what to order the returned log streams by. Valid arguments are // 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results // are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot // also contain a logStreamNamePrefix. OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` // contains filtered or unexported fields }
func (DescribeLogStreamsInput) GoString ¶ added in v0.6.6
func (s DescribeLogStreamsInput) GoString() string
GoString returns the string representation
func (DescribeLogStreamsInput) String ¶ added in v0.6.6
func (s DescribeLogStreamsInput) String() string
String returns the string representation
type DescribeLogStreamsOutput ¶
type DescribeLogStreamsOutput struct { // A list of log streams. LogStreams []*LogStream `locationName:"logStreams" type:"list"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeLogStreamsOutput) GoString ¶ added in v0.6.6
func (s DescribeLogStreamsOutput) GoString() string
GoString returns the string representation
func (DescribeLogStreamsOutput) String ¶ added in v0.6.6
func (s DescribeLogStreamsOutput) String() string
String returns the string representation
type DescribeMetricFiltersInput ¶
type DescribeMetricFiltersInput struct { // Will only return metric filters that match the provided filterNamePrefix. // If you don't specify a value, no prefix filter is applied. FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` // The maximum number of items returned in the response. If you don't specify // a value, the request would return up to 50 items. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The log group name for which metric filters are to be listed. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous DescribeMetricFilters // request. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeMetricFiltersInput) GoString ¶ added in v0.6.6
func (s DescribeMetricFiltersInput) GoString() string
GoString returns the string representation
func (DescribeMetricFiltersInput) String ¶ added in v0.6.6
func (s DescribeMetricFiltersInput) String() string
String returns the string representation
type DescribeMetricFiltersOutput ¶
type DescribeMetricFiltersOutput struct { MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeMetricFiltersOutput) GoString ¶ added in v0.6.6
func (s DescribeMetricFiltersOutput) GoString() string
GoString returns the string representation
func (DescribeMetricFiltersOutput) String ¶ added in v0.6.6
func (s DescribeMetricFiltersOutput) String() string
String returns the string representation
type DescribeSubscriptionFiltersInput ¶ added in v0.6.1
type DescribeSubscriptionFiltersInput struct { // Will only return subscription filters that match the provided filterNamePrefix. // If you don't specify a value, no prefix filter is applied. FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` // The maximum number of results to return. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The log group name for which subscription filters are to be listed. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (DescribeSubscriptionFiltersInput) GoString ¶ added in v0.6.6
func (s DescribeSubscriptionFiltersInput) GoString() string
GoString returns the string representation
func (DescribeSubscriptionFiltersInput) String ¶ added in v0.6.6
func (s DescribeSubscriptionFiltersInput) String() string
String returns the string representation
type DescribeSubscriptionFiltersOutput ¶ added in v0.6.1
type DescribeSubscriptionFiltersOutput struct { // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"` // contains filtered or unexported fields }
func (DescribeSubscriptionFiltersOutput) GoString ¶ added in v0.6.6
func (s DescribeSubscriptionFiltersOutput) GoString() string
GoString returns the string representation
func (DescribeSubscriptionFiltersOutput) String ¶ added in v0.6.6
func (s DescribeSubscriptionFiltersOutput) String() string
String returns the string representation
type Destination ¶ added in v0.7.2
type Destination struct { // An IAM policy document that governs which AWS accounts can create subscription // filters against this destination. AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"` // ARN of this destination. Arn *string `locationName:"arn" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC specifying when this destination was created. CreationTime *int64 `locationName:"creationTime" type:"long"` // Name of the destination. DestinationName *string `locationName:"destinationName" min:"1" type:"string"` // A role for impersonation for delivering log events to the target. RoleArn *string `locationName:"roleArn" min:"1" type:"string"` // ARN of the physical target where the log events will be delivered (eg. ARN // of a Kinesis stream). TargetArn *string `locationName:"targetArn" min:"1" type:"string"` // contains filtered or unexported fields }
A cross account destination that is the recipient of subscription log events.
func (Destination) GoString ¶ added in v0.7.2
func (s Destination) GoString() string
GoString returns the string representation
func (Destination) String ¶ added in v0.7.2
func (s Destination) String() string
String returns the string representation
type ExportTask ¶ added in v0.9.9
type ExportTask struct { // Name of Amazon S3 bucket to which the log data was exported. Destination *string `locationName:"destination" min:"1" type:"string"` // Prefix that was used as the start of Amazon S3 key for every object exported. DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` // Execution info about the export task. ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. Events with a timestamp prior to this time are not exported. From *int64 `locationName:"from" type:"long"` // The name of the log group from which logs data was exported. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` // Status of the export task. Status *ExportTaskStatus `locationName:"status" type:"structure"` // Id of the export task. TaskId *string `locationName:"taskId" min:"1" type:"string"` // The name of the export task. TaskName *string `locationName:"taskName" min:"1" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. Events with a timestamp later than this time are not exported. To *int64 `locationName:"to" type:"long"` // contains filtered or unexported fields }
Represents an export task.
func (ExportTask) GoString ¶ added in v0.9.9
func (s ExportTask) GoString() string
GoString returns the string representation
func (ExportTask) String ¶ added in v0.9.9
func (s ExportTask) String() string
String returns the string representation
type ExportTaskExecutionInfo ¶ added in v0.9.9
type ExportTaskExecutionInfo struct { // A point in time when the export task got completed. CompletionTime *int64 `locationName:"completionTime" type:"long"` // A point in time when the export task got created. CreationTime *int64 `locationName:"creationTime" type:"long"` // contains filtered or unexported fields }
Represents the status of an export task.
func (ExportTaskExecutionInfo) GoString ¶ added in v0.9.9
func (s ExportTaskExecutionInfo) GoString() string
GoString returns the string representation
func (ExportTaskExecutionInfo) String ¶ added in v0.9.9
func (s ExportTaskExecutionInfo) String() string
String returns the string representation
type ExportTaskStatus ¶ added in v0.9.9
type ExportTaskStatus struct { // Status code of the export task. Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"` // Status message related to the code. Message *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
Represents the status of an export task.
func (ExportTaskStatus) GoString ¶ added in v0.9.9
func (s ExportTaskStatus) GoString() string
GoString returns the string representation
func (ExportTaskStatus) String ¶ added in v0.9.9
func (s ExportTaskStatus) String() string
String returns the string representation
type FilterLogEventsInput ¶
type FilterLogEventsInput struct { // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. If provided, events with a timestamp later than this time are // not returned. EndTime *int64 `locationName:"endTime" type:"long"` // A valid CloudWatch Logs filter pattern to use for filtering the response. // If not provided, all the events are matched. FilterPattern *string `locationName:"filterPattern" type:"string"` // If provided, the API will make a best effort to provide responses that contain // events from multiple log streams within the log group interleaved in a single // response. If not provided, all the matched log events in the first log stream // will be searched first, then those in the next log stream, etc. Interleaved *bool `locationName:"interleaved" type:"boolean"` // The maximum number of events to return in a page of results. Default is 10,000 // events. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The name of the log group to query. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // Optional list of log stream names within the specified log group to search. // Defaults to all the log streams in the log group. LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` // A pagination token obtained from a FilterLogEvents response to continue paginating // the FilterLogEvents results. This token is omitted from the response when // there are no other events to display. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. If provided, events with a timestamp prior to this time are // not returned. StartTime *int64 `locationName:"startTime" type:"long"` // contains filtered or unexported fields }
func (FilterLogEventsInput) GoString ¶ added in v0.6.6
func (s FilterLogEventsInput) GoString() string
GoString returns the string representation
func (FilterLogEventsInput) String ¶ added in v0.6.6
func (s FilterLogEventsInput) String() string
String returns the string representation
type FilterLogEventsOutput ¶
type FilterLogEventsOutput struct { // A list of FilteredLogEvent objects representing the matched events from the // request. Events []*FilteredLogEvent `locationName:"events" type:"list"` // A pagination token obtained from a FilterLogEvents response to continue paginating // the FilterLogEvents results. This token is omitted from the response when // there are no other events to display. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // A list of SearchedLogStream objects indicating which log streams have been // searched in this request and whether each has been searched completely or // still has more to be paginated. SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"` // contains filtered or unexported fields }
func (FilterLogEventsOutput) GoString ¶ added in v0.6.6
func (s FilterLogEventsOutput) GoString() string
GoString returns the string representation
func (FilterLogEventsOutput) String ¶ added in v0.6.6
func (s FilterLogEventsOutput) String() string
String returns the string representation
type FilteredLogEvent ¶
type FilteredLogEvent struct { // A unique identifier for this event. EventId *string `locationName:"eventId" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. IngestionTime *int64 `locationName:"ingestionTime" type:"long"` // The name of the log stream this event belongs to. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` // The data contained in the log event. Message *string `locationName:"message" min:"1" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. Timestamp *int64 `locationName:"timestamp" type:"long"` // contains filtered or unexported fields }
Represents a matched event from a FilterLogEvents request.
func (FilteredLogEvent) GoString ¶ added in v0.6.6
func (s FilteredLogEvent) GoString() string
GoString returns the string representation
func (FilteredLogEvent) String ¶ added in v0.6.6
func (s FilteredLogEvent) String() string
String returns the string representation
type GetLogEventsInput ¶
type GetLogEventsInput struct { // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. EndTime *int64 `locationName:"endTime" type:"long"` // The maximum number of log events returned in the response. If you don't specify // a value, the request would return as many log events as can fit in a response // size of 1MB, up to 10,000 log events. Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The name of the log group to query. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // The name of the log stream to query. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the nextForwardToken or nextBackwardToken // fields in the response of the previous GetLogEvents request. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // If set to true, the earliest log events would be returned first. The default // is false (the latest log events are returned first). StartFromHead *bool `locationName:"startFromHead" type:"boolean"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. StartTime *int64 `locationName:"startTime" type:"long"` // contains filtered or unexported fields }
func (GetLogEventsInput) GoString ¶ added in v0.6.6
func (s GetLogEventsInput) GoString() string
GoString returns the string representation
func (GetLogEventsInput) String ¶ added in v0.6.6
func (s GetLogEventsInput) String() string
String returns the string representation
type GetLogEventsOutput ¶
type GetLogEventsOutput struct { Events []*OutputLogEvent `locationName:"events" type:"list"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextBackwardToken *string `locationName:"nextBackwardToken" min:"1" type:"string"` // A string token used for pagination that points to the next page of results. // It must be a value obtained from the response of the previous request. The // token expires after 24 hours. NextForwardToken *string `locationName:"nextForwardToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (GetLogEventsOutput) GoString ¶ added in v0.6.6
func (s GetLogEventsOutput) GoString() string
GoString returns the string representation
func (GetLogEventsOutput) String ¶ added in v0.6.6
func (s GetLogEventsOutput) String() string
String returns the string representation
type InputLogEvent ¶
type InputLogEvent struct { Message *string `locationName:"message" min:"1" type:"string" required:"true"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. Timestamp *int64 `locationName:"timestamp" type:"long" required:"true"` // contains filtered or unexported fields }
A log event is a record of some activity that was recorded by the application or resource being monitored. The log event record that CloudWatch Logs understands contains two properties: the timestamp of when the event occurred, and the raw event message.
func (InputLogEvent) GoString ¶ added in v0.6.6
func (s InputLogEvent) GoString() string
GoString returns the string representation
func (InputLogEvent) String ¶ added in v0.6.6
func (s InputLogEvent) String() string
String returns the string representation
type LogGroup ¶
type LogGroup struct { Arn *string `locationName:"arn" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` // The number of metric filters associated with the log group. MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"` // Specifies the number of days you want to retain log events in the specified // log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, // 365, 400, 545, 731, 1827, 3653. RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"` StoredBytes *int64 `locationName:"storedBytes" type:"long"` // contains filtered or unexported fields }
type LogStream ¶
type LogStream struct { Arn *string `locationName:"arn" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"` LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` StoredBytes *int64 `locationName:"storedBytes" type:"long"` // A string token used for making PutLogEvents requests. A sequenceToken can // only be used once, and PutLogEvents requests must include the sequenceToken // obtained from the response of the previous request. UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"` // contains filtered or unexported fields }
A log stream is sequence of log events from a single emitter of logs.
type MetricFilter ¶
type MetricFilter struct { // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` // A name for a metric or subscription filter. FilterName *string `locationName:"filterName" min:"1" type:"string"` // A symbolic description of how CloudWatch Logs should interpret the data in // each log event. For example, a log event may contain timestamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. FilterPattern *string `locationName:"filterPattern" type:"string"` MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"` // contains filtered or unexported fields }
Metric filters can be used to express how CloudWatch Logs would extract metric observations from ingested log events and transform them to metric data in a CloudWatch metric.
func (MetricFilter) GoString ¶ added in v0.6.6
func (s MetricFilter) GoString() string
GoString returns the string representation
func (MetricFilter) String ¶ added in v0.6.6
func (s MetricFilter) String() string
String returns the string representation
type MetricFilterMatchRecord ¶
type MetricFilterMatchRecord struct { EventMessage *string `locationName:"eventMessage" min:"1" type:"string"` EventNumber *int64 `locationName:"eventNumber" type:"long"` ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"` // contains filtered or unexported fields }
func (MetricFilterMatchRecord) GoString ¶ added in v0.6.6
func (s MetricFilterMatchRecord) GoString() string
GoString returns the string representation
func (MetricFilterMatchRecord) String ¶ added in v0.6.6
func (s MetricFilterMatchRecord) String() string
String returns the string representation
type MetricTransformation ¶
type MetricTransformation struct { // The name of the CloudWatch metric to which the monitored log information // should be published. For example, you may publish to a metric called ErrorCount. MetricName *string `locationName:"metricName" type:"string" required:"true"` // The destination namespace of the new CloudWatch metric. MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` // What to publish to the metric. For example, if you're counting the occurrences // of a particular term like "Error", the value will be "1" for each occurrence. // If you're counting the bytes transferred the published value will be the // value in the log event. MetricValue *string `locationName:"metricValue" type:"string" required:"true"` // contains filtered or unexported fields }
func (MetricTransformation) GoString ¶ added in v0.6.6
func (s MetricTransformation) GoString() string
GoString returns the string representation
func (MetricTransformation) String ¶ added in v0.6.6
func (s MetricTransformation) String() string
String returns the string representation
type OutputLogEvent ¶
type OutputLogEvent struct { // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. IngestionTime *int64 `locationName:"ingestionTime" type:"long"` Message *string `locationName:"message" min:"1" type:"string"` // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. Timestamp *int64 `locationName:"timestamp" type:"long"` // contains filtered or unexported fields }
func (OutputLogEvent) GoString ¶ added in v0.6.6
func (s OutputLogEvent) GoString() string
GoString returns the string representation
func (OutputLogEvent) String ¶ added in v0.6.6
func (s OutputLogEvent) String() string
String returns the string representation
type PutDestinationInput ¶ added in v0.7.2
type PutDestinationInput struct { // A name for the destination. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` // The ARN of an IAM role that grants CloudWatch Logs permissions to do Amazon // Kinesis PutRecord requests on the desitnation stream. RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` // The ARN of an Amazon Kinesis stream to deliver matching log events to. TargetArn *string `locationName:"targetArn" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (PutDestinationInput) GoString ¶ added in v0.7.2
func (s PutDestinationInput) GoString() string
GoString returns the string representation
func (PutDestinationInput) String ¶ added in v0.7.2
func (s PutDestinationInput) String() string
String returns the string representation
type PutDestinationOutput ¶ added in v0.7.2
type PutDestinationOutput struct { // A cross account destination that is the recipient of subscription log events. Destination *Destination `locationName:"destination" type:"structure"` // contains filtered or unexported fields }
func (PutDestinationOutput) GoString ¶ added in v0.7.2
func (s PutDestinationOutput) GoString() string
GoString returns the string representation
func (PutDestinationOutput) String ¶ added in v0.7.2
func (s PutDestinationOutput) String() string
String returns the string representation
type PutDestinationPolicyInput ¶ added in v0.7.2
type PutDestinationPolicyInput struct { // An IAM policy document that authorizes cross-account users to deliver their // log events to associated destination. AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string" required:"true"` // A name for an existing destination. DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (PutDestinationPolicyInput) GoString ¶ added in v0.7.2
func (s PutDestinationPolicyInput) GoString() string
GoString returns the string representation
func (PutDestinationPolicyInput) String ¶ added in v0.7.2
func (s PutDestinationPolicyInput) String() string
String returns the string representation
type PutDestinationPolicyOutput ¶ added in v0.7.2
type PutDestinationPolicyOutput struct {
// contains filtered or unexported fields
}
func (PutDestinationPolicyOutput) GoString ¶ added in v0.7.2
func (s PutDestinationPolicyOutput) GoString() string
GoString returns the string representation
func (PutDestinationPolicyOutput) String ¶ added in v0.7.2
func (s PutDestinationPolicyOutput) String() string
String returns the string representation
type PutLogEventsInput ¶
type PutLogEventsInput struct { // A list of log events belonging to a log stream. LogEvents []*InputLogEvent `locationName:"logEvents" min:"1" type:"list" required:"true"` // The name of the log group to put log events to. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // The name of the log stream to put log events to. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` // A string token that must be obtained from the response of the previous PutLogEvents // request. SequenceToken *string `locationName:"sequenceToken" min:"1" type:"string"` // contains filtered or unexported fields }
func (PutLogEventsInput) GoString ¶ added in v0.6.6
func (s PutLogEventsInput) GoString() string
GoString returns the string representation
func (PutLogEventsInput) String ¶ added in v0.6.6
func (s PutLogEventsInput) String() string
String returns the string representation
type PutLogEventsOutput ¶
type PutLogEventsOutput struct { // A string token used for making PutLogEvents requests. A sequenceToken can // only be used once, and PutLogEvents requests must include the sequenceToken // obtained from the response of the previous request. NextSequenceToken *string `locationName:"nextSequenceToken" min:"1" type:"string"` RejectedLogEventsInfo *RejectedLogEventsInfo `locationName:"rejectedLogEventsInfo" type:"structure"` // contains filtered or unexported fields }
func (PutLogEventsOutput) GoString ¶ added in v0.6.6
func (s PutLogEventsOutput) GoString() string
GoString returns the string representation
func (PutLogEventsOutput) String ¶ added in v0.6.6
func (s PutLogEventsOutput) String() string
String returns the string representation
type PutMetricFilterInput ¶
type PutMetricFilterInput struct { // A name for the metric filter. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` // A valid CloudWatch Logs filter pattern for extracting metric data out of // ingested log events. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` // The name of the log group to associate the metric filter with. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // A collection of information needed to define how metric data gets emitted. MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list" required:"true"` // contains filtered or unexported fields }
func (PutMetricFilterInput) GoString ¶ added in v0.6.6
func (s PutMetricFilterInput) GoString() string
GoString returns the string representation
func (PutMetricFilterInput) String ¶ added in v0.6.6
func (s PutMetricFilterInput) String() string
String returns the string representation
type PutMetricFilterOutput ¶
type PutMetricFilterOutput struct {
// contains filtered or unexported fields
}
func (PutMetricFilterOutput) GoString ¶ added in v0.6.6
func (s PutMetricFilterOutput) GoString() string
GoString returns the string representation
func (PutMetricFilterOutput) String ¶ added in v0.6.6
func (s PutMetricFilterOutput) String() string
String returns the string representation
type PutRetentionPolicyInput ¶
type PutRetentionPolicyInput struct { // The name of the log group to associate the retention policy with. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // Specifies the number of days you want to retain log events in the specified // log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, // 365, 400, 545, 731, 1827, 3653. RetentionInDays *int64 `locationName:"retentionInDays" type:"integer" required:"true"` // contains filtered or unexported fields }
func (PutRetentionPolicyInput) GoString ¶ added in v0.6.6
func (s PutRetentionPolicyInput) GoString() string
GoString returns the string representation
func (PutRetentionPolicyInput) String ¶ added in v0.6.6
func (s PutRetentionPolicyInput) String() string
String returns the string representation
type PutRetentionPolicyOutput ¶
type PutRetentionPolicyOutput struct {
// contains filtered or unexported fields
}
func (PutRetentionPolicyOutput) GoString ¶ added in v0.6.6
func (s PutRetentionPolicyOutput) GoString() string
GoString returns the string representation
func (PutRetentionPolicyOutput) String ¶ added in v0.6.6
func (s PutRetentionPolicyOutput) String() string
String returns the string representation
type PutSubscriptionFilterInput ¶ added in v0.6.1
type PutSubscriptionFilterInput struct { // The ARN of the destination to deliver matching log events to. Currently, // the supported destinations are: An Amazon Kinesis stream belonging to the // same account as the subscription filter, for same-account delivery. A logical // destination (used via an ARN of Destination) belonging to a different account, // for cross-account delivery. An Amazon Kinesis Firehose stream belonging // to the same account as the subscription filter, for same-account delivery. // An AWS Lambda function belonging to the same account as the subscription // filter, for same-account delivery. DestinationArn *string `locationName:"destinationArn" min:"1" type:"string" required:"true"` // A name for the subscription filter. FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` // A valid CloudWatch Logs filter pattern for subscribing to a filtered stream // of log events. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` // The name of the log group to associate the subscription filter with. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // The ARN of an IAM role that grants CloudWatch Logs permissions to deliver // ingested log events to the destination stream. You don't need to provide // the ARN when you are working with a logical destination (used via an ARN // of Destination) for cross-account delivery. RoleArn *string `locationName:"roleArn" min:"1" type:"string"` // contains filtered or unexported fields }
func (PutSubscriptionFilterInput) GoString ¶ added in v0.6.6
func (s PutSubscriptionFilterInput) GoString() string
GoString returns the string representation
func (PutSubscriptionFilterInput) String ¶ added in v0.6.6
func (s PutSubscriptionFilterInput) String() string
String returns the string representation
type PutSubscriptionFilterOutput ¶ added in v0.6.1
type PutSubscriptionFilterOutput struct {
// contains filtered or unexported fields
}
func (PutSubscriptionFilterOutput) GoString ¶ added in v0.6.6
func (s PutSubscriptionFilterOutput) GoString() string
GoString returns the string representation
func (PutSubscriptionFilterOutput) String ¶ added in v0.6.6
func (s PutSubscriptionFilterOutput) String() string
String returns the string representation
type RejectedLogEventsInfo ¶
type RejectedLogEventsInfo struct { ExpiredLogEventEndIndex *int64 `locationName:"expiredLogEventEndIndex" type:"integer"` TooNewLogEventStartIndex *int64 `locationName:"tooNewLogEventStartIndex" type:"integer"` TooOldLogEventEndIndex *int64 `locationName:"tooOldLogEventEndIndex" type:"integer"` // contains filtered or unexported fields }
func (RejectedLogEventsInfo) GoString ¶ added in v0.6.6
func (s RejectedLogEventsInfo) GoString() string
GoString returns the string representation
func (RejectedLogEventsInfo) String ¶ added in v0.6.6
func (s RejectedLogEventsInfo) String() string
String returns the string representation
type SearchedLogStream ¶
type SearchedLogStream struct { // The name of the log stream. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` // Indicates whether all the events in this log stream were searched or more // data exists to search by paginating further. SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"` // contains filtered or unexported fields }
An object indicating the search status of a log stream in a FilterLogEvents request.
func (SearchedLogStream) GoString ¶ added in v0.6.6
func (s SearchedLogStream) GoString() string
GoString returns the string representation
func (SearchedLogStream) String ¶ added in v0.6.6
func (s SearchedLogStream) String() string
String returns the string representation
type SubscriptionFilter ¶ added in v0.6.1
type SubscriptionFilter struct { // A point in time expressed as the number of milliseconds since Jan 1, 1970 // 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` DestinationArn *string `locationName:"destinationArn" min:"1" type:"string"` // A name for a metric or subscription filter. FilterName *string `locationName:"filterName" min:"1" type:"string"` // A symbolic description of how CloudWatch Logs should interpret the data in // each log event. For example, a log event may contain timestamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. FilterPattern *string `locationName:"filterPattern" type:"string"` LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` RoleArn *string `locationName:"roleArn" min:"1" type:"string"` // contains filtered or unexported fields }
func (SubscriptionFilter) GoString ¶ added in v0.6.6
func (s SubscriptionFilter) GoString() string
GoString returns the string representation
func (SubscriptionFilter) String ¶ added in v0.6.6
func (s SubscriptionFilter) String() string
String returns the string representation
type TestMetricFilterInput ¶
type TestMetricFilterInput struct { // A symbolic description of how CloudWatch Logs should interpret the data in // each log event. For example, a log event may contain timestamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` // A list of log event messages to test. LogEventMessages []*string `locationName:"logEventMessages" min:"1" type:"list" required:"true"` // contains filtered or unexported fields }
func (TestMetricFilterInput) GoString ¶ added in v0.6.6
func (s TestMetricFilterInput) GoString() string
GoString returns the string representation
func (TestMetricFilterInput) String ¶ added in v0.6.6
func (s TestMetricFilterInput) String() string
String returns the string representation
type TestMetricFilterOutput ¶
type TestMetricFilterOutput struct { Matches []*MetricFilterMatchRecord `locationName:"matches" type:"list"` // contains filtered or unexported fields }
func (TestMetricFilterOutput) GoString ¶ added in v0.6.6
func (s TestMetricFilterOutput) GoString() string
GoString returns the string representation
func (TestMetricFilterOutput) String ¶ added in v0.6.6
func (s TestMetricFilterOutput) String() string
String returns the string representation
Directories ¶
Path | Synopsis |
---|---|
Package cloudwatchlogsiface provides an interface for the Amazon CloudWatch Logs.
|
Package cloudwatchlogsiface provides an interface for the Amazon CloudWatch Logs. |