1
0
Fork 0
mirror of https://github.com/Luzifer/share.git synced 2024-12-21 02:51:17 +00:00
share/vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go
Knut Ahlers 8f80d158ca
Move CLI util
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-12-02 19:12:46 +01:00

614 lines
21 KiB
Go

// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sagemaker
import (
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilEndpoint_Created uses the SageMaker API operation
// DescribeEndpoint to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilEndpoint_Created(input *DescribeEndpointInput) error {
return c.WaitUntilEndpoint_CreatedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilEndpoint_CreatedWithContext is an extended version of WaitUntilEndpoint_Created.
// 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 *SageMaker) WaitUntilEndpoint_CreatedWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilEndpoint_Created",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointStatus",
Expected: "InService",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointStatus",
Expected: "Creating",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointStatus",
Expected: "Failed",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
{
State: request.FailureWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationException",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeEndpointInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeEndpointRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilEndpoint_Deleted uses the SageMaker API operation
// DescribeEndpoint to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilEndpoint_Deleted(input *DescribeEndpointInput) error {
return c.WaitUntilEndpoint_DeletedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilEndpoint_DeletedWithContext is an extended version of WaitUntilEndpoint_Deleted.
// 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 *SageMaker) WaitUntilEndpoint_DeletedWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilEndpoint_Deleted",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationException",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointStatus",
Expected: "Deleting",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointStatus",
Expected: "Failed",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeEndpointInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeEndpointRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilEndpoint_Updated uses the SageMaker API operation
// DescribeEndpoint to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilEndpoint_Updated(input *DescribeEndpointInput) error {
return c.WaitUntilEndpoint_UpdatedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilEndpoint_UpdatedWithContext is an extended version of WaitUntilEndpoint_Updated.
// 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 *SageMaker) WaitUntilEndpoint_UpdatedWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilEndpoint_Updated",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointName",
Expected: "200",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointStatus",
Expected: "Updating",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointStatus",
Expected: "RollingBack",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "EndpointStatus",
Expected: "Failed",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationException",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeEndpointInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeEndpointRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilNotebookInstance_Deleted uses the SageMaker API operation
// DescribeNotebookInstance to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilNotebookInstance_Deleted(input *DescribeNotebookInstanceInput) error {
return c.WaitUntilNotebookInstance_DeletedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilNotebookInstance_DeletedWithContext is an extended version of WaitUntilNotebookInstance_Deleted.
// 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 *SageMaker) WaitUntilNotebookInstance_DeletedWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilNotebookInstance_Deleted",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationException",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "Deleting",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "Failed",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeNotebookInstanceInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeNotebookInstanceRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilNotebookInstance_Running uses the SageMaker API operation
// DescribeNotebookInstance to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilNotebookInstance_Running(input *DescribeNotebookInstanceInput) error {
return c.WaitUntilNotebookInstance_RunningWithContext(aws.BackgroundContext(), input)
}
// WaitUntilNotebookInstance_RunningWithContext is an extended version of WaitUntilNotebookInstance_Running.
// 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 *SageMaker) WaitUntilNotebookInstance_RunningWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilNotebookInstance_Running",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "InService",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "Failed",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "Stopped",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "Stopping",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeNotebookInstanceInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeNotebookInstanceRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilNotebookInstance_Stopped uses the SageMaker API operation
// DescribeNotebookInstance to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilNotebookInstance_Stopped(input *DescribeNotebookInstanceInput) error {
return c.WaitUntilNotebookInstance_StoppedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilNotebookInstance_StoppedWithContext is an extended version of WaitUntilNotebookInstance_Stopped.
// 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 *SageMaker) WaitUntilNotebookInstance_StoppedWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilNotebookInstance_Stopped",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "Stopped",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "Stopping",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus",
Expected: "Failed",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeNotebookInstanceInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeNotebookInstanceRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilTrainingJob_Created uses the SageMaker API operation
// DescribeTrainingJob to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilTrainingJob_Created(input *DescribeTrainingJobInput) error {
return c.WaitUntilTrainingJob_CreatedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilTrainingJob_CreatedWithContext is an extended version of WaitUntilTrainingJob_Created.
// 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 *SageMaker) WaitUntilTrainingJob_CreatedWithContext(ctx aws.Context, input *DescribeTrainingJobInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilTrainingJob_Created",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Created",
},
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Completed",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "InProgress",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Failed",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Stopping",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Stopped",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Deleting",
},
{
State: request.FailureWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationException",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeTrainingJobInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeTrainingJobRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilTrainingJob_Deleted uses the SageMaker API operation
// DescribeTrainingJob to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilTrainingJob_Deleted(input *DescribeTrainingJobInput) error {
return c.WaitUntilTrainingJob_DeletedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilTrainingJob_DeletedWithContext is an extended version of WaitUntilTrainingJob_Deleted.
// 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 *SageMaker) WaitUntilTrainingJob_DeletedWithContext(ctx aws.Context, input *DescribeTrainingJobInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilTrainingJob_Deleted",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationException",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Deleting",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeTrainingJobInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeTrainingJobRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilTrainingJob_Stopped uses the SageMaker API operation
// DescribeTrainingJob to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *SageMaker) WaitUntilTrainingJob_Stopped(input *DescribeTrainingJobInput) error {
return c.WaitUntilTrainingJob_StoppedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilTrainingJob_StoppedWithContext is an extended version of WaitUntilTrainingJob_Stopped.
// 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 *SageMaker) WaitUntilTrainingJob_StoppedWithContext(ctx aws.Context, input *DescribeTrainingJobInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilTrainingJob_Stopped",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(120 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Completed",
},
{
State: request.RetryWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Stopping",
},
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Stopped",
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ThrottlingException",
},
{
State: request.FailureWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationException",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Failed",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus",
Expected: "Deleting",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeTrainingJobInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeTrainingJobRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}