Upgrade AWS SKD to version v1.13.1
This commit is contained in:
parent
0c0949679f
commit
39eeb67d91
101 changed files with 39395 additions and 10063 deletions
4222
vendor/github.com/aws/aws-sdk-go/service/ecs/api.go
generated
vendored
4222
vendor/github.com/aws/aws-sdk-go/service/ecs/api.go
generated
vendored
File diff suppressed because it is too large
Load diff
45
vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go
generated
vendored
Normal file
45
vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package ecs provides the client and types for making API
|
||||
// requests to Amazon EC2 Container Service.
|
||||
//
|
||||
// Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast,
|
||||
// container management service that makes it easy to run, stop, and manage
|
||||
// Docker containers on a cluster. You can host your cluster on a serverless
|
||||
// infrastructure that is managed by Amazon ECS by launching your services or
|
||||
// tasks using the Fargate launch type. For more control, you can host your
|
||||
// tasks on a cluster of Amazon Elastic Compute Cloud (Amazon EC2) instances
|
||||
// that you manage by using the EC2 launch type. For more information about
|
||||
// launch types, see Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html).
|
||||
//
|
||||
// Amazon ECS lets you launch and stop container-based applications with simple
|
||||
// API calls, allows you to get the state of your cluster from a centralized
|
||||
// service, and gives you access to many familiar Amazon EC2 features.
|
||||
//
|
||||
// You can use Amazon ECS to schedule the placement of containers across your
|
||||
// cluster based on your resource needs, isolation policies, and availability
|
||||
// requirements. Amazon ECS eliminates the need for you to operate your own
|
||||
// cluster management and configuration management systems or worry about scaling
|
||||
// your management infrastructure.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13 for more information on this service.
|
||||
//
|
||||
// See ecs package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/ecs/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact Amazon EC2 Container Service with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the Amazon EC2 Container Service client ECS for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/ecs/#New
|
||||
package ecs
|
145
vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go
generated
vendored
Normal file
145
vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,145 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package ecs
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAccessDeniedException for service response error code
|
||||
// "AccessDeniedException".
|
||||
//
|
||||
// You do not have authorization to perform the requested action.
|
||||
ErrCodeAccessDeniedException = "AccessDeniedException"
|
||||
|
||||
// ErrCodeAttributeLimitExceededException for service response error code
|
||||
// "AttributeLimitExceededException".
|
||||
//
|
||||
// You can apply up to 10 custom attributes per resource. You can view the attributes
|
||||
// of a resource with ListAttributes. You can remove existing attributes on
|
||||
// a resource with DeleteAttributes.
|
||||
ErrCodeAttributeLimitExceededException = "AttributeLimitExceededException"
|
||||
|
||||
// ErrCodeBlockedException for service response error code
|
||||
// "BlockedException".
|
||||
//
|
||||
// Your AWS account has been blocked. Contact AWS Customer Support (http://aws.amazon.com/contact-us/)
|
||||
// for more information.
|
||||
ErrCodeBlockedException = "BlockedException"
|
||||
|
||||
// ErrCodeClientException for service response error code
|
||||
// "ClientException".
|
||||
//
|
||||
// These errors are usually caused by a client action, such as using an action
|
||||
// or resource on behalf of a user that doesn't have permissions to use the
|
||||
// action or resource, or specifying an identifier that is not valid.
|
||||
ErrCodeClientException = "ClientException"
|
||||
|
||||
// ErrCodeClusterContainsContainerInstancesException for service response error code
|
||||
// "ClusterContainsContainerInstancesException".
|
||||
//
|
||||
// You cannot delete a cluster that has registered container instances. You
|
||||
// must first deregister the container instances before you can delete the cluster.
|
||||
// For more information, see DeregisterContainerInstance.
|
||||
ErrCodeClusterContainsContainerInstancesException = "ClusterContainsContainerInstancesException"
|
||||
|
||||
// ErrCodeClusterContainsServicesException for service response error code
|
||||
// "ClusterContainsServicesException".
|
||||
//
|
||||
// You cannot delete a cluster that contains services. You must first update
|
||||
// the service to reduce its desired task count to 0 and then delete the service.
|
||||
// For more information, see UpdateService and DeleteService.
|
||||
ErrCodeClusterContainsServicesException = "ClusterContainsServicesException"
|
||||
|
||||
// ErrCodeClusterContainsTasksException for service response error code
|
||||
// "ClusterContainsTasksException".
|
||||
//
|
||||
// You cannot delete a cluster that has active tasks.
|
||||
ErrCodeClusterContainsTasksException = "ClusterContainsTasksException"
|
||||
|
||||
// ErrCodeClusterNotFoundException for service response error code
|
||||
// "ClusterNotFoundException".
|
||||
//
|
||||
// The specified cluster could not be found. You can view your available clusters
|
||||
// with ListClusters. Amazon ECS clusters are region-specific.
|
||||
ErrCodeClusterNotFoundException = "ClusterNotFoundException"
|
||||
|
||||
// ErrCodeInvalidParameterException for service response error code
|
||||
// "InvalidParameterException".
|
||||
//
|
||||
// The specified parameter is invalid. Review the available parameters for the
|
||||
// API request.
|
||||
ErrCodeInvalidParameterException = "InvalidParameterException"
|
||||
|
||||
// ErrCodeMissingVersionException for service response error code
|
||||
// "MissingVersionException".
|
||||
//
|
||||
// Amazon ECS is unable to determine the current version of the Amazon ECS container
|
||||
// agent on the container instance and does not have enough information to proceed
|
||||
// with an update. This could be because the agent running on the container
|
||||
// instance is an older or custom version that does not use our version information.
|
||||
ErrCodeMissingVersionException = "MissingVersionException"
|
||||
|
||||
// ErrCodeNoUpdateAvailableException for service response error code
|
||||
// "NoUpdateAvailableException".
|
||||
//
|
||||
// There is no update available for this Amazon ECS container agent. This could
|
||||
// be because the agent is already running the latest version, or it is so old
|
||||
// that there is no update path to the current version.
|
||||
ErrCodeNoUpdateAvailableException = "NoUpdateAvailableException"
|
||||
|
||||
// ErrCodePlatformTaskDefinitionIncompatibilityException for service response error code
|
||||
// "PlatformTaskDefinitionIncompatibilityException".
|
||||
//
|
||||
// The specified platform version does not satisfy the task definition’s required
|
||||
// capabilities.
|
||||
ErrCodePlatformTaskDefinitionIncompatibilityException = "PlatformTaskDefinitionIncompatibilityException"
|
||||
|
||||
// ErrCodePlatformUnknownException for service response error code
|
||||
// "PlatformUnknownException".
|
||||
//
|
||||
// The specified platform version does not exist.
|
||||
ErrCodePlatformUnknownException = "PlatformUnknownException"
|
||||
|
||||
// ErrCodeServerException for service response error code
|
||||
// "ServerException".
|
||||
//
|
||||
// These errors are usually caused by a server issue.
|
||||
ErrCodeServerException = "ServerException"
|
||||
|
||||
// ErrCodeServiceNotActiveException for service response error code
|
||||
// "ServiceNotActiveException".
|
||||
//
|
||||
// The specified service is not active. You can't update a service that is inactive.
|
||||
// If you have previously deleted a service, you can re-create it with CreateService.
|
||||
ErrCodeServiceNotActiveException = "ServiceNotActiveException"
|
||||
|
||||
// ErrCodeServiceNotFoundException for service response error code
|
||||
// "ServiceNotFoundException".
|
||||
//
|
||||
// The specified service could not be found. You can view your available services
|
||||
// with ListServices. Amazon ECS services are cluster-specific and region-specific.
|
||||
ErrCodeServiceNotFoundException = "ServiceNotFoundException"
|
||||
|
||||
// ErrCodeTargetNotFoundException for service response error code
|
||||
// "TargetNotFoundException".
|
||||
//
|
||||
// The specified target could not be found. You can view your available container
|
||||
// instances with ListContainerInstances. Amazon ECS container instances are
|
||||
// cluster-specific and region-specific.
|
||||
ErrCodeTargetNotFoundException = "TargetNotFoundException"
|
||||
|
||||
// ErrCodeUnsupportedFeatureException for service response error code
|
||||
// "UnsupportedFeatureException".
|
||||
//
|
||||
// The specified task is not supported in this region.
|
||||
ErrCodeUnsupportedFeatureException = "UnsupportedFeatureException"
|
||||
|
||||
// ErrCodeUpdateInProgressException for service response error code
|
||||
// "UpdateInProgressException".
|
||||
//
|
||||
// There is already a current Amazon ECS container agent update in progress
|
||||
// on the specified container instance. If the container agent becomes disconnected
|
||||
// while it is in a transitional stage, such as PENDING or STAGING, the update
|
||||
// process can get stuck in that state. However, when the agent reconnects,
|
||||
// it resumes where it stopped previously.
|
||||
ErrCodeUpdateInProgressException = "UpdateInProgressException"
|
||||
)
|
21
vendor/github.com/aws/aws-sdk-go/service/ecs/service.go
generated
vendored
21
vendor/github.com/aws/aws-sdk-go/service/ecs/service.go
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package ecs
|
||||
|
||||
|
@ -11,21 +11,12 @@ import (
|
|||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// Amazon EC2 Container Service (Amazon ECS) is a highly scalable, fast, container
|
||||
// management service that makes it easy to run, stop, and manage Docker containers
|
||||
// on a cluster of EC2 instances. Amazon ECS lets you launch and stop container-enabled
|
||||
// applications with simple API calls, allows you to get the state of your cluster
|
||||
// from a centralized service, and gives you access to many familiar Amazon
|
||||
// EC2 features like security groups, Amazon EBS volumes, and IAM roles.
|
||||
// ECS provides the API operation methods for making requests to
|
||||
// Amazon EC2 Container Service. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// You can use Amazon ECS to schedule the placement of containers across your
|
||||
// cluster based on your resource needs, isolation policies, and availability
|
||||
// requirements. Amazon EC2 Container Service eliminates the need for you to
|
||||
// operate your own cluster management and configuration management systems
|
||||
// or worry about scaling your management infrastructure.
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13
|
||||
// ECS methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type ECS struct {
|
||||
*client.Client
|
||||
}
|
||||
|
|
225
vendor/github.com/aws/aws-sdk-go/service/ecs/waiters.go
generated
vendored
225
vendor/github.com/aws/aws-sdk-go/service/ecs/waiters.go
generated
vendored
|
@ -1,151 +1,224 @@
|
|||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package ecs
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/private/waiter"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilServicesInactive uses the Amazon ECS API operation
|
||||
// DescribeServices to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *ECS) WaitUntilServicesInactive(input *DescribeServicesInput) error {
|
||||
waiterCfg := waiter.Config{
|
||||
Operation: "DescribeServices",
|
||||
Delay: 15,
|
||||
return c.WaitUntilServicesInactiveWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilServicesInactiveWithContext is an extended version of WaitUntilServicesInactive.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// 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 *ECS) WaitUntilServicesInactiveWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilServicesInactive",
|
||||
MaxAttempts: 40,
|
||||
Acceptors: []waiter.WaitAcceptor{
|
||||
Delay: request.ConstantWaiterDelay(15 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: "failure",
|
||||
Matcher: "pathAny",
|
||||
Argument: "failures[].reason",
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "failures[].reason",
|
||||
Expected: "MISSING",
|
||||
},
|
||||
{
|
||||
State: "success",
|
||||
Matcher: "pathAny",
|
||||
Argument: "services[].status",
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "services[].status",
|
||||
Expected: "INACTIVE",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeServicesInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeServicesRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
w := waiter.Waiter{
|
||||
Client: c,
|
||||
Input: input,
|
||||
Config: waiterCfg,
|
||||
}
|
||||
return w.Wait()
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilServicesStable uses the Amazon ECS API operation
|
||||
// DescribeServices to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *ECS) WaitUntilServicesStable(input *DescribeServicesInput) error {
|
||||
waiterCfg := waiter.Config{
|
||||
Operation: "DescribeServices",
|
||||
Delay: 15,
|
||||
return c.WaitUntilServicesStableWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilServicesStableWithContext is an extended version of WaitUntilServicesStable.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// 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 *ECS) WaitUntilServicesStableWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilServicesStable",
|
||||
MaxAttempts: 40,
|
||||
Acceptors: []waiter.WaitAcceptor{
|
||||
Delay: request.ConstantWaiterDelay(15 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: "failure",
|
||||
Matcher: "pathAny",
|
||||
Argument: "failures[].reason",
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "failures[].reason",
|
||||
Expected: "MISSING",
|
||||
},
|
||||
{
|
||||
State: "failure",
|
||||
Matcher: "pathAny",
|
||||
Argument: "services[].status",
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "services[].status",
|
||||
Expected: "DRAINING",
|
||||
},
|
||||
{
|
||||
State: "failure",
|
||||
Matcher: "pathAny",
|
||||
Argument: "services[].status",
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "services[].status",
|
||||
Expected: "INACTIVE",
|
||||
},
|
||||
{
|
||||
State: "success",
|
||||
Matcher: "path",
|
||||
Argument: "length(services[?!(length(deployments) == `1` && runningCount == desiredCount)]) == `0`",
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "length(services[?!(length(deployments) == `1` && runningCount == desiredCount)]) == `0`",
|
||||
Expected: true,
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeServicesInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeServicesRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
w := waiter.Waiter{
|
||||
Client: c,
|
||||
Input: input,
|
||||
Config: waiterCfg,
|
||||
}
|
||||
return w.Wait()
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilTasksRunning uses the Amazon ECS API operation
|
||||
// DescribeTasks to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *ECS) WaitUntilTasksRunning(input *DescribeTasksInput) error {
|
||||
waiterCfg := waiter.Config{
|
||||
Operation: "DescribeTasks",
|
||||
Delay: 6,
|
||||
return c.WaitUntilTasksRunningWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilTasksRunningWithContext is an extended version of WaitUntilTasksRunning.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// 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 *ECS) WaitUntilTasksRunningWithContext(ctx aws.Context, input *DescribeTasksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilTasksRunning",
|
||||
MaxAttempts: 100,
|
||||
Acceptors: []waiter.WaitAcceptor{
|
||||
Delay: request.ConstantWaiterDelay(6 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: "failure",
|
||||
Matcher: "pathAny",
|
||||
Argument: "tasks[].lastStatus",
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "tasks[].lastStatus",
|
||||
Expected: "STOPPED",
|
||||
},
|
||||
{
|
||||
State: "failure",
|
||||
Matcher: "pathAny",
|
||||
Argument: "failures[].reason",
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "failures[].reason",
|
||||
Expected: "MISSING",
|
||||
},
|
||||
{
|
||||
State: "success",
|
||||
Matcher: "pathAll",
|
||||
Argument: "tasks[].lastStatus",
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "tasks[].lastStatus",
|
||||
Expected: "RUNNING",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeTasksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeTasksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
w := waiter.Waiter{
|
||||
Client: c,
|
||||
Input: input,
|
||||
Config: waiterCfg,
|
||||
}
|
||||
return w.Wait()
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilTasksStopped uses the Amazon ECS API operation
|
||||
// DescribeTasks to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *ECS) WaitUntilTasksStopped(input *DescribeTasksInput) error {
|
||||
waiterCfg := waiter.Config{
|
||||
Operation: "DescribeTasks",
|
||||
Delay: 6,
|
||||
return c.WaitUntilTasksStoppedWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilTasksStoppedWithContext is an extended version of WaitUntilTasksStopped.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// 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 *ECS) WaitUntilTasksStoppedWithContext(ctx aws.Context, input *DescribeTasksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilTasksStopped",
|
||||
MaxAttempts: 100,
|
||||
Acceptors: []waiter.WaitAcceptor{
|
||||
Delay: request.ConstantWaiterDelay(6 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: "success",
|
||||
Matcher: "pathAll",
|
||||
Argument: "tasks[].lastStatus",
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "tasks[].lastStatus",
|
||||
Expected: "STOPPED",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeTasksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeTasksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
w := waiter.Waiter{
|
||||
Client: c,
|
||||
Input: input,
|
||||
Config: waiterCfg,
|
||||
}
|
||||
return w.Wait()
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue