1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
8 "github.com/aws/aws-sdk-go/aws"
9 "github.com/aws/aws-sdk-go/aws/request"
12 // WaitUntilBucketExists uses the Amazon S3 API operation
13 // HeadBucket to wait for a condition to be met before returning.
14 // If the condition is not meet within the max attempt window an error will
16 func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
17 return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input)
20 // WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists.
21 // With the support for passing in a context and options to configure the
22 // Waiter and the underlying request options.
24 // The context must be non-nil and will be used for request cancellation. If
25 // the context is nil a panic will occur. In the future the SDK may create
26 // sub-contexts for http.Requests. See https://golang.org/pkg/context/
27 // for more information on using Contexts.
28 func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
30 Name: "WaitUntilBucketExists",
32 Delay: request.ConstantWaiterDelay(5 * time.Second),
33 Acceptors: []request.WaiterAcceptor{
35 State: request.SuccessWaiterState,
36 Matcher: request.StatusWaiterMatch,
40 State: request.SuccessWaiterState,
41 Matcher: request.StatusWaiterMatch,
45 State: request.SuccessWaiterState,
46 Matcher: request.StatusWaiterMatch,
50 State: request.RetryWaiterState,
51 Matcher: request.StatusWaiterMatch,
55 Logger: c.Config.Logger,
56 NewRequest: func(opts []request.Option) (*request.Request, error) {
57 var inCpy *HeadBucketInput
62 req, _ := c.HeadBucketRequest(inCpy)
64 req.ApplyOptions(opts...)
68 w.ApplyOptions(opts...)
70 return w.WaitWithContext(ctx)
73 // WaitUntilBucketNotExists uses the Amazon S3 API operation
74 // HeadBucket to wait for a condition to be met before returning.
75 // If the condition is not meet within the max attempt window an error will
77 func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error {
78 return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input)
81 // WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists.
82 // With the support for passing in a context and options to configure the
83 // Waiter and the underlying request options.
85 // The context must be non-nil and will be used for request cancellation. If
86 // the context is nil a panic will occur. In the future the SDK may create
87 // sub-contexts for http.Requests. See https://golang.org/pkg/context/
88 // for more information on using Contexts.
89 func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
91 Name: "WaitUntilBucketNotExists",
93 Delay: request.ConstantWaiterDelay(5 * time.Second),
94 Acceptors: []request.WaiterAcceptor{
96 State: request.SuccessWaiterState,
97 Matcher: request.StatusWaiterMatch,
101 Logger: c.Config.Logger,
102 NewRequest: func(opts []request.Option) (*request.Request, error) {
103 var inCpy *HeadBucketInput
108 req, _ := c.HeadBucketRequest(inCpy)
110 req.ApplyOptions(opts...)
114 w.ApplyOptions(opts...)
116 return w.WaitWithContext(ctx)
119 // WaitUntilObjectExists uses the Amazon S3 API operation
120 // HeadObject to wait for a condition to be met before returning.
121 // If the condition is not meet within the max attempt window an error will
123 func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error {
124 return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input)
127 // WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists.
128 // With the support for passing in a context and options to configure the
129 // Waiter and the underlying request options.
131 // The context must be non-nil and will be used for request cancellation. If
132 // the context is nil a panic will occur. In the future the SDK may create
133 // sub-contexts for http.Requests. See https://golang.org/pkg/context/
134 // for more information on using Contexts.
135 func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
137 Name: "WaitUntilObjectExists",
139 Delay: request.ConstantWaiterDelay(5 * time.Second),
140 Acceptors: []request.WaiterAcceptor{
142 State: request.SuccessWaiterState,
143 Matcher: request.StatusWaiterMatch,
147 State: request.RetryWaiterState,
148 Matcher: request.StatusWaiterMatch,
152 Logger: c.Config.Logger,
153 NewRequest: func(opts []request.Option) (*request.Request, error) {
154 var inCpy *HeadObjectInput
159 req, _ := c.HeadObjectRequest(inCpy)
161 req.ApplyOptions(opts...)
165 w.ApplyOptions(opts...)
167 return w.WaitWithContext(ctx)
170 // WaitUntilObjectNotExists uses the Amazon S3 API operation
171 // HeadObject to wait for a condition to be met before returning.
172 // If the condition is not meet within the max attempt window an error will
174 func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error {
175 return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input)
178 // WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists.
179 // With the support for passing in a context and options to configure the
180 // Waiter and the underlying request options.
182 // The context must be non-nil and will be used for request cancellation. If
183 // the context is nil a panic will occur. In the future the SDK may create
184 // sub-contexts for http.Requests. See https://golang.org/pkg/context/
185 // for more information on using Contexts.
186 func (c *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
188 Name: "WaitUntilObjectNotExists",
190 Delay: request.ConstantWaiterDelay(5 * time.Second),
191 Acceptors: []request.WaiterAcceptor{
193 State: request.SuccessWaiterState,
194 Matcher: request.StatusWaiterMatch,
198 Logger: c.Config.Logger,
199 NewRequest: func(opts []request.Option) (*request.Request, error) {
200 var inCpy *HeadObjectInput
205 req, _ := c.HeadObjectRequest(inCpy)
207 req.ApplyOptions(opts...)
211 w.ApplyOptions(opts...)
213 return w.WaitWithContext(ctx)