mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
update vendor/ dir to latest w/o heroku, moby
had to lock a lot of things in place
This commit is contained in:
3785
vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go
generated
vendored
3785
vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go
generated
vendored
File diff suppressed because it is too large
Load Diff
128
vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/cloudwatchlogsiface/interface.go
generated
vendored
128
vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/cloudwatchlogsiface/interface.go
generated
vendored
@@ -1,128 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
// Package cloudwatchlogsiface provides an interface for the Amazon CloudWatch Logs.
|
||||
package cloudwatchlogsiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
|
||||
)
|
||||
|
||||
// CloudWatchLogsAPI is the interface type for cloudwatchlogs.CloudWatchLogs.
|
||||
type CloudWatchLogsAPI interface {
|
||||
CancelExportTaskRequest(*cloudwatchlogs.CancelExportTaskInput) (*request.Request, *cloudwatchlogs.CancelExportTaskOutput)
|
||||
|
||||
CancelExportTask(*cloudwatchlogs.CancelExportTaskInput) (*cloudwatchlogs.CancelExportTaskOutput, error)
|
||||
|
||||
CreateExportTaskRequest(*cloudwatchlogs.CreateExportTaskInput) (*request.Request, *cloudwatchlogs.CreateExportTaskOutput)
|
||||
|
||||
CreateExportTask(*cloudwatchlogs.CreateExportTaskInput) (*cloudwatchlogs.CreateExportTaskOutput, error)
|
||||
|
||||
CreateLogGroupRequest(*cloudwatchlogs.CreateLogGroupInput) (*request.Request, *cloudwatchlogs.CreateLogGroupOutput)
|
||||
|
||||
CreateLogGroup(*cloudwatchlogs.CreateLogGroupInput) (*cloudwatchlogs.CreateLogGroupOutput, error)
|
||||
|
||||
CreateLogStreamRequest(*cloudwatchlogs.CreateLogStreamInput) (*request.Request, *cloudwatchlogs.CreateLogStreamOutput)
|
||||
|
||||
CreateLogStream(*cloudwatchlogs.CreateLogStreamInput) (*cloudwatchlogs.CreateLogStreamOutput, error)
|
||||
|
||||
DeleteDestinationRequest(*cloudwatchlogs.DeleteDestinationInput) (*request.Request, *cloudwatchlogs.DeleteDestinationOutput)
|
||||
|
||||
DeleteDestination(*cloudwatchlogs.DeleteDestinationInput) (*cloudwatchlogs.DeleteDestinationOutput, error)
|
||||
|
||||
DeleteLogGroupRequest(*cloudwatchlogs.DeleteLogGroupInput) (*request.Request, *cloudwatchlogs.DeleteLogGroupOutput)
|
||||
|
||||
DeleteLogGroup(*cloudwatchlogs.DeleteLogGroupInput) (*cloudwatchlogs.DeleteLogGroupOutput, error)
|
||||
|
||||
DeleteLogStreamRequest(*cloudwatchlogs.DeleteLogStreamInput) (*request.Request, *cloudwatchlogs.DeleteLogStreamOutput)
|
||||
|
||||
DeleteLogStream(*cloudwatchlogs.DeleteLogStreamInput) (*cloudwatchlogs.DeleteLogStreamOutput, error)
|
||||
|
||||
DeleteMetricFilterRequest(*cloudwatchlogs.DeleteMetricFilterInput) (*request.Request, *cloudwatchlogs.DeleteMetricFilterOutput)
|
||||
|
||||
DeleteMetricFilter(*cloudwatchlogs.DeleteMetricFilterInput) (*cloudwatchlogs.DeleteMetricFilterOutput, error)
|
||||
|
||||
DeleteRetentionPolicyRequest(*cloudwatchlogs.DeleteRetentionPolicyInput) (*request.Request, *cloudwatchlogs.DeleteRetentionPolicyOutput)
|
||||
|
||||
DeleteRetentionPolicy(*cloudwatchlogs.DeleteRetentionPolicyInput) (*cloudwatchlogs.DeleteRetentionPolicyOutput, error)
|
||||
|
||||
DeleteSubscriptionFilterRequest(*cloudwatchlogs.DeleteSubscriptionFilterInput) (*request.Request, *cloudwatchlogs.DeleteSubscriptionFilterOutput)
|
||||
|
||||
DeleteSubscriptionFilter(*cloudwatchlogs.DeleteSubscriptionFilterInput) (*cloudwatchlogs.DeleteSubscriptionFilterOutput, error)
|
||||
|
||||
DescribeDestinationsRequest(*cloudwatchlogs.DescribeDestinationsInput) (*request.Request, *cloudwatchlogs.DescribeDestinationsOutput)
|
||||
|
||||
DescribeDestinations(*cloudwatchlogs.DescribeDestinationsInput) (*cloudwatchlogs.DescribeDestinationsOutput, error)
|
||||
|
||||
DescribeDestinationsPages(*cloudwatchlogs.DescribeDestinationsInput, func(*cloudwatchlogs.DescribeDestinationsOutput, bool) bool) error
|
||||
|
||||
DescribeExportTasksRequest(*cloudwatchlogs.DescribeExportTasksInput) (*request.Request, *cloudwatchlogs.DescribeExportTasksOutput)
|
||||
|
||||
DescribeExportTasks(*cloudwatchlogs.DescribeExportTasksInput) (*cloudwatchlogs.DescribeExportTasksOutput, error)
|
||||
|
||||
DescribeLogGroupsRequest(*cloudwatchlogs.DescribeLogGroupsInput) (*request.Request, *cloudwatchlogs.DescribeLogGroupsOutput)
|
||||
|
||||
DescribeLogGroups(*cloudwatchlogs.DescribeLogGroupsInput) (*cloudwatchlogs.DescribeLogGroupsOutput, error)
|
||||
|
||||
DescribeLogGroupsPages(*cloudwatchlogs.DescribeLogGroupsInput, func(*cloudwatchlogs.DescribeLogGroupsOutput, bool) bool) error
|
||||
|
||||
DescribeLogStreamsRequest(*cloudwatchlogs.DescribeLogStreamsInput) (*request.Request, *cloudwatchlogs.DescribeLogStreamsOutput)
|
||||
|
||||
DescribeLogStreams(*cloudwatchlogs.DescribeLogStreamsInput) (*cloudwatchlogs.DescribeLogStreamsOutput, error)
|
||||
|
||||
DescribeLogStreamsPages(*cloudwatchlogs.DescribeLogStreamsInput, func(*cloudwatchlogs.DescribeLogStreamsOutput, bool) bool) error
|
||||
|
||||
DescribeMetricFiltersRequest(*cloudwatchlogs.DescribeMetricFiltersInput) (*request.Request, *cloudwatchlogs.DescribeMetricFiltersOutput)
|
||||
|
||||
DescribeMetricFilters(*cloudwatchlogs.DescribeMetricFiltersInput) (*cloudwatchlogs.DescribeMetricFiltersOutput, error)
|
||||
|
||||
DescribeMetricFiltersPages(*cloudwatchlogs.DescribeMetricFiltersInput, func(*cloudwatchlogs.DescribeMetricFiltersOutput, bool) bool) error
|
||||
|
||||
DescribeSubscriptionFiltersRequest(*cloudwatchlogs.DescribeSubscriptionFiltersInput) (*request.Request, *cloudwatchlogs.DescribeSubscriptionFiltersOutput)
|
||||
|
||||
DescribeSubscriptionFilters(*cloudwatchlogs.DescribeSubscriptionFiltersInput) (*cloudwatchlogs.DescribeSubscriptionFiltersOutput, error)
|
||||
|
||||
DescribeSubscriptionFiltersPages(*cloudwatchlogs.DescribeSubscriptionFiltersInput, func(*cloudwatchlogs.DescribeSubscriptionFiltersOutput, bool) bool) error
|
||||
|
||||
FilterLogEventsRequest(*cloudwatchlogs.FilterLogEventsInput) (*request.Request, *cloudwatchlogs.FilterLogEventsOutput)
|
||||
|
||||
FilterLogEvents(*cloudwatchlogs.FilterLogEventsInput) (*cloudwatchlogs.FilterLogEventsOutput, error)
|
||||
|
||||
FilterLogEventsPages(*cloudwatchlogs.FilterLogEventsInput, func(*cloudwatchlogs.FilterLogEventsOutput, bool) bool) error
|
||||
|
||||
GetLogEventsRequest(*cloudwatchlogs.GetLogEventsInput) (*request.Request, *cloudwatchlogs.GetLogEventsOutput)
|
||||
|
||||
GetLogEvents(*cloudwatchlogs.GetLogEventsInput) (*cloudwatchlogs.GetLogEventsOutput, error)
|
||||
|
||||
GetLogEventsPages(*cloudwatchlogs.GetLogEventsInput, func(*cloudwatchlogs.GetLogEventsOutput, bool) bool) error
|
||||
|
||||
PutDestinationRequest(*cloudwatchlogs.PutDestinationInput) (*request.Request, *cloudwatchlogs.PutDestinationOutput)
|
||||
|
||||
PutDestination(*cloudwatchlogs.PutDestinationInput) (*cloudwatchlogs.PutDestinationOutput, error)
|
||||
|
||||
PutDestinationPolicyRequest(*cloudwatchlogs.PutDestinationPolicyInput) (*request.Request, *cloudwatchlogs.PutDestinationPolicyOutput)
|
||||
|
||||
PutDestinationPolicy(*cloudwatchlogs.PutDestinationPolicyInput) (*cloudwatchlogs.PutDestinationPolicyOutput, error)
|
||||
|
||||
PutLogEventsRequest(*cloudwatchlogs.PutLogEventsInput) (*request.Request, *cloudwatchlogs.PutLogEventsOutput)
|
||||
|
||||
PutLogEvents(*cloudwatchlogs.PutLogEventsInput) (*cloudwatchlogs.PutLogEventsOutput, error)
|
||||
|
||||
PutMetricFilterRequest(*cloudwatchlogs.PutMetricFilterInput) (*request.Request, *cloudwatchlogs.PutMetricFilterOutput)
|
||||
|
||||
PutMetricFilter(*cloudwatchlogs.PutMetricFilterInput) (*cloudwatchlogs.PutMetricFilterOutput, error)
|
||||
|
||||
PutRetentionPolicyRequest(*cloudwatchlogs.PutRetentionPolicyInput) (*request.Request, *cloudwatchlogs.PutRetentionPolicyOutput)
|
||||
|
||||
PutRetentionPolicy(*cloudwatchlogs.PutRetentionPolicyInput) (*cloudwatchlogs.PutRetentionPolicyOutput, error)
|
||||
|
||||
PutSubscriptionFilterRequest(*cloudwatchlogs.PutSubscriptionFilterInput) (*request.Request, *cloudwatchlogs.PutSubscriptionFilterOutput)
|
||||
|
||||
PutSubscriptionFilter(*cloudwatchlogs.PutSubscriptionFilterInput) (*cloudwatchlogs.PutSubscriptionFilterOutput, error)
|
||||
|
||||
TestMetricFilterRequest(*cloudwatchlogs.TestMetricFilterInput) (*request.Request, *cloudwatchlogs.TestMetricFilterOutput)
|
||||
|
||||
TestMetricFilter(*cloudwatchlogs.TestMetricFilterInput) (*cloudwatchlogs.TestMetricFilterOutput, error)
|
||||
}
|
||||
|
||||
var _ CloudWatchLogsAPI = (*cloudwatchlogs.CloudWatchLogs)(nil)
|
||||
566
vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/examples_test.go
generated
vendored
566
vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/examples_test.go
generated
vendored
@@ -1,566 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudwatchlogs_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudWatchLogs_CancelExportTask() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_CreateExportTask() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_CreateLogGroup() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_CreateLogStream() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DeleteDestination() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DeleteLogGroup() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DeleteLogStream() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DeleteMetricFilter() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DeleteRetentionPolicy() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DeleteSubscriptionFilter() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DescribeDestinations() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DescribeExportTasks() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DescribeLogGroups() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DescribeLogStreams() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DescribeMetricFilters() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_DescribeSubscriptionFilters() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_FilterLogEvents() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_GetLogEvents() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_PutDestination() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_PutDestinationPolicy() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_PutLogEvents() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_PutMetricFilter() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_PutRetentionPolicy() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_PutSubscriptionFilter() {
|
||||
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)
|
||||
}
|
||||
|
||||
func ExampleCloudWatchLogs_TestMetricFilter() {
|
||||
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)
|
||||
}
|
||||
116
vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go
generated
vendored
116
vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go
generated
vendored
@@ -1,116 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudwatchlogs
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// 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.
|
||||
type CloudWatchLogs struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// A ServiceName is the name of the service the client will make API calls to.
|
||||
const ServiceName = "logs"
|
||||
|
||||
// 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 New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudWatchLogs {
|
||||
c := p.ClientConfig(ServiceName, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *CloudWatchLogs {
|
||||
svc := &CloudWatchLogs{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2014-03-28",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "Logs_20140328",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CloudWatchLogs operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudWatchLogs) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
Reference in New Issue
Block a user