mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+1045
-215
File diff suppressed because it is too large
Load Diff
+18
-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 cloudwatchiface provides an interface to enable mocking the Amazon CloudWatch 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.
|
||||
@@ -64,6 +64,10 @@ type CloudWatchAPI interface {
|
||||
DeleteAlarmsWithContext(aws.Context, *cloudwatch.DeleteAlarmsInput, ...request.Option) (*cloudwatch.DeleteAlarmsOutput, error)
|
||||
DeleteAlarmsRequest(*cloudwatch.DeleteAlarmsInput) (*request.Request, *cloudwatch.DeleteAlarmsOutput)
|
||||
|
||||
DeleteDashboards(*cloudwatch.DeleteDashboardsInput) (*cloudwatch.DeleteDashboardsOutput, error)
|
||||
DeleteDashboardsWithContext(aws.Context, *cloudwatch.DeleteDashboardsInput, ...request.Option) (*cloudwatch.DeleteDashboardsOutput, error)
|
||||
DeleteDashboardsRequest(*cloudwatch.DeleteDashboardsInput) (*request.Request, *cloudwatch.DeleteDashboardsOutput)
|
||||
|
||||
DescribeAlarmHistory(*cloudwatch.DescribeAlarmHistoryInput) (*cloudwatch.DescribeAlarmHistoryOutput, error)
|
||||
DescribeAlarmHistoryWithContext(aws.Context, *cloudwatch.DescribeAlarmHistoryInput, ...request.Option) (*cloudwatch.DescribeAlarmHistoryOutput, error)
|
||||
DescribeAlarmHistoryRequest(*cloudwatch.DescribeAlarmHistoryInput) (*request.Request, *cloudwatch.DescribeAlarmHistoryOutput)
|
||||
@@ -90,10 +94,18 @@ type CloudWatchAPI interface {
|
||||
EnableAlarmActionsWithContext(aws.Context, *cloudwatch.EnableAlarmActionsInput, ...request.Option) (*cloudwatch.EnableAlarmActionsOutput, error)
|
||||
EnableAlarmActionsRequest(*cloudwatch.EnableAlarmActionsInput) (*request.Request, *cloudwatch.EnableAlarmActionsOutput)
|
||||
|
||||
GetDashboard(*cloudwatch.GetDashboardInput) (*cloudwatch.GetDashboardOutput, error)
|
||||
GetDashboardWithContext(aws.Context, *cloudwatch.GetDashboardInput, ...request.Option) (*cloudwatch.GetDashboardOutput, error)
|
||||
GetDashboardRequest(*cloudwatch.GetDashboardInput) (*request.Request, *cloudwatch.GetDashboardOutput)
|
||||
|
||||
GetMetricStatistics(*cloudwatch.GetMetricStatisticsInput) (*cloudwatch.GetMetricStatisticsOutput, error)
|
||||
GetMetricStatisticsWithContext(aws.Context, *cloudwatch.GetMetricStatisticsInput, ...request.Option) (*cloudwatch.GetMetricStatisticsOutput, error)
|
||||
GetMetricStatisticsRequest(*cloudwatch.GetMetricStatisticsInput) (*request.Request, *cloudwatch.GetMetricStatisticsOutput)
|
||||
|
||||
ListDashboards(*cloudwatch.ListDashboardsInput) (*cloudwatch.ListDashboardsOutput, error)
|
||||
ListDashboardsWithContext(aws.Context, *cloudwatch.ListDashboardsInput, ...request.Option) (*cloudwatch.ListDashboardsOutput, error)
|
||||
ListDashboardsRequest(*cloudwatch.ListDashboardsInput) (*request.Request, *cloudwatch.ListDashboardsOutput)
|
||||
|
||||
ListMetrics(*cloudwatch.ListMetricsInput) (*cloudwatch.ListMetricsOutput, error)
|
||||
ListMetricsWithContext(aws.Context, *cloudwatch.ListMetricsInput, ...request.Option) (*cloudwatch.ListMetricsOutput, error)
|
||||
ListMetricsRequest(*cloudwatch.ListMetricsInput) (*request.Request, *cloudwatch.ListMetricsOutput)
|
||||
@@ -101,6 +113,10 @@ type CloudWatchAPI interface {
|
||||
ListMetricsPages(*cloudwatch.ListMetricsInput, func(*cloudwatch.ListMetricsOutput, bool) bool) error
|
||||
ListMetricsPagesWithContext(aws.Context, *cloudwatch.ListMetricsInput, func(*cloudwatch.ListMetricsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
PutDashboard(*cloudwatch.PutDashboardInput) (*cloudwatch.PutDashboardOutput, error)
|
||||
PutDashboardWithContext(aws.Context, *cloudwatch.PutDashboardInput, ...request.Option) (*cloudwatch.PutDashboardOutput, error)
|
||||
PutDashboardRequest(*cloudwatch.PutDashboardInput) (*request.Request, *cloudwatch.PutDashboardOutput)
|
||||
|
||||
PutMetricAlarm(*cloudwatch.PutMetricAlarmInput) (*cloudwatch.PutMetricAlarmOutput, error)
|
||||
PutMetricAlarmWithContext(aws.Context, *cloudwatch.PutMetricAlarmInput, ...request.Option) (*cloudwatch.PutMetricAlarmOutput, error)
|
||||
PutMetricAlarmRequest(*cloudwatch.PutMetricAlarmInput) (*request.Request, *cloudwatch.PutMetricAlarmOutput)
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudwatch provides the client and types for making API
|
||||
// requests to Amazon CloudWatch.
|
||||
//
|
||||
// Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the
|
||||
// applications you run on AWS in real time. You can use CloudWatch to collect
|
||||
// and track metrics, which are the variables you want to measure for your resources
|
||||
// and applications.
|
||||
//
|
||||
// CloudWatch alarms send notifications or automatically change the resources
|
||||
// you are monitoring based on rules that you define. For example, you can monitor
|
||||
// the CPU usage and disk reads and writes of your Amazon EC2 instances. Then,
|
||||
// use this data to determine whether you should launch additional instances
|
||||
// to handle increased load. You can also use this data to stop under-used instances
|
||||
// to save money.
|
||||
//
|
||||
// In addition to monitoring the built-in metrics that come with AWS, you can
|
||||
// monitor your own custom metrics. With CloudWatch, you gain system-wide visibility
|
||||
// into resource utilization, application performance, and operational health.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01 for more information on this service.
|
||||
//
|
||||
// See cloudwatch package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatch/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To Amazon CloudWatch 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 client CloudWatch for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatch/#New
|
||||
package cloudwatch
|
||||
+14
-2
@@ -1,9 +1,21 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudwatch
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeDashboardInvalidInputError for service response error code
|
||||
// "InvalidParameterInput".
|
||||
//
|
||||
// Some part of the dashboard data is invalid.
|
||||
ErrCodeDashboardInvalidInputError = "InvalidParameterInput"
|
||||
|
||||
// ErrCodeDashboardNotFoundError for service response error code
|
||||
// "ResourceNotFound".
|
||||
//
|
||||
// The specified dashboard does not exist.
|
||||
ErrCodeDashboardNotFoundError = "ResourceNotFound"
|
||||
|
||||
// ErrCodeInternalServiceFault for service response error code
|
||||
// "InternalServiceError".
|
||||
//
|
||||
@@ -25,7 +37,7 @@ const (
|
||||
// ErrCodeInvalidParameterCombinationException for service response error code
|
||||
// "InvalidParameterCombination".
|
||||
//
|
||||
// Parameters that cannot be used together were used together.
|
||||
// Parameters were used together that cannot be used together.
|
||||
ErrCodeInvalidParameterCombinationException = "InvalidParameterCombination"
|
||||
|
||||
// ErrCodeInvalidParameterValueException for service response error code
|
||||
|
||||
-365
@@ -1,365 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudwatch_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/cloudwatch"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudWatch_DeleteAlarms() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.DeleteAlarmsInput{
|
||||
AlarmNames: []*string{ // Required
|
||||
aws.String("AlarmName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteAlarms(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 ExampleCloudWatch_DescribeAlarmHistory() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.DescribeAlarmHistoryInput{
|
||||
AlarmName: aws.String("AlarmName"),
|
||||
EndDate: aws.Time(time.Now()),
|
||||
HistoryItemType: aws.String("HistoryItemType"),
|
||||
MaxRecords: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
StartDate: aws.Time(time.Now()),
|
||||
}
|
||||
resp, err := svc.DescribeAlarmHistory(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 ExampleCloudWatch_DescribeAlarms() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.DescribeAlarmsInput{
|
||||
ActionPrefix: aws.String("ActionPrefix"),
|
||||
AlarmNamePrefix: aws.String("AlarmNamePrefix"),
|
||||
AlarmNames: []*string{
|
||||
aws.String("AlarmName"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxRecords: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
StateValue: aws.String("StateValue"),
|
||||
}
|
||||
resp, err := svc.DescribeAlarms(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 ExampleCloudWatch_DescribeAlarmsForMetric() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.DescribeAlarmsForMetricInput{
|
||||
MetricName: aws.String("MetricName"), // Required
|
||||
Namespace: aws.String("Namespace"), // Required
|
||||
Dimensions: []*cloudwatch.Dimension{
|
||||
{ // Required
|
||||
Name: aws.String("DimensionName"), // Required
|
||||
Value: aws.String("DimensionValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ExtendedStatistic: aws.String("ExtendedStatistic"),
|
||||
Period: aws.Int64(1),
|
||||
Statistic: aws.String("Statistic"),
|
||||
Unit: aws.String("StandardUnit"),
|
||||
}
|
||||
resp, err := svc.DescribeAlarmsForMetric(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 ExampleCloudWatch_DisableAlarmActions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.DisableAlarmActionsInput{
|
||||
AlarmNames: []*string{ // Required
|
||||
aws.String("AlarmName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DisableAlarmActions(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 ExampleCloudWatch_EnableAlarmActions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.EnableAlarmActionsInput{
|
||||
AlarmNames: []*string{ // Required
|
||||
aws.String("AlarmName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.EnableAlarmActions(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 ExampleCloudWatch_GetMetricStatistics() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.GetMetricStatisticsInput{
|
||||
EndTime: aws.Time(time.Now()), // Required
|
||||
MetricName: aws.String("MetricName"), // Required
|
||||
Namespace: aws.String("Namespace"), // Required
|
||||
Period: aws.Int64(1), // Required
|
||||
StartTime: aws.Time(time.Now()), // Required
|
||||
Dimensions: []*cloudwatch.Dimension{
|
||||
{ // Required
|
||||
Name: aws.String("DimensionName"), // Required
|
||||
Value: aws.String("DimensionValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ExtendedStatistics: []*string{
|
||||
aws.String("ExtendedStatistic"), // Required
|
||||
// More values...
|
||||
},
|
||||
Statistics: []*string{
|
||||
aws.String("Statistic"), // Required
|
||||
// More values...
|
||||
},
|
||||
Unit: aws.String("StandardUnit"),
|
||||
}
|
||||
resp, err := svc.GetMetricStatistics(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 ExampleCloudWatch_ListMetrics() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.ListMetricsInput{
|
||||
Dimensions: []*cloudwatch.DimensionFilter{
|
||||
{ // Required
|
||||
Name: aws.String("DimensionName"), // Required
|
||||
Value: aws.String("DimensionValue"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MetricName: aws.String("MetricName"),
|
||||
Namespace: aws.String("Namespace"),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListMetrics(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 ExampleCloudWatch_PutMetricAlarm() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.PutMetricAlarmInput{
|
||||
AlarmName: aws.String("AlarmName"), // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
EvaluationPeriods: aws.Int64(1), // Required
|
||||
MetricName: aws.String("MetricName"), // Required
|
||||
Namespace: aws.String("Namespace"), // Required
|
||||
Period: aws.Int64(1), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
ActionsEnabled: aws.Bool(true),
|
||||
AlarmActions: []*string{
|
||||
aws.String("ResourceName"), // Required
|
||||
// More values...
|
||||
},
|
||||
AlarmDescription: aws.String("AlarmDescription"),
|
||||
Dimensions: []*cloudwatch.Dimension{
|
||||
{ // Required
|
||||
Name: aws.String("DimensionName"), // Required
|
||||
Value: aws.String("DimensionValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ExtendedStatistic: aws.String("ExtendedStatistic"),
|
||||
InsufficientDataActions: []*string{
|
||||
aws.String("ResourceName"), // Required
|
||||
// More values...
|
||||
},
|
||||
OKActions: []*string{
|
||||
aws.String("ResourceName"), // Required
|
||||
// More values...
|
||||
},
|
||||
Statistic: aws.String("Statistic"),
|
||||
Unit: aws.String("StandardUnit"),
|
||||
}
|
||||
resp, err := svc.PutMetricAlarm(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 ExampleCloudWatch_PutMetricData() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.PutMetricDataInput{
|
||||
MetricData: []*cloudwatch.MetricDatum{ // Required
|
||||
{ // Required
|
||||
MetricName: aws.String("MetricName"), // Required
|
||||
Dimensions: []*cloudwatch.Dimension{
|
||||
{ // Required
|
||||
Name: aws.String("DimensionName"), // Required
|
||||
Value: aws.String("DimensionValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
StatisticValues: &cloudwatch.StatisticSet{
|
||||
Maximum: aws.Float64(1.0), // Required
|
||||
Minimum: aws.Float64(1.0), // Required
|
||||
SampleCount: aws.Float64(1.0), // Required
|
||||
Sum: aws.Float64(1.0), // Required
|
||||
},
|
||||
Timestamp: aws.Time(time.Now()),
|
||||
Unit: aws.String("StandardUnit"),
|
||||
Value: aws.Float64(1.0),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Namespace: aws.String("Namespace"), // Required
|
||||
}
|
||||
resp, err := svc.PutMetricData(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 ExampleCloudWatch_SetAlarmState() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudwatch.New(sess)
|
||||
|
||||
params := &cloudwatch.SetAlarmStateInput{
|
||||
AlarmName: aws.String("AlarmName"), // Required
|
||||
StateReason: aws.String("StateReason"), // Required
|
||||
StateValue: aws.String("StateValue"), // Required
|
||||
StateReasonData: aws.String("StateReasonData"),
|
||||
}
|
||||
resp, err := svc.SetAlarmState(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
-18
@@ -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 cloudwatch
|
||||
|
||||
@@ -11,24 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/query"
|
||||
)
|
||||
|
||||
// Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the
|
||||
// applications you run on AWS in real-time. You can use CloudWatch to collect
|
||||
// and track metrics, which are the variables you want to measure for your resources
|
||||
// and applications.
|
||||
// CloudWatch provides the API operation methods for making requests to
|
||||
// Amazon CloudWatch. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudWatch alarms send notifications or automatically make changes to the
|
||||
// resources you are monitoring based on rules that you define. For example,
|
||||
// you can monitor the CPU usage and disk reads and writes of your Amazon Elastic
|
||||
// Compute Cloud (Amazon EC2) instances and then use this data to determine
|
||||
// whether you should launch additional instances to handle increased load.
|
||||
// You can also use this data to stop under-used instances to save money.
|
||||
//
|
||||
// In addition to monitoring the built-in metrics that come with AWS, you can
|
||||
// monitor your own custom metrics. With CloudWatch, you gain system-wide visibility
|
||||
// into resource utilization, application performance, and operational health.
|
||||
// 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/monitoring-2010-08-01
|
||||
// CloudWatch methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudWatch struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
+8
-3
@@ -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 cloudwatch
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
// WaitUntilAlarmExists uses the CloudWatch API operation
|
||||
// DescribeAlarms to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudWatch) WaitUntilAlarmExists(input *DescribeAlarmsInput) error {
|
||||
return c.WaitUntilAlarmExistsWithContext(aws.BackgroundContext(), input)
|
||||
@@ -39,7 +39,12 @@ func (c *CloudWatch) WaitUntilAlarmExistsWithContext(ctx aws.Context, input *Des
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
req, _ := c.DescribeAlarmsRequest(input)
|
||||
var inCpy *DescribeAlarmsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeAlarmsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
|
||||
Reference in New Issue
Block a user