mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-31 04:30:44 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+683
-144
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+14
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudwatcheventsiface provides an interface to enable mocking the Amazon CloudWatch Events service client
|
||||
// for testing your code.
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon CloudWatch Events.
|
||||
@@ -64,6 +64,10 @@ type CloudWatchEventsAPI interface {
|
||||
DeleteRuleWithContext(aws.Context, *cloudwatchevents.DeleteRuleInput, ...request.Option) (*cloudwatchevents.DeleteRuleOutput, error)
|
||||
DeleteRuleRequest(*cloudwatchevents.DeleteRuleInput) (*request.Request, *cloudwatchevents.DeleteRuleOutput)
|
||||
|
||||
DescribeEventBus(*cloudwatchevents.DescribeEventBusInput) (*cloudwatchevents.DescribeEventBusOutput, error)
|
||||
DescribeEventBusWithContext(aws.Context, *cloudwatchevents.DescribeEventBusInput, ...request.Option) (*cloudwatchevents.DescribeEventBusOutput, error)
|
||||
DescribeEventBusRequest(*cloudwatchevents.DescribeEventBusInput) (*request.Request, *cloudwatchevents.DescribeEventBusOutput)
|
||||
|
||||
DescribeRule(*cloudwatchevents.DescribeRuleInput) (*cloudwatchevents.DescribeRuleOutput, error)
|
||||
DescribeRuleWithContext(aws.Context, *cloudwatchevents.DescribeRuleInput, ...request.Option) (*cloudwatchevents.DescribeRuleOutput, error)
|
||||
DescribeRuleRequest(*cloudwatchevents.DescribeRuleInput) (*request.Request, *cloudwatchevents.DescribeRuleOutput)
|
||||
@@ -92,6 +96,10 @@ type CloudWatchEventsAPI interface {
|
||||
PutEventsWithContext(aws.Context, *cloudwatchevents.PutEventsInput, ...request.Option) (*cloudwatchevents.PutEventsOutput, error)
|
||||
PutEventsRequest(*cloudwatchevents.PutEventsInput) (*request.Request, *cloudwatchevents.PutEventsOutput)
|
||||
|
||||
PutPermission(*cloudwatchevents.PutPermissionInput) (*cloudwatchevents.PutPermissionOutput, error)
|
||||
PutPermissionWithContext(aws.Context, *cloudwatchevents.PutPermissionInput, ...request.Option) (*cloudwatchevents.PutPermissionOutput, error)
|
||||
PutPermissionRequest(*cloudwatchevents.PutPermissionInput) (*request.Request, *cloudwatchevents.PutPermissionOutput)
|
||||
|
||||
PutRule(*cloudwatchevents.PutRuleInput) (*cloudwatchevents.PutRuleOutput, error)
|
||||
PutRuleWithContext(aws.Context, *cloudwatchevents.PutRuleInput, ...request.Option) (*cloudwatchevents.PutRuleOutput, error)
|
||||
PutRuleRequest(*cloudwatchevents.PutRuleInput) (*request.Request, *cloudwatchevents.PutRuleOutput)
|
||||
@@ -100,6 +108,10 @@ type CloudWatchEventsAPI interface {
|
||||
PutTargetsWithContext(aws.Context, *cloudwatchevents.PutTargetsInput, ...request.Option) (*cloudwatchevents.PutTargetsOutput, error)
|
||||
PutTargetsRequest(*cloudwatchevents.PutTargetsInput) (*request.Request, *cloudwatchevents.PutTargetsOutput)
|
||||
|
||||
RemovePermission(*cloudwatchevents.RemovePermissionInput) (*cloudwatchevents.RemovePermissionOutput, error)
|
||||
RemovePermissionWithContext(aws.Context, *cloudwatchevents.RemovePermissionInput, ...request.Option) (*cloudwatchevents.RemovePermissionOutput, error)
|
||||
RemovePermissionRequest(*cloudwatchevents.RemovePermissionInput) (*request.Request, *cloudwatchevents.RemovePermissionOutput)
|
||||
|
||||
RemoveTargets(*cloudwatchevents.RemoveTargetsInput) (*cloudwatchevents.RemoveTargetsOutput, error)
|
||||
RemoveTargetsWithContext(aws.Context, *cloudwatchevents.RemoveTargetsInput, ...request.Option) (*cloudwatchevents.RemoveTargetsOutput, error)
|
||||
RemoveTargetsRequest(*cloudwatchevents.RemoveTargetsInput) (*request.Request, *cloudwatchevents.RemoveTargetsOutput)
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudwatchevents provides the client and types for making API
|
||||
// requests to Amazon CloudWatch Events.
|
||||
//
|
||||
// Amazon CloudWatch Events helps you to respond to state changes in your AWS
|
||||
// resources. When your resources change state, they automatically send events
|
||||
// into an event stream. You can create rules that match selected events in
|
||||
// the stream and route them to targets to take action. You can also use rules
|
||||
// to take action on a pre-determined schedule. For example, you can configure
|
||||
// rules to:
|
||||
//
|
||||
// * Automatically invoke an AWS Lambda function to update DNS entries when
|
||||
// an event notifies you that Amazon EC2 instance enters the running state.
|
||||
//
|
||||
// * Direct specific API records from CloudTrail to an Amazon Kinesis stream
|
||||
// for detailed analysis of potential security or availability risks.
|
||||
//
|
||||
// * Periodically invoke a built-in target to create a snapshot of an Amazon
|
||||
// EBS volume.
|
||||
//
|
||||
// For more information about the features of Amazon CloudWatch Events, see
|
||||
// the Amazon CloudWatch Events User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07 for more information on this service.
|
||||
//
|
||||
// See cloudwatchevents package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchevents/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To Amazon CloudWatch Events with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the Amazon CloudWatch Events client CloudWatchEvents for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchevents/#New
|
||||
package cloudwatchevents
|
||||
+8
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudwatchevents
|
||||
|
||||
@@ -28,9 +28,15 @@ const (
|
||||
// You tried to create more rules or add more targets to a rule than is allowed.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodePolicyLengthExceededException for service response error code
|
||||
// "PolicyLengthExceededException".
|
||||
//
|
||||
// The event bus policy is too long. For more information, see the limits.
|
||||
ErrCodePolicyLengthExceededException = "PolicyLengthExceededException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// The rule does not exist.
|
||||
// An entity that you specified does not exist.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
)
|
||||
|
||||
-332
@@ -1,332 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudwatchevents_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/cloudwatchevents"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudWatchEvents_DeleteRule() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.DeleteRuleInput{
|
||||
Name: aws.String("RuleName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteRule(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 ExampleCloudWatchEvents_DescribeRule() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.DescribeRuleInput{
|
||||
Name: aws.String("RuleName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeRule(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 ExampleCloudWatchEvents_DisableRule() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.DisableRuleInput{
|
||||
Name: aws.String("RuleName"), // Required
|
||||
}
|
||||
resp, err := svc.DisableRule(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 ExampleCloudWatchEvents_EnableRule() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.EnableRuleInput{
|
||||
Name: aws.String("RuleName"), // Required
|
||||
}
|
||||
resp, err := svc.EnableRule(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 ExampleCloudWatchEvents_ListRuleNamesByTarget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.ListRuleNamesByTargetInput{
|
||||
TargetArn: aws.String("TargetArn"), // Required
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListRuleNamesByTarget(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 ExampleCloudWatchEvents_ListRules() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.ListRulesInput{
|
||||
Limit: aws.Int64(1),
|
||||
NamePrefix: aws.String("RuleName"),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListRules(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 ExampleCloudWatchEvents_ListTargetsByRule() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.ListTargetsByRuleInput{
|
||||
Rule: aws.String("RuleName"), // Required
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListTargetsByRule(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 ExampleCloudWatchEvents_PutEvents() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.PutEventsInput{
|
||||
Entries: []*cloudwatchevents.PutEventsRequestEntry{ // Required
|
||||
{ // Required
|
||||
Detail: aws.String("String"),
|
||||
DetailType: aws.String("String"),
|
||||
Resources: []*string{
|
||||
aws.String("EventResource"), // Required
|
||||
// More values...
|
||||
},
|
||||
Source: aws.String("String"),
|
||||
Time: aws.Time(time.Now()),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.PutEvents(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 ExampleCloudWatchEvents_PutRule() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.PutRuleInput{
|
||||
Name: aws.String("RuleName"), // Required
|
||||
Description: aws.String("RuleDescription"),
|
||||
EventPattern: aws.String("EventPattern"),
|
||||
RoleArn: aws.String("RoleArn"),
|
||||
ScheduleExpression: aws.String("ScheduleExpression"),
|
||||
State: aws.String("RuleState"),
|
||||
}
|
||||
resp, err := svc.PutRule(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 ExampleCloudWatchEvents_PutTargets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.PutTargetsInput{
|
||||
Rule: aws.String("RuleName"), // Required
|
||||
Targets: []*cloudwatchevents.Target{ // Required
|
||||
{ // Required
|
||||
Arn: aws.String("TargetArn"), // Required
|
||||
Id: aws.String("TargetId"), // Required
|
||||
EcsParameters: &cloudwatchevents.EcsParameters{
|
||||
TaskDefinitionArn: aws.String("Arn"), // Required
|
||||
TaskCount: aws.Int64(1),
|
||||
},
|
||||
Input: aws.String("TargetInput"),
|
||||
InputPath: aws.String("TargetInputPath"),
|
||||
InputTransformer: &cloudwatchevents.InputTransformer{
|
||||
InputTemplate: aws.String("TransformerInput"), // Required
|
||||
InputPathsMap: map[string]*string{
|
||||
"Key": aws.String("TargetInputPath"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
KinesisParameters: &cloudwatchevents.KinesisParameters{
|
||||
PartitionKeyPath: aws.String("TargetPartitionKeyPath"), // Required
|
||||
},
|
||||
RoleArn: aws.String("RoleArn"),
|
||||
RunCommandParameters: &cloudwatchevents.RunCommandParameters{
|
||||
RunCommandTargets: []*cloudwatchevents.RunCommandTarget{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("RunCommandTargetKey"), // Required
|
||||
Values: []*string{ // Required
|
||||
aws.String("RunCommandTargetValue"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.PutTargets(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 ExampleCloudWatchEvents_RemoveTargets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.RemoveTargetsInput{
|
||||
Ids: []*string{ // Required
|
||||
aws.String("TargetId"), // Required
|
||||
// More values...
|
||||
},
|
||||
Rule: aws.String("RuleName"), // Required
|
||||
}
|
||||
resp, err := svc.RemoveTargets(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 ExampleCloudWatchEvents_TestEventPattern() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatchevents.New(sess)
|
||||
|
||||
params := &cloudwatchevents.TestEventPatternInput{
|
||||
Event: aws.String("String"), // Required
|
||||
EventPattern: aws.String("EventPattern"), // Required
|
||||
}
|
||||
resp, err := svc.TestEventPattern(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
+6
-21
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudwatchevents
|
||||
|
||||
@@ -11,27 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// Amazon CloudWatch Events helps you to respond to state changes in your AWS
|
||||
// resources. When your resources change state, they automatically send events
|
||||
// into an event stream. You can create rules that match selected events in
|
||||
// the stream and route them to targets to take action. You can also use rules
|
||||
// to take action on a pre-determined schedule. For example, you can configure
|
||||
// rules to:
|
||||
// CloudWatchEvents provides the API operation methods for making requests to
|
||||
// Amazon CloudWatch Events. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// * Automatically invoke an AWS Lambda function to update DNS entries when
|
||||
// an event notifies you that Amazon EC2 instance enters the running state.
|
||||
//
|
||||
// * Direct specific API records from CloudTrail to an Amazon Kinesis stream
|
||||
// for detailed analysis of potential security or availability risks.
|
||||
//
|
||||
// * Periodically invoke a built-in target to create a snapshot of an Amazon
|
||||
// EBS volume.
|
||||
//
|
||||
// For more information about the features of Amazon CloudWatch Events, see
|
||||
// the Amazon CloudWatch Events User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events).
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07
|
||||
// CloudWatchEvents methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudWatchEvents struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user