Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13596 lines (11826 sloc) 486 KB
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package autoscaling
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/query"
)
const opAttachInstances = "AttachInstances"
// AttachInstancesRequest generates a "aws/request.Request" representing the
// client's request for the AttachInstances operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AttachInstances for more information on using the AttachInstances
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AttachInstancesRequest method.
// req, resp := client.AttachInstancesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachInstances
func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req *request.Request, output *AttachInstancesOutput) {
op := &request.Operation{
Name: opAttachInstances,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AttachInstancesInput{}
}
output = &AttachInstancesOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AttachInstances API operation for Auto Scaling.
//
// Attaches one or more EC2 instances to the specified Auto Scaling group.
//
// When you attach instances, Amazon EC2 Auto Scaling increases the desired
// capacity of the group by the number of instances being attached. If the number
// of instances being attached plus the desired capacity of the group exceeds
// the maximum size of the group, the operation fails.
//
// If there is a Classic Load Balancer attached to your Auto Scaling group,
// the instances are also registered with the load balancer. If there are target
// groups attached to your Auto Scaling group, the instances are also registered
// with the target groups.
//
// For more information, see Attach EC2 Instances to Your Auto Scaling Group
// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-instance-asg.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation AttachInstances for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
// The service-linked role is not yet ready for use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachInstances
func (c *AutoScaling) AttachInstances(input *AttachInstancesInput) (*AttachInstancesOutput, error) {
req, out := c.AttachInstancesRequest(input)
return out, req.Send()
}
// AttachInstancesWithContext is the same as AttachInstances with the addition of
// the ability to pass a context and additional request options.
//
// See AttachInstances for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) AttachInstancesWithContext(ctx aws.Context, input *AttachInstancesInput, opts ...request.Option) (*AttachInstancesOutput, error) {
req, out := c.AttachInstancesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAttachLoadBalancerTargetGroups = "AttachLoadBalancerTargetGroups"
// AttachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
// client's request for the AttachLoadBalancerTargetGroups operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AttachLoadBalancerTargetGroups for more information on using the AttachLoadBalancerTargetGroups
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AttachLoadBalancerTargetGroupsRequest method.
// req, resp := client.AttachLoadBalancerTargetGroupsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancerTargetGroups
func (c *AutoScaling) AttachLoadBalancerTargetGroupsRequest(input *AttachLoadBalancerTargetGroupsInput) (req *request.Request, output *AttachLoadBalancerTargetGroupsOutput) {
op := &request.Operation{
Name: opAttachLoadBalancerTargetGroups,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AttachLoadBalancerTargetGroupsInput{}
}
output = &AttachLoadBalancerTargetGroupsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AttachLoadBalancerTargetGroups API operation for Auto Scaling.
//
// Attaches one or more target groups to the specified Auto Scaling group.
//
// To describe the target groups for an Auto Scaling group, use DescribeLoadBalancerTargetGroups.
// To detach the target group from the Auto Scaling group, use DetachLoadBalancerTargetGroups.
//
// With Application Load Balancers and Network Load Balancers, instances are
// registered as targets with a target group. With Classic Load Balancers, instances
// are registered with the load balancer. For more information, see Attaching
// a Load Balancer to Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation AttachLoadBalancerTargetGroups for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
// The service-linked role is not yet ready for use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancerTargetGroups
func (c *AutoScaling) AttachLoadBalancerTargetGroups(input *AttachLoadBalancerTargetGroupsInput) (*AttachLoadBalancerTargetGroupsOutput, error) {
req, out := c.AttachLoadBalancerTargetGroupsRequest(input)
return out, req.Send()
}
// AttachLoadBalancerTargetGroupsWithContext is the same as AttachLoadBalancerTargetGroups with the addition of
// the ability to pass a context and additional request options.
//
// See AttachLoadBalancerTargetGroups for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) AttachLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *AttachLoadBalancerTargetGroupsInput, opts ...request.Option) (*AttachLoadBalancerTargetGroupsOutput, error) {
req, out := c.AttachLoadBalancerTargetGroupsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAttachLoadBalancers = "AttachLoadBalancers"
// AttachLoadBalancersRequest generates a "aws/request.Request" representing the
// client's request for the AttachLoadBalancers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AttachLoadBalancers for more information on using the AttachLoadBalancers
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AttachLoadBalancersRequest method.
// req, resp := client.AttachLoadBalancersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancers
func (c *AutoScaling) AttachLoadBalancersRequest(input *AttachLoadBalancersInput) (req *request.Request, output *AttachLoadBalancersOutput) {
op := &request.Operation{
Name: opAttachLoadBalancers,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AttachLoadBalancersInput{}
}
output = &AttachLoadBalancersOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AttachLoadBalancers API operation for Auto Scaling.
//
// Attaches one or more Classic Load Balancers to the specified Auto Scaling
// group.
//
// To attach an Application Load Balancer or a Network Load Balancer instead,
// see AttachLoadBalancerTargetGroups.
//
// To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers.
// To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers.
//
// For more information, see Attaching a Load Balancer to Your Auto Scaling
// Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation AttachLoadBalancers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
// The service-linked role is not yet ready for use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancers
func (c *AutoScaling) AttachLoadBalancers(input *AttachLoadBalancersInput) (*AttachLoadBalancersOutput, error) {
req, out := c.AttachLoadBalancersRequest(input)
return out, req.Send()
}
// AttachLoadBalancersWithContext is the same as AttachLoadBalancers with the addition of
// the ability to pass a context and additional request options.
//
// See AttachLoadBalancers for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) AttachLoadBalancersWithContext(ctx aws.Context, input *AttachLoadBalancersInput, opts ...request.Option) (*AttachLoadBalancersOutput, error) {
req, out := c.AttachLoadBalancersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opBatchDeleteScheduledAction = "BatchDeleteScheduledAction"
// BatchDeleteScheduledActionRequest generates a "aws/request.Request" representing the
// client's request for the BatchDeleteScheduledAction operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BatchDeleteScheduledAction for more information on using the BatchDeleteScheduledAction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BatchDeleteScheduledActionRequest method.
// req, resp := client.BatchDeleteScheduledActionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction
func (c *AutoScaling) BatchDeleteScheduledActionRequest(input *BatchDeleteScheduledActionInput) (req *request.Request, output *BatchDeleteScheduledActionOutput) {
op := &request.Operation{
Name: opBatchDeleteScheduledAction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &BatchDeleteScheduledActionInput{}
}
output = &BatchDeleteScheduledActionOutput{}
req = c.newRequest(op, input, output)
return
}
// BatchDeleteScheduledAction API operation for Auto Scaling.
//
// Deletes one or more scheduled actions for the specified Auto Scaling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation BatchDeleteScheduledAction for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction
func (c *AutoScaling) BatchDeleteScheduledAction(input *BatchDeleteScheduledActionInput) (*BatchDeleteScheduledActionOutput, error) {
req, out := c.BatchDeleteScheduledActionRequest(input)
return out, req.Send()
}
// BatchDeleteScheduledActionWithContext is the same as BatchDeleteScheduledAction with the addition of
// the ability to pass a context and additional request options.
//
// See BatchDeleteScheduledAction for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) BatchDeleteScheduledActionWithContext(ctx aws.Context, input *BatchDeleteScheduledActionInput, opts ...request.Option) (*BatchDeleteScheduledActionOutput, error) {
req, out := c.BatchDeleteScheduledActionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opBatchPutScheduledUpdateGroupAction = "BatchPutScheduledUpdateGroupAction"
// BatchPutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the
// client's request for the BatchPutScheduledUpdateGroupAction operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BatchPutScheduledUpdateGroupAction for more information on using the BatchPutScheduledUpdateGroupAction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BatchPutScheduledUpdateGroupActionRequest method.
// req, resp := client.BatchPutScheduledUpdateGroupActionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction
func (c *AutoScaling) BatchPutScheduledUpdateGroupActionRequest(input *BatchPutScheduledUpdateGroupActionInput) (req *request.Request, output *BatchPutScheduledUpdateGroupActionOutput) {
op := &request.Operation{
Name: opBatchPutScheduledUpdateGroupAction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &BatchPutScheduledUpdateGroupActionInput{}
}
output = &BatchPutScheduledUpdateGroupActionOutput{}
req = c.newRequest(op, input, output)
return
}
// BatchPutScheduledUpdateGroupAction API operation for Auto Scaling.
//
// Creates or updates one or more scheduled scaling actions for an Auto Scaling
// group. If you leave a parameter unspecified when updating a scheduled scaling
// action, the corresponding value remains unchanged.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation BatchPutScheduledUpdateGroupAction for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAlreadyExistsFault "AlreadyExists"
// You already have an Auto Scaling group or launch configuration with this
// name.
//
// * ErrCodeLimitExceededFault "LimitExceeded"
// You have already reached a limit for your Amazon EC2 Auto Scaling resources
// (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
// For more information, see DescribeAccountLimits.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction
func (c *AutoScaling) BatchPutScheduledUpdateGroupAction(input *BatchPutScheduledUpdateGroupActionInput) (*BatchPutScheduledUpdateGroupActionOutput, error) {
req, out := c.BatchPutScheduledUpdateGroupActionRequest(input)
return out, req.Send()
}
// BatchPutScheduledUpdateGroupActionWithContext is the same as BatchPutScheduledUpdateGroupAction with the addition of
// the ability to pass a context and additional request options.
//
// See BatchPutScheduledUpdateGroupAction for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) BatchPutScheduledUpdateGroupActionWithContext(ctx aws.Context, input *BatchPutScheduledUpdateGroupActionInput, opts ...request.Option) (*BatchPutScheduledUpdateGroupActionOutput, error) {
req, out := c.BatchPutScheduledUpdateGroupActionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCompleteLifecycleAction = "CompleteLifecycleAction"
// CompleteLifecycleActionRequest generates a "aws/request.Request" representing the
// client's request for the CompleteLifecycleAction operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CompleteLifecycleAction for more information on using the CompleteLifecycleAction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CompleteLifecycleActionRequest method.
// req, resp := client.CompleteLifecycleActionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleAction
func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleActionInput) (req *request.Request, output *CompleteLifecycleActionOutput) {
op := &request.Operation{
Name: opCompleteLifecycleAction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CompleteLifecycleActionInput{}
}
output = &CompleteLifecycleActionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CompleteLifecycleAction API operation for Auto Scaling.
//
// Completes the lifecycle action for the specified token or instance with the
// specified result.
//
// This step is a part of the procedure for adding a lifecycle hook to an Auto
// Scaling group:
//
// (Optional) Create a Lambda function and a rule that allows CloudWatch Events
// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates
// instances.
//
// (Optional) Create a notification target and an IAM role. The target can be
// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon
// EC2 Auto Scaling to publish lifecycle notifications to the target.
//
// Create the lifecycle hook. Specify whether the hook is used when the instances
// launch or terminate.
//
// If you need more time, record the lifecycle action heartbeat to keep the
// instance in a pending state.
//
// If you finish before the timeout period ends, complete the lifecycle action.
//
// For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation CompleteLifecycleAction for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleAction
func (c *AutoScaling) CompleteLifecycleAction(input *CompleteLifecycleActionInput) (*CompleteLifecycleActionOutput, error) {
req, out := c.CompleteLifecycleActionRequest(input)
return out, req.Send()
}
// CompleteLifecycleActionWithContext is the same as CompleteLifecycleAction with the addition of
// the ability to pass a context and additional request options.
//
// See CompleteLifecycleAction for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) CompleteLifecycleActionWithContext(ctx aws.Context, input *CompleteLifecycleActionInput, opts ...request.Option) (*CompleteLifecycleActionOutput, error) {
req, out := c.CompleteLifecycleActionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateAutoScalingGroup = "CreateAutoScalingGroup"
// CreateAutoScalingGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateAutoScalingGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateAutoScalingGroup for more information on using the CreateAutoScalingGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateAutoScalingGroupRequest method.
// req, resp := client.CreateAutoScalingGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup
func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGroupInput) (req *request.Request, output *CreateAutoScalingGroupOutput) {
op := &request.Operation{
Name: opCreateAutoScalingGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateAutoScalingGroupInput{}
}
output = &CreateAutoScalingGroupOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateAutoScalingGroup API operation for Auto Scaling.
//
// Creates an Auto Scaling group with the specified name and attributes.
//
// If you exceed your maximum limit of Auto Scaling groups, the call fails.
// For information about viewing this limit, see DescribeAccountLimits. For
// information about updating this limit, see Amazon EC2 Auto Scaling Limits
// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation CreateAutoScalingGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAlreadyExistsFault "AlreadyExists"
// You already have an Auto Scaling group or launch configuration with this
// name.
//
// * ErrCodeLimitExceededFault "LimitExceeded"
// You have already reached a limit for your Amazon EC2 Auto Scaling resources
// (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
// For more information, see DescribeAccountLimits.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
// The service-linked role is not yet ready for use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup
func (c *AutoScaling) CreateAutoScalingGroup(input *CreateAutoScalingGroupInput) (*CreateAutoScalingGroupOutput, error) {
req, out := c.CreateAutoScalingGroupRequest(input)
return out, req.Send()
}
// CreateAutoScalingGroupWithContext is the same as CreateAutoScalingGroup with the addition of
// the ability to pass a context and additional request options.
//
// See CreateAutoScalingGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) CreateAutoScalingGroupWithContext(ctx aws.Context, input *CreateAutoScalingGroupInput, opts ...request.Option) (*CreateAutoScalingGroupOutput, error) {
req, out := c.CreateAutoScalingGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateLaunchConfiguration = "CreateLaunchConfiguration"
// CreateLaunchConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the CreateLaunchConfiguration operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateLaunchConfiguration for more information on using the CreateLaunchConfiguration
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateLaunchConfigurationRequest method.
// req, resp := client.CreateLaunchConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfiguration
func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfigurationInput) (req *request.Request, output *CreateLaunchConfigurationOutput) {
op := &request.Operation{
Name: opCreateLaunchConfiguration,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLaunchConfigurationInput{}
}
output = &CreateLaunchConfigurationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateLaunchConfiguration API operation for Auto Scaling.
//
// Creates a launch configuration.
//
// If you exceed your maximum limit of launch configurations, the call fails.
// For information about viewing this limit, see DescribeAccountLimits. For
// information about updating this limit, see Amazon EC2 Auto Scaling Limits
// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// For more information, see Launch Configurations (https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation CreateLaunchConfiguration for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAlreadyExistsFault "AlreadyExists"
// You already have an Auto Scaling group or launch configuration with this
// name.
//
// * ErrCodeLimitExceededFault "LimitExceeded"
// You have already reached a limit for your Amazon EC2 Auto Scaling resources
// (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
// For more information, see DescribeAccountLimits.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfiguration
func (c *AutoScaling) CreateLaunchConfiguration(input *CreateLaunchConfigurationInput) (*CreateLaunchConfigurationOutput, error) {
req, out := c.CreateLaunchConfigurationRequest(input)
return out, req.Send()
}
// CreateLaunchConfigurationWithContext is the same as CreateLaunchConfiguration with the addition of
// the ability to pass a context and additional request options.
//
// See CreateLaunchConfiguration for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) CreateLaunchConfigurationWithContext(ctx aws.Context, input *CreateLaunchConfigurationInput, opts ...request.Option) (*CreateLaunchConfigurationOutput, error) {
req, out := c.CreateLaunchConfigurationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateOrUpdateTags = "CreateOrUpdateTags"
// CreateOrUpdateTagsRequest generates a "aws/request.Request" representing the
// client's request for the CreateOrUpdateTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateOrUpdateTags for more information on using the CreateOrUpdateTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateOrUpdateTagsRequest method.
// req, resp := client.CreateOrUpdateTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTags
func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) (req *request.Request, output *CreateOrUpdateTagsOutput) {
op := &request.Operation{
Name: opCreateOrUpdateTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateOrUpdateTagsInput{}
}
output = &CreateOrUpdateTagsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateOrUpdateTags API operation for Auto Scaling.
//
// Creates or updates tags for the specified Auto Scaling group.
//
// When you specify a tag with a key that already exists, the operation overwrites
// the previous tag definition, and you do not get an error message.
//
// For more information, see Tagging Auto Scaling Groups and Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation CreateOrUpdateTags for usage and error information.
//
// Returned Error Codes:
// * ErrCodeLimitExceededFault "LimitExceeded"
// You have already reached a limit for your Amazon EC2 Auto Scaling resources
// (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
// For more information, see DescribeAccountLimits.
//
// * ErrCodeAlreadyExistsFault "AlreadyExists"
// You already have an Auto Scaling group or launch configuration with this
// name.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// * ErrCodeResourceInUseFault "ResourceInUse"
// The operation can't be performed because the resource is in use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTags
func (c *AutoScaling) CreateOrUpdateTags(input *CreateOrUpdateTagsInput) (*CreateOrUpdateTagsOutput, error) {
req, out := c.CreateOrUpdateTagsRequest(input)
return out, req.Send()
}
// CreateOrUpdateTagsWithContext is the same as CreateOrUpdateTags with the addition of
// the ability to pass a context and additional request options.
//
// See CreateOrUpdateTags for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) CreateOrUpdateTagsWithContext(ctx aws.Context, input *CreateOrUpdateTagsInput, opts ...request.Option) (*CreateOrUpdateTagsOutput, error) {
req, out := c.CreateOrUpdateTagsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup"
// DeleteAutoScalingGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAutoScalingGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAutoScalingGroup for more information on using the DeleteAutoScalingGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteAutoScalingGroupRequest method.
// req, resp := client.DeleteAutoScalingGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroup
func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGroupInput) (req *request.Request, output *DeleteAutoScalingGroupOutput) {
op := &request.Operation{
Name: opDeleteAutoScalingGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteAutoScalingGroupInput{}
}
output = &DeleteAutoScalingGroupOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteAutoScalingGroup API operation for Auto Scaling.
//
// Deletes the specified Auto Scaling group.
//
// If the group has instances or scaling activities in progress, you must specify
// the option to force the deletion in order for it to succeed.
//
// If the group has policies, deleting the group deletes the policies, the underlying
// alarm actions, and any alarm that no longer has an associated action.
//
// To remove instances from the Auto Scaling group before deleting it, call
// DetachInstances with the list of instances and the option to decrement the
// desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch
// replacement instances.
//
// To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup
// and set the minimum size and desired capacity of the Auto Scaling group to
// zero.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DeleteAutoScalingGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
// The operation can't be performed because there are scaling activities in
// progress.
//
// * ErrCodeResourceInUseFault "ResourceInUse"
// The operation can't be performed because the resource is in use.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroup
func (c *AutoScaling) DeleteAutoScalingGroup(input *DeleteAutoScalingGroupInput) (*DeleteAutoScalingGroupOutput, error) {
req, out := c.DeleteAutoScalingGroupRequest(input)
return out, req.Send()
}
// DeleteAutoScalingGroupWithContext is the same as DeleteAutoScalingGroup with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAutoScalingGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DeleteAutoScalingGroupWithContext(ctx aws.Context, input *DeleteAutoScalingGroupInput, opts ...request.Option) (*DeleteAutoScalingGroupOutput, error) {
req, out := c.DeleteAutoScalingGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration"
// DeleteLaunchConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteLaunchConfiguration operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteLaunchConfiguration for more information on using the DeleteLaunchConfiguration
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteLaunchConfigurationRequest method.
// req, resp := client.DeleteLaunchConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLaunchConfiguration
func (c *AutoScaling) DeleteLaunchConfigurationRequest(input *DeleteLaunchConfigurationInput) (req *request.Request, output *DeleteLaunchConfigurationOutput) {
op := &request.Operation{
Name: opDeleteLaunchConfiguration,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteLaunchConfigurationInput{}
}
output = &DeleteLaunchConfigurationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteLaunchConfiguration API operation for Auto Scaling.
//
// Deletes the specified launch configuration.
//
// The launch configuration must not be attached to an Auto Scaling group. When
// this call completes, the launch configuration is no longer available for
// use.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DeleteLaunchConfiguration for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceInUseFault "ResourceInUse"
// The operation can't be performed because the resource is in use.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLaunchConfiguration
func (c *AutoScaling) DeleteLaunchConfiguration(input *DeleteLaunchConfigurationInput) (*DeleteLaunchConfigurationOutput, error) {
req, out := c.DeleteLaunchConfigurationRequest(input)
return out, req.Send()
}
// DeleteLaunchConfigurationWithContext is the same as DeleteLaunchConfiguration with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteLaunchConfiguration for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DeleteLaunchConfigurationWithContext(ctx aws.Context, input *DeleteLaunchConfigurationInput, opts ...request.Option) (*DeleteLaunchConfigurationOutput, error) {
req, out := c.DeleteLaunchConfigurationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteLifecycleHook = "DeleteLifecycleHook"
// DeleteLifecycleHookRequest generates a "aws/request.Request" representing the
// client's request for the DeleteLifecycleHook operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteLifecycleHook for more information on using the DeleteLifecycleHook
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteLifecycleHookRequest method.
// req, resp := client.DeleteLifecycleHookRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHook
func (c *AutoScaling) DeleteLifecycleHookRequest(input *DeleteLifecycleHookInput) (req *request.Request, output *DeleteLifecycleHookOutput) {
op := &request.Operation{
Name: opDeleteLifecycleHook,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteLifecycleHookInput{}
}
output = &DeleteLifecycleHookOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteLifecycleHook API operation for Auto Scaling.
//
// Deletes the specified lifecycle hook.
//
// If there are any outstanding lifecycle actions, they are completed first
// (ABANDON for launching instances, CONTINUE for terminating instances).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DeleteLifecycleHook for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHook
func (c *AutoScaling) DeleteLifecycleHook(input *DeleteLifecycleHookInput) (*DeleteLifecycleHookOutput, error) {
req, out := c.DeleteLifecycleHookRequest(input)
return out, req.Send()
}
// DeleteLifecycleHookWithContext is the same as DeleteLifecycleHook with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteLifecycleHook for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DeleteLifecycleHookWithContext(ctx aws.Context, input *DeleteLifecycleHookInput, opts ...request.Option) (*DeleteLifecycleHookOutput, error) {
req, out := c.DeleteLifecycleHookRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration"
// DeleteNotificationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNotificationConfiguration operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteNotificationConfiguration for more information on using the DeleteNotificationConfiguration
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteNotificationConfigurationRequest method.
// req, resp := client.DeleteNotificationConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfiguration
func (c *AutoScaling) DeleteNotificationConfigurationRequest(input *DeleteNotificationConfigurationInput) (req *request.Request, output *DeleteNotificationConfigurationOutput) {
op := &request.Operation{
Name: opDeleteNotificationConfiguration,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteNotificationConfigurationInput{}
}
output = &DeleteNotificationConfigurationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteNotificationConfiguration API operation for Auto Scaling.
//
// Deletes the specified notification.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DeleteNotificationConfiguration for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfiguration
func (c *AutoScaling) DeleteNotificationConfiguration(input *DeleteNotificationConfigurationInput) (*DeleteNotificationConfigurationOutput, error) {
req, out := c.DeleteNotificationConfigurationRequest(input)
return out, req.Send()
}
// DeleteNotificationConfigurationWithContext is the same as DeleteNotificationConfiguration with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteNotificationConfiguration for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DeleteNotificationConfigurationWithContext(ctx aws.Context, input *DeleteNotificationConfigurationInput, opts ...request.Option) (*DeleteNotificationConfigurationOutput, error) {
req, out := c.DeleteNotificationConfigurationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeletePolicy = "DeletePolicy"
// DeletePolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeletePolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeletePolicy for more information on using the DeletePolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeletePolicyRequest method.
// req, resp := client.DeletePolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy
func (c *AutoScaling) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) {
op := &request.Operation{
Name: opDeletePolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeletePolicyInput{}
}
output = &DeletePolicyOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeletePolicy API operation for Auto Scaling.
//
// Deletes the specified scaling policy.
//
// Deleting a policy deletes the underlying alarm action, but does not delete
// the alarm, even if it no longer has an associated action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DeletePolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
// The service-linked role is not yet ready for use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy
func (c *AutoScaling) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) {
req, out := c.DeletePolicyRequest(input)
return out, req.Send()
}
// DeletePolicyWithContext is the same as DeletePolicy with the addition of
// the ability to pass a context and additional request options.
//
// See DeletePolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) {
req, out := c.DeletePolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteScheduledAction = "DeleteScheduledAction"
// DeleteScheduledActionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteScheduledAction operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteScheduledAction for more information on using the DeleteScheduledAction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteScheduledActionRequest method.
// req, resp := client.DeleteScheduledActionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledAction
func (c *AutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) {
op := &request.Operation{
Name: opDeleteScheduledAction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteScheduledActionInput{}
}
output = &DeleteScheduledActionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteScheduledAction API operation for Auto Scaling.
//
// Deletes the specified scheduled action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DeleteScheduledAction for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledAction
func (c *AutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) (*DeleteScheduledActionOutput, error) {
req, out := c.DeleteScheduledActionRequest(input)
return out, req.Send()
}
// DeleteScheduledActionWithContext is the same as DeleteScheduledAction with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteScheduledAction for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DeleteScheduledActionWithContext(ctx aws.Context, input *DeleteScheduledActionInput, opts ...request.Option) (*DeleteScheduledActionOutput, error) {
req, out := c.DeleteScheduledActionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteTags = "DeleteTags"
// DeleteTagsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteTags for more information on using the DeleteTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteTagsRequest method.
// req, resp := client.DeleteTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTags
func (c *AutoScaling) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
op := &request.Operation{
Name: opDeleteTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteTagsInput{}
}
output = &DeleteTagsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteTags API operation for Auto Scaling.
//
// Deletes the specified tags.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DeleteTags for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// * ErrCodeResourceInUseFault "ResourceInUse"
// The operation can't be performed because the resource is in use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTags
func (c *AutoScaling) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
req, out := c.DeleteTagsRequest(input)
return out, req.Send()
}
// DeleteTagsWithContext is the same as DeleteTags with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteTags for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
req, out := c.DeleteTagsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAccountLimits = "DescribeAccountLimits"
// DescribeAccountLimitsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAccountLimits operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAccountLimits for more information on using the DescribeAccountLimits
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAccountLimitsRequest method.
// req, resp := client.DescribeAccountLimitsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimits
func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) {
op := &request.Operation{
Name: opDescribeAccountLimits,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAccountLimitsInput{}
}
output = &DescribeAccountLimitsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAccountLimits API operation for Auto Scaling.
//
// Describes the current Amazon EC2 Auto Scaling resource limits for your AWS
// account.
//
// For information about requesting an increase in these limits, see Amazon
// EC2 Auto Scaling Limits (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeAccountLimits for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimits
func (c *AutoScaling) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) {
req, out := c.DescribeAccountLimitsRequest(input)
return out, req.Send()
}
// DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAccountLimits for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) {
req, out := c.DescribeAccountLimitsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes"
// DescribeAdjustmentTypesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAdjustmentTypes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAdjustmentTypes for more information on using the DescribeAdjustmentTypes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAdjustmentTypesRequest method.
// req, resp := client.DescribeAdjustmentTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypes
func (c *AutoScaling) DescribeAdjustmentTypesRequest(input *DescribeAdjustmentTypesInput) (req *request.Request, output *DescribeAdjustmentTypesOutput) {
op := &request.Operation{
Name: opDescribeAdjustmentTypes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAdjustmentTypesInput{}
}
output = &DescribeAdjustmentTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAdjustmentTypes API operation for Auto Scaling.
//
// Describes the policy adjustment types for use with PutScalingPolicy.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeAdjustmentTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypes
func (c *AutoScaling) DescribeAdjustmentTypes(input *DescribeAdjustmentTypesInput) (*DescribeAdjustmentTypesOutput, error) {
req, out := c.DescribeAdjustmentTypesRequest(input)
return out, req.Send()
}
// DescribeAdjustmentTypesWithContext is the same as DescribeAdjustmentTypes with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAdjustmentTypes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeAdjustmentTypesWithContext(ctx aws.Context, input *DescribeAdjustmentTypesInput, opts ...request.Option) (*DescribeAdjustmentTypesOutput, error) {
req, out := c.DescribeAdjustmentTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups"
// DescribeAutoScalingGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAutoScalingGroups operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAutoScalingGroups for more information on using the DescribeAutoScalingGroups
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAutoScalingGroupsRequest method.
// req, resp := client.DescribeAutoScalingGroupsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingGroups
func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalingGroupsInput) (req *request.Request, output *DescribeAutoScalingGroupsOutput) {
op := &request.Operation{
Name: opDescribeAutoScalingGroups,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxRecords",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeAutoScalingGroupsInput{}
}
output = &DescribeAutoScalingGroupsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAutoScalingGroups API operation for Auto Scaling.
//
// Describes one or more Auto Scaling groups.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeAutoScalingGroups for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The NextToken value is not valid.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingGroups
func (c *AutoScaling) DescribeAutoScalingGroups(input *DescribeAutoScalingGroupsInput) (*DescribeAutoScalingGroupsOutput, error) {
req, out := c.DescribeAutoScalingGroupsRequest(input)
return out, req.Send()
}
// DescribeAutoScalingGroupsWithContext is the same as DescribeAutoScalingGroups with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAutoScalingGroups for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeAutoScalingGroupsWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.Option) (*DescribeAutoScalingGroupsOutput, error) {
req, out := c.DescribeAutoScalingGroupsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeAutoScalingGroupsPages iterates over the pages of a DescribeAutoScalingGroups operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeAutoScalingGroups method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeAutoScalingGroups operation.
// pageNum := 0
// err := client.DescribeAutoScalingGroupsPages(params,
// func(page *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *AutoScaling) DescribeAutoScalingGroupsPages(input *DescribeAutoScalingGroupsInput, fn func(*DescribeAutoScalingGroupsOutput, bool) bool) error {
return c.DescribeAutoScalingGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeAutoScalingGroupsPagesWithContext same as DescribeAutoScalingGroupsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeAutoScalingGroupsPagesWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, fn func(*DescribeAutoScalingGroupsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeAutoScalingGroupsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeAutoScalingGroupsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeAutoScalingGroupsOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances"
// DescribeAutoScalingInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAutoScalingInstances operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAutoScalingInstances for more information on using the DescribeAutoScalingInstances
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAutoScalingInstancesRequest method.
// req, resp := client.DescribeAutoScalingInstancesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances
func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoScalingInstancesInput) (req *request.Request, output *DescribeAutoScalingInstancesOutput) {
op := &request.Operation{
Name: opDescribeAutoScalingInstances,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxRecords",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeAutoScalingInstancesInput{}
}
output = &DescribeAutoScalingInstancesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAutoScalingInstances API operation for Auto Scaling.
//
// Describes one or more Auto Scaling instances.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeAutoScalingInstances for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The NextToken value is not valid.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances
func (c *AutoScaling) DescribeAutoScalingInstances(input *DescribeAutoScalingInstancesInput) (*DescribeAutoScalingInstancesOutput, error) {
req, out := c.DescribeAutoScalingInstancesRequest(input)
return out, req.Send()
}
// DescribeAutoScalingInstancesWithContext is the same as DescribeAutoScalingInstances with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAutoScalingInstances for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeAutoScalingInstancesWithContext(ctx aws.Context, input *DescribeAutoScalingInstancesInput, opts ...request.Option) (*DescribeAutoScalingInstancesOutput, error) {
req, out := c.DescribeAutoScalingInstancesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeAutoScalingInstancesPages iterates over the pages of a DescribeAutoScalingInstances operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeAutoScalingInstances method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeAutoScalingInstances operation.
// pageNum := 0
// err := client.DescribeAutoScalingInstancesPages(params,
// func(page *autoscaling.DescribeAutoScalingInstancesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *AutoScaling) DescribeAutoScalingInstancesPages(input *DescribeAutoScalingInstancesInput, fn func(*DescribeAutoScalingInstancesOutput, bool) bool) error {
return c.DescribeAutoScalingInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeAutoScalingInstancesPagesWithContext same as DescribeAutoScalingInstancesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeAutoScalingInstancesPagesWithContext(ctx aws.Context, input *DescribeAutoScalingInstancesInput, fn func(*DescribeAutoScalingInstancesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeAutoScalingInstancesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeAutoScalingInstancesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeAutoScalingInstancesOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationTypes"
// DescribeAutoScalingNotificationTypesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAutoScalingNotificationTypes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAutoScalingNotificationTypes for more information on using the DescribeAutoScalingNotificationTypes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAutoScalingNotificationTypesRequest method.
// req, resp := client.DescribeAutoScalingNotificationTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypes
func (c *AutoScaling) DescribeAutoScalingNotificationTypesRequest(input *DescribeAutoScalingNotificationTypesInput) (req *request.Request, output *DescribeAutoScalingNotificationTypesOutput) {
op := &request.Operation{
Name: opDescribeAutoScalingNotificationTypes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAutoScalingNotificationTypesInput{}
}
output = &DescribeAutoScalingNotificationTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAutoScalingNotificationTypes API operation for Auto Scaling.
//
// Describes the notification types that are supported by Amazon EC2 Auto Scaling.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeAutoScalingNotificationTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypes
func (c *AutoScaling) DescribeAutoScalingNotificationTypes(input *DescribeAutoScalingNotificationTypesInput) (*DescribeAutoScalingNotificationTypesOutput, error) {
req, out := c.DescribeAutoScalingNotificationTypesRequest(input)
return out, req.Send()
}
// DescribeAutoScalingNotificationTypesWithContext is the same as DescribeAutoScalingNotificationTypes with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAutoScalingNotificationTypes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeAutoScalingNotificationTypesWithContext(ctx aws.Context, input *DescribeAutoScalingNotificationTypesInput, opts ...request.Option) (*DescribeAutoScalingNotificationTypesOutput, error) {
req, out := c.DescribeAutoScalingNotificationTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations"
// DescribeLaunchConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeLaunchConfigurations operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeLaunchConfigurations for more information on using the DescribeLaunchConfigurations
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeLaunchConfigurationsRequest method.
// req, resp := client.DescribeLaunchConfigurationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLaunchConfigurations
func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchConfigurationsInput) (req *request.Request, output *DescribeLaunchConfigurationsOutput) {
op := &request.Operation{
Name: opDescribeLaunchConfigurations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxRecords",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeLaunchConfigurationsInput{}
}
output = &DescribeLaunchConfigurationsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeLaunchConfigurations API operation for Auto Scaling.
//
// Describes one or more launch configurations.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeLaunchConfigurations for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The NextToken value is not valid.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLaunchConfigurations
func (c *AutoScaling) DescribeLaunchConfigurations(input *DescribeLaunchConfigurationsInput) (*DescribeLaunchConfigurationsOutput, error) {
req, out := c.DescribeLaunchConfigurationsRequest(input)
return out, req.Send()
}
// DescribeLaunchConfigurationsWithContext is the same as DescribeLaunchConfigurations with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeLaunchConfigurations for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeLaunchConfigurationsWithContext(ctx aws.Context, input *DescribeLaunchConfigurationsInput, opts ...request.Option) (*DescribeLaunchConfigurationsOutput, error) {
req, out := c.DescribeLaunchConfigurationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeLaunchConfigurationsPages iterates over the pages of a DescribeLaunchConfigurations operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeLaunchConfigurations method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeLaunchConfigurations operation.
// pageNum := 0
// err := client.DescribeLaunchConfigurationsPages(params,
// func(page *autoscaling.DescribeLaunchConfigurationsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *AutoScaling) DescribeLaunchConfigurationsPages(input *DescribeLaunchConfigurationsInput, fn func(*DescribeLaunchConfigurationsOutput, bool) bool) error {
return c.DescribeLaunchConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeLaunchConfigurationsPagesWithContext same as DescribeLaunchConfigurationsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeLaunchConfigurationsPagesWithContext(ctx aws.Context, input *DescribeLaunchConfigurationsInput, fn func(*DescribeLaunchConfigurationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeLaunchConfigurationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeLaunchConfigurationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeLaunchConfigurationsOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes"
// DescribeLifecycleHookTypesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeLifecycleHookTypes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeLifecycleHookTypes for more information on using the DescribeLifecycleHookTypes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeLifecycleHookTypesRequest method.
// req, resp := client.DescribeLifecycleHookTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypes
func (c *AutoScaling) DescribeLifecycleHookTypesRequest(input *DescribeLifecycleHookTypesInput) (req *request.Request, output *DescribeLifecycleHookTypesOutput) {
op := &request.Operation{
Name: opDescribeLifecycleHookTypes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLifecycleHookTypesInput{}
}
output = &DescribeLifecycleHookTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeLifecycleHookTypes API operation for Auto Scaling.
//
// Describes the available types of lifecycle hooks.
//
// The following hook types are supported:
//
// * autoscaling:EC2_INSTANCE_LAUNCHING
//
// * autoscaling:EC2_INSTANCE_TERMINATING
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeLifecycleHookTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypes
func (c *AutoScaling) DescribeLifecycleHookTypes(input *DescribeLifecycleHookTypesInput) (*DescribeLifecycleHookTypesOutput, error) {
req, out := c.DescribeLifecycleHookTypesRequest(input)
return out, req.Send()
}
// DescribeLifecycleHookTypesWithContext is the same as DescribeLifecycleHookTypes with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeLifecycleHookTypes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeLifecycleHookTypesWithContext(ctx aws.Context, input *DescribeLifecycleHookTypesInput, opts ...request.Option) (*DescribeLifecycleHookTypesOutput, error) {
req, out := c.DescribeLifecycleHookTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeLifecycleHooks = "DescribeLifecycleHooks"
// DescribeLifecycleHooksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeLifecycleHooks operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeLifecycleHooks for more information on using the DescribeLifecycleHooks
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeLifecycleHooksRequest method.
// req, resp := client.DescribeLifecycleHooksRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooks
func (c *AutoScaling) DescribeLifecycleHooksRequest(input *DescribeLifecycleHooksInput) (req *request.Request, output *DescribeLifecycleHooksOutput) {
op := &request.Operation{
Name: opDescribeLifecycleHooks,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLifecycleHooksInput{}
}
output = &DescribeLifecycleHooksOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeLifecycleHooks API operation for Auto Scaling.
//
// Describes the lifecycle hooks for the specified Auto Scaling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeLifecycleHooks for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooks
func (c *AutoScaling) DescribeLifecycleHooks(input *DescribeLifecycleHooksInput) (*DescribeLifecycleHooksOutput, error) {
req, out := c.DescribeLifecycleHooksRequest(input)
return out, req.Send()
}
// DescribeLifecycleHooksWithContext is the same as DescribeLifecycleHooks with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeLifecycleHooks for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeLifecycleHooksWithContext(ctx aws.Context, input *DescribeLifecycleHooksInput, opts ...request.Option) (*DescribeLifecycleHooksOutput, error) {
req, out := c.DescribeLifecycleHooksRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeLoadBalancerTargetGroups = "DescribeLoadBalancerTargetGroups"
// DescribeLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeLoadBalancerTargetGroups operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeLoadBalancerTargetGroups for more information on using the DescribeLoadBalancerTargetGroups
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeLoadBalancerTargetGroupsRequest method.
// req, resp := client.DescribeLoadBalancerTargetGroupsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroups
func (c *AutoScaling) DescribeLoadBalancerTargetGroupsRequest(input *DescribeLoadBalancerTargetGroupsInput) (req *request.Request, output *DescribeLoadBalancerTargetGroupsOutput) {
op := &request.Operation{
Name: opDescribeLoadBalancerTargetGroups,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLoadBalancerTargetGroupsInput{}
}
output = &DescribeLoadBalancerTargetGroupsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeLoadBalancerTargetGroups API operation for Auto Scaling.
//
// Describes the target groups for the specified Auto Scaling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeLoadBalancerTargetGroups for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroups
func (c *AutoScaling) DescribeLoadBalancerTargetGroups(input *DescribeLoadBalancerTargetGroupsInput) (*DescribeLoadBalancerTargetGroupsOutput, error) {
req, out := c.DescribeLoadBalancerTargetGroupsRequest(input)
return out, req.Send()
}
// DescribeLoadBalancerTargetGroupsWithContext is the same as DescribeLoadBalancerTargetGroups with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeLoadBalancerTargetGroups for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *DescribeLoadBalancerTargetGroupsInput, opts ...request.Option) (*DescribeLoadBalancerTargetGroupsOutput, error) {
req, out := c.DescribeLoadBalancerTargetGroupsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeLoadBalancers = "DescribeLoadBalancers"
// DescribeLoadBalancersRequest generates a "aws/request.Request" representing the
// client's request for the DescribeLoadBalancers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeLoadBalancers for more information on using the DescribeLoadBalancers
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeLoadBalancersRequest method.
// req, resp := client.DescribeLoadBalancersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancers
func (c *AutoScaling) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) {
op := &request.Operation{
Name: opDescribeLoadBalancers,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLoadBalancersInput{}
}
output = &DescribeLoadBalancersOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeLoadBalancers API operation for Auto Scaling.
//
// Describes the load balancers for the specified Auto Scaling group.
//
// This operation describes only Classic Load Balancers. If you have Application
// Load Balancers or Network Load Balancers, use DescribeLoadBalancerTargetGroups
// instead.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeLoadBalancers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancers
func (c *AutoScaling) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) {
req, out := c.DescribeLoadBalancersRequest(input)
return out, req.Send()
}
// DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeLoadBalancers for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) {
req, out := c.DescribeLoadBalancersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes"
// DescribeMetricCollectionTypesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeMetricCollectionTypes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeMetricCollectionTypes for more information on using the DescribeMetricCollectionTypes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeMetricCollectionTypesRequest method.
// req, resp := client.DescribeMetricCollectionTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypes
func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetricCollectionTypesInput) (req *request.Request, output *DescribeMetricCollectionTypesOutput) {
op := &request.Operation{
Name: opDescribeMetricCollectionTypes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeMetricCollectionTypesInput{}
}
output = &DescribeMetricCollectionTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeMetricCollectionTypes API operation for Auto Scaling.
//
// Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling.
//
// The GroupStandbyInstances metric is not returned by default. You must explicitly
// request this metric when calling EnableMetricsCollection.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeMetricCollectionTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypes
func (c *AutoScaling) DescribeMetricCollectionTypes(input *DescribeMetricCollectionTypesInput) (*DescribeMetricCollectionTypesOutput, error) {
req, out := c.DescribeMetricCollectionTypesRequest(input)
return out, req.Send()
}
// DescribeMetricCollectionTypesWithContext is the same as DescribeMetricCollectionTypes with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeMetricCollectionTypes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeMetricCollectionTypesWithContext(ctx aws.Context, input *DescribeMetricCollectionTypesInput, opts ...request.Option) (*DescribeMetricCollectionTypesOutput, error) {
req, out := c.DescribeMetricCollectionTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations"
// DescribeNotificationConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNotificationConfigurations operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeNotificationConfigurations for more information on using the DescribeNotificationConfigurations
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeNotificationConfigurationsRequest method.
// req, resp := client.DescribeNotificationConfigurationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurations
func (c *AutoScaling) DescribeNotificationConfigurationsRequest(input *DescribeNotificationConfigurationsInput) (req *request.Request, output *DescribeNotificationConfigurationsOutput) {
op := &request.Operation{
Name: opDescribeNotificationConfigurations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxRecords",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeNotificationConfigurationsInput{}
}
output = &DescribeNotificationConfigurationsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeNotificationConfigurations API operation for Auto Scaling.
//
// Describes the notification actions associated with the specified Auto Scaling
// group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeNotificationConfigurations for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The NextToken value is not valid.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurations
func (c *AutoScaling) DescribeNotificationConfigurations(input *DescribeNotificationConfigurationsInput) (*DescribeNotificationConfigurationsOutput, error) {
req, out := c.DescribeNotificationConfigurationsRequest(input)
return out, req.Send()
}
// DescribeNotificationConfigurationsWithContext is the same as DescribeNotificationConfigurations with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeNotificationConfigurations for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeNotificationConfigurationsWithContext(ctx aws.Context, input *DescribeNotificationConfigurationsInput, opts ...request.Option) (*DescribeNotificationConfigurationsOutput, error) {
req, out := c.DescribeNotificationConfigurationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeNotificationConfigurationsPages iterates over the pages of a DescribeNotificationConfigurations operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeNotificationConfigurations method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeNotificationConfigurations operation.
// pageNum := 0
// err := client.DescribeNotificationConfigurationsPages(params,
// func(page *autoscaling.DescribeNotificationConfigurationsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *AutoScaling) DescribeNotificationConfigurationsPages(input *DescribeNotificationConfigurationsInput, fn func(*DescribeNotificationConfigurationsOutput, bool) bool) error {
return c.DescribeNotificationConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeNotificationConfigurationsPagesWithContext same as DescribeNotificationConfigurationsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeNotificationConfigurationsPagesWithContext(ctx aws.Context, input *DescribeNotificationConfigurationsInput, fn func(*DescribeNotificationConfigurationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeNotificationConfigurationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeNotificationConfigurationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeNotificationConfigurationsOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribePolicies = "DescribePolicies"
// DescribePoliciesRequest generates a "aws/request.Request" representing the
// client's request for the DescribePolicies operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribePolicies for more information on using the DescribePolicies
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribePoliciesRequest method.
// req, resp := client.DescribePoliciesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePolicies
func (c *AutoScaling) DescribePoliciesRequest(input *DescribePoliciesInput) (req *request.Request, output *DescribePoliciesOutput) {
op := &request.Operation{
Name: opDescribePolicies,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxRecords",
TruncationToken: "",
},
}
if input == nil {
input = &DescribePoliciesInput{}
}
output = &DescribePoliciesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribePolicies API operation for Auto Scaling.
//
// Describes the policies for the specified Auto Scaling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribePolicies for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The NextToken value is not valid.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
// The service-linked role is not yet ready for use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePolicies
func (c *AutoScaling) DescribePolicies(input *DescribePoliciesInput) (*DescribePoliciesOutput, error) {
req, out := c.DescribePoliciesRequest(input)
return out, req.Send()
}
// DescribePoliciesWithContext is the same as DescribePolicies with the addition of
// the ability to pass a context and additional request options.
//
// See DescribePolicies for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribePoliciesWithContext(ctx aws.Context, input *DescribePoliciesInput, opts ...request.Option) (*DescribePoliciesOutput, error) {
req, out := c.DescribePoliciesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribePoliciesPages iterates over the pages of a DescribePolicies operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribePolicies method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribePolicies operation.
// pageNum := 0
// err := client.DescribePoliciesPages(params,
// func(page *autoscaling.DescribePoliciesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *AutoScaling) DescribePoliciesPages(input *DescribePoliciesInput, fn func(*DescribePoliciesOutput, bool) bool) error {
return c.DescribePoliciesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribePoliciesPagesWithContext same as DescribePoliciesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribePoliciesPagesWithContext(ctx aws.Context, input *DescribePoliciesInput, fn func(*DescribePoliciesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribePoliciesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribePoliciesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribePoliciesOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeScalingActivities = "DescribeScalingActivities"
// DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScalingActivities operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeScalingActivities for more information on using the DescribeScalingActivities
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeScalingActivitiesRequest method.
// req, resp := client.DescribeScalingActivitiesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivities
func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) {
op := &request.Operation{
Name: opDescribeScalingActivities,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxRecords",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeScalingActivitiesInput{}
}
output = &DescribeScalingActivitiesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeScalingActivities API operation for Auto Scaling.
//
// Describes one or more scaling activities for the specified Auto Scaling group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeScalingActivities for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The NextToken value is not valid.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivities
func (c *AutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) {
req, out := c.DescribeScalingActivitiesRequest(input)
return out, req.Send()
}
// DescribeScalingActivitiesWithContext is the same as DescribeScalingActivities with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeScalingActivities for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeScalingActivitiesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, opts ...request.Option) (*DescribeScalingActivitiesOutput, error) {
req, out := c.DescribeScalingActivitiesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeScalingActivitiesPages iterates over the pages of a DescribeScalingActivities operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeScalingActivities method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeScalingActivities operation.
// pageNum := 0
// err := client.DescribeScalingActivitiesPages(params,
// func(page *autoscaling.DescribeScalingActivitiesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *AutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool) error {
return c.DescribeScalingActivitiesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeScalingActivitiesPagesWithContext same as DescribeScalingActivitiesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeScalingActivitiesPagesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeScalingActivitiesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeScalingActivitiesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes"
// DescribeScalingProcessTypesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScalingProcessTypes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeScalingProcessTypes for more information on using the DescribeScalingProcessTypes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeScalingProcessTypesRequest method.
// req, resp := client.DescribeScalingProcessTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingProcessTypes
func (c *AutoScaling) DescribeScalingProcessTypesRequest(input *DescribeScalingProcessTypesInput) (req *request.Request, output *DescribeScalingProcessTypesOutput) {
op := &request.Operation{
Name: opDescribeScalingProcessTypes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeScalingProcessTypesInput{}
}
output = &DescribeScalingProcessTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeScalingProcessTypes API operation for Auto Scaling.
//
// Describes the scaling process types for use with ResumeProcesses and SuspendProcesses.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeScalingProcessTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingProcessTypes
func (c *AutoScaling) DescribeScalingProcessTypes(input *DescribeScalingProcessTypesInput) (*DescribeScalingProcessTypesOutput, error) {
req, out := c.DescribeScalingProcessTypesRequest(input)
return out, req.Send()
}
// DescribeScalingProcessTypesWithContext is the same as DescribeScalingProcessTypes with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeScalingProcessTypes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeScalingProcessTypesWithContext(ctx aws.Context, input *DescribeScalingProcessTypesInput, opts ...request.Option) (*DescribeScalingProcessTypesOutput, error) {
req, out := c.DescribeScalingProcessTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeScheduledActions = "DescribeScheduledActions"
// DescribeScheduledActionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScheduledActions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeScheduledActions for more information on using the DescribeScheduledActions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeScheduledActionsRequest method.
// req, resp := client.DescribeScheduledActionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActions
func (c *AutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) {
op := &request.Operation{
Name: opDescribeScheduledActions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxRecords",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeScheduledActionsInput{}
}
output = &DescribeScheduledActionsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeScheduledActions API operation for Auto Scaling.
//
// Describes the actions scheduled for your Auto Scaling group that haven't
// run. To describe the actions that have already run, use DescribeScalingActivities.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeScheduledActions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The NextToken value is not valid.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActions
func (c *AutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) {
req, out := c.DescribeScheduledActionsRequest(input)
return out, req.Send()
}
// DescribeScheduledActionsWithContext is the same as DescribeScheduledActions with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeScheduledActions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeScheduledActionsWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, opts ...request.Option) (*DescribeScheduledActionsOutput, error) {
req, out := c.DescribeScheduledActionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeScheduledActionsPages iterates over the pages of a DescribeScheduledActions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeScheduledActions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeScheduledActions operation.
// pageNum := 0
// err := client.DescribeScheduledActionsPages(params,
// func(page *autoscaling.DescribeScheduledActionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *AutoScaling) DescribeScheduledActionsPages(input *DescribeScheduledActionsInput, fn func(*DescribeScheduledActionsOutput, bool) bool) error {
return c.DescribeScheduledActionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeScheduledActionsPagesWithContext same as DescribeScheduledActionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeScheduledActionsPagesWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, fn func(*DescribeScheduledActionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeScheduledActionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeScheduledActionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeScheduledActionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeTags = "DescribeTags"
// DescribeTagsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeTags for more information on using the DescribeTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeTagsRequest method.
// req, resp := client.DescribeTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTags
func (c *AutoScaling) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
op := &request.Operation{
Name: opDescribeTags,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxRecords",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeTagsInput{}
}
output = &DescribeTagsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeTags API operation for Auto Scaling.
//
// Describes the specified tags.
//
// You can use filters to limit the results. For example, you can query for
// the tags for a specific Auto Scaling group. You can specify multiple values
// for a filter. A tag must match at least one of the specified values for it
// to be included in the results.
//
// You can also specify multiple filters. The result includes information for
// a particular tag only if it matches all the filters. If there's no match,
// no special message is returned.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeTags for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The NextToken value is not valid.
//
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTags
func (c *AutoScaling) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
req, out := c.DescribeTagsRequest(input)
return out, req.Send()
}
// DescribeTagsWithContext is the same as DescribeTags with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeTags for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
req, out := c.DescribeTagsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeTagsPages iterates over the pages of a DescribeTags operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeTags method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeTags operation.
// pageNum := 0
// err := client.DescribeTagsPages(params,
// func(page *autoscaling.DescribeTagsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *AutoScaling) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error {
return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeTagsPagesWithContext same as DescribeTagsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeTagsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeTagsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes"
// DescribeTerminationPolicyTypesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeTerminationPolicyTypes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeTerminationPolicyTypes for more information on using the DescribeTerminationPolicyTypes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeTerminationPolicyTypesRequest method.
// req, resp := client.DescribeTerminationPolicyTypesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypes
func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTerminationPolicyTypesInput) (req *request.Request, output *DescribeTerminationPolicyTypesOutput) {
op := &request.Operation{
Name: opDescribeTerminationPolicyTypes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeTerminationPolicyTypesInput{}
}
output = &DescribeTerminationPolicyTypesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeTerminationPolicyTypes API operation for Auto Scaling.
//
// Describes the termination policies supported by Amazon EC2 Auto Scaling.
//
// For more information, see Controlling Which Auto Scaling Instances Terminate
// During Scale In (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DescribeTerminationPolicyTypes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypes
func (c *AutoScaling) DescribeTerminationPolicyTypes(input *DescribeTerminationPolicyTypesInput) (*DescribeTerminationPolicyTypesOutput, error) {
req, out := c.DescribeTerminationPolicyTypesRequest(input)
return out, req.Send()
}
// DescribeTerminationPolicyTypesWithContext is the same as DescribeTerminationPolicyTypes with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeTerminationPolicyTypes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DescribeTerminationPolicyTypesWithContext(ctx aws.Context, input *DescribeTerminationPolicyTypesInput, opts ...request.Option) (*DescribeTerminationPolicyTypesOutput, error) {
req, out := c.DescribeTerminationPolicyTypesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDetachInstances = "DetachInstances"
// DetachInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DetachInstances operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DetachInstances for more information on using the DetachInstances
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DetachInstancesRequest method.
// req, resp := client.DetachInstancesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances
func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req *request.Request, output *DetachInstancesOutput) {
op := &request.Operation{
Name: opDetachInstances,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DetachInstancesInput{}
}
output = &DetachInstancesOutput{}
req = c.newRequest(op, input, output)
return
}
// DetachInstances API operation for Auto Scaling.
//
// Removes one or more instances from the specified Auto Scaling group.
//
// After the instances are detached, you can manage them independent of the
// Auto Scaling group.
//
// If you do not specify the option to decrement the desired capacity, Amazon
// EC2 Auto Scaling launches instances to replace the ones that are detached.
//
// If there is a Classic Load Balancer attached to the Auto Scaling group, the
// instances are deregistered from the load balancer. If there are target groups
// attached to the Auto Scaling group, the instances are deregistered from the
// target groups.
//
// For more information, see Detach EC2 Instances from Your Auto Scaling Group
// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html)
// in the Amazon EC2 Auto Scaling User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Auto Scaling's
// API operation DetachInstances for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceContentionFault "ResourceContention"
// You already have a pending update to an Amazon EC2 Auto Scaling resource
// (for example, an Auto Scaling group, instance, or load balancer).
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances
func (c *AutoScaling) DetachInstances(input *DetachInstancesInput) (*DetachInstancesOutput, error) {
req, out := c.DetachInstancesRequest(input)
return out, req.Send()
}
// DetachInstancesWithContext is the same as DetachInstances with the addition of
// the ability to pass a context and additional request options.
//
// See DetachInstances for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *AutoScaling) DetachInstancesWithContext(ctx aws.Context, input *DetachInstancesInput, opts ...request.Option) (*DetachInstancesOutput, error) {
req, out := c.DetachInstancesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDetachLoadBalancerTargetGroups = "DetachLoadBalancerTargetGroups"
// DetachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DetachLoadBalancerTargetGroups operation. The "output" return
// val