Update dependencies
This commit is contained in:
124
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
generated
vendored
Normal file
124
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
# v1.10.4 (2023-12-07)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.10.3 (2023-11-30)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.10.2 (2023-11-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.10.1 (2023-11-15)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.10.0 (2023-10-31)
|
||||
|
||||
* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
|
||||
|
||||
# v1.9.15 (2023-10-06)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.14 (2023-08-18)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.13 (2023-08-07)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.12 (2023-07-31)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.11 (2022-12-02)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.10 (2022-10-24)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.9 (2022-09-14)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.8 (2022-09-02)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.7 (2022-08-31)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.6 (2022-08-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.5 (2022-08-11)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.4 (2022-08-09)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.3 (2022-06-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.2 (2022-06-07)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.1 (2022-03-24)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.9.0 (2022-03-08)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
||||
# v1.8.0 (2022-02-24)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
||||
# v1.7.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
||||
# v1.6.0 (2022-01-07)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
||||
# v1.5.0 (2021-11-06)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
||||
# v1.4.0 (2021-10-21)
|
||||
|
||||
* **Feature**: Updated to latest version
|
||||
|
||||
# v1.3.0 (2021-08-27)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
||||
# v1.2.2 (2021-08-04)
|
||||
|
||||
* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
|
||||
|
||||
# v1.2.1 (2021-07-15)
|
||||
|
||||
* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
||||
# v1.2.0 (2021-06-25)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
|
||||
# v1.1.0 (2021-05-14)
|
||||
|
||||
* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
|
||||
|
||||
202
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt
generated
vendored
Normal file
202
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
176
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go
generated
vendored
Normal file
176
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go
generated
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
package acceptencoding
|
||||
|
||||
import (
|
||||
"compress/gzip"
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/aws/smithy-go"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
const acceptEncodingHeaderKey = "Accept-Encoding"
|
||||
const contentEncodingHeaderKey = "Content-Encoding"
|
||||
|
||||
// AddAcceptEncodingGzipOptions provides the options for the
|
||||
// AddAcceptEncodingGzip middleware setup.
|
||||
type AddAcceptEncodingGzipOptions struct {
|
||||
Enable bool
|
||||
}
|
||||
|
||||
// AddAcceptEncodingGzip explicitly adds handling for accept-encoding GZIP
|
||||
// middleware to the operation stack. This allows checksums to be correctly
|
||||
// computed without disabling GZIP support.
|
||||
func AddAcceptEncodingGzip(stack *middleware.Stack, options AddAcceptEncodingGzipOptions) error {
|
||||
if options.Enable {
|
||||
if err := stack.Finalize.Add(&EnableGzip{}, middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := stack.Deserialize.Insert(&DecompressGzip{}, "OperationDeserializer", middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
return stack.Finalize.Add(&DisableGzip{}, middleware.Before)
|
||||
}
|
||||
|
||||
// DisableGzip provides the middleware that will
|
||||
// disable the underlying http client automatically enabling for gzip
|
||||
// decompress content-encoding support.
|
||||
type DisableGzip struct{}
|
||||
|
||||
// ID returns the id for the middleware.
|
||||
func (*DisableGzip) ID() string {
|
||||
return "DisableAcceptEncodingGzip"
|
||||
}
|
||||
|
||||
// HandleFinalize implements the FinalizeMiddleware interface.
|
||||
func (*DisableGzip) HandleFinalize(
|
||||
ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler,
|
||||
) (
|
||||
output middleware.FinalizeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
req, ok := input.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return output, metadata, &smithy.SerializationError{
|
||||
Err: fmt.Errorf("unknown request type %T", input.Request),
|
||||
}
|
||||
}
|
||||
|
||||
// Explicitly enable gzip support, this will prevent the http client from
|
||||
// auto extracting the zipped content.
|
||||
req.Header.Set(acceptEncodingHeaderKey, "identity")
|
||||
|
||||
return next.HandleFinalize(ctx, input)
|
||||
}
|
||||
|
||||
// EnableGzip provides a middleware to enable support for
|
||||
// gzip responses, with manual decompression. This prevents the underlying HTTP
|
||||
// client from performing the gzip decompression automatically.
|
||||
type EnableGzip struct{}
|
||||
|
||||
// ID returns the id for the middleware.
|
||||
func (*EnableGzip) ID() string {
|
||||
return "AcceptEncodingGzip"
|
||||
}
|
||||
|
||||
// HandleFinalize implements the FinalizeMiddleware interface.
|
||||
func (*EnableGzip) HandleFinalize(
|
||||
ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler,
|
||||
) (
|
||||
output middleware.FinalizeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
req, ok := input.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return output, metadata, &smithy.SerializationError{
|
||||
Err: fmt.Errorf("unknown request type %T", input.Request),
|
||||
}
|
||||
}
|
||||
|
||||
// Explicitly enable gzip support, this will prevent the http client from
|
||||
// auto extracting the zipped content.
|
||||
req.Header.Set(acceptEncodingHeaderKey, "gzip")
|
||||
|
||||
return next.HandleFinalize(ctx, input)
|
||||
}
|
||||
|
||||
// DecompressGzip provides the middleware for decompressing a gzip
|
||||
// response from the service.
|
||||
type DecompressGzip struct{}
|
||||
|
||||
// ID returns the id for the middleware.
|
||||
func (*DecompressGzip) ID() string {
|
||||
return "DecompressGzip"
|
||||
}
|
||||
|
||||
// HandleDeserialize implements the DeserializeMiddlware interface.
|
||||
func (*DecompressGzip) HandleDeserialize(
|
||||
ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler,
|
||||
) (
|
||||
output middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
output, metadata, err = next.HandleDeserialize(ctx, input)
|
||||
if err != nil {
|
||||
return output, metadata, err
|
||||
}
|
||||
|
||||
resp, ok := output.RawResponse.(*smithyhttp.Response)
|
||||
if !ok {
|
||||
return output, metadata, &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("unknown response type %T", output.RawResponse),
|
||||
}
|
||||
}
|
||||
if v := resp.Header.Get(contentEncodingHeaderKey); v != "gzip" {
|
||||
return output, metadata, err
|
||||
}
|
||||
|
||||
// Clear content length since it will no longer be valid once the response
|
||||
// body is decompressed.
|
||||
resp.Header.Del("Content-Length")
|
||||
resp.ContentLength = -1
|
||||
|
||||
resp.Body = wrapGzipReader(resp.Body)
|
||||
|
||||
return output, metadata, err
|
||||
}
|
||||
|
||||
type gzipReader struct {
|
||||
reader io.ReadCloser
|
||||
gzip *gzip.Reader
|
||||
}
|
||||
|
||||
func wrapGzipReader(reader io.ReadCloser) *gzipReader {
|
||||
return &gzipReader{
|
||||
reader: reader,
|
||||
}
|
||||
}
|
||||
|
||||
// Read wraps the gzip reader around the underlying io.Reader to extract the
|
||||
// response bytes on the fly.
|
||||
func (g *gzipReader) Read(b []byte) (n int, err error) {
|
||||
if g.gzip == nil {
|
||||
g.gzip, err = gzip.NewReader(g.reader)
|
||||
if err != nil {
|
||||
g.gzip = nil // ensure uninitialized gzip value isn't used in close.
|
||||
return 0, fmt.Errorf("failed to decompress gzip response, %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
return g.gzip.Read(b)
|
||||
}
|
||||
|
||||
func (g *gzipReader) Close() error {
|
||||
if g.gzip == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := g.gzip.Close(); err != nil {
|
||||
g.reader.Close()
|
||||
return fmt.Errorf("failed to decompress gzip response, %w", err)
|
||||
}
|
||||
|
||||
return g.reader.Close()
|
||||
}
|
||||
22
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go
generated
vendored
Normal file
22
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Package acceptencoding provides customizations associated with Accept Encoding Header.
|
||||
|
||||
# Accept encoding gzip
|
||||
|
||||
The Go HTTP client automatically supports accept-encoding and content-encoding
|
||||
gzip by default. This default behavior is not desired by the SDK, and prevents
|
||||
validating the response body's checksum. To prevent this the SDK must manually
|
||||
control usage of content-encoding gzip.
|
||||
|
||||
To control content-encoding, the SDK must always set the `Accept-Encoding`
|
||||
header to a value. This prevents the HTTP client from using gzip automatically.
|
||||
When gzip is enabled on the API client, the SDK's customization will control
|
||||
decompressing the gzip data in order to not break the checksum validation. When
|
||||
gzip is disabled, the API client will disable gzip, preventing the HTTP
|
||||
client's default behavior.
|
||||
|
||||
An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using
|
||||
the below middleware. The option if present can be used to enable auto decompressing
|
||||
gzip by the SDK.
|
||||
*/
|
||||
package acceptencoding
|
||||
6
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
generated
vendored
Normal file
6
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
|
||||
|
||||
package acceptencoding
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.10.4"
|
||||
272
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
Normal file
272
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,272 @@
|
||||
# v1.10.10 (2024-01-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.9 (2023-12-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.8 (2023-12-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.3 (2023-11-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.2 (2023-11-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.1 (2023-11-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.0 (2023-10-31)
|
||||
|
||||
* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.37 (2023-10-12)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.36 (2023-10-06)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.35 (2023-08-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.34 (2023-08-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.33 (2023-08-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.32 (2023-08-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.31 (2023-07-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.30 (2023-07-28)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.29 (2023-07-13)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.28 (2023-06-13)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.27 (2023-04-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.26 (2023-04-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.25 (2023-03-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.24 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.23 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.22 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.21 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.20 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.19 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.18 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.17 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.16 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.15 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.14 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.13 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.12 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.11 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.10 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.9 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.8 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.7 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.6 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.5 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.4 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.3 (2022-03-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.2 (2022-03-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.1 (2022-03-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.0 (2022-03-08)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.8.0 (2022-02-24)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.7.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.6.0 (2022-01-07)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.5.2 (2021-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.5.1 (2021-11-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.5.0 (2021-11-06)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.4.0 (2021-10-21)
|
||||
|
||||
* **Feature**: Updated to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.2 (2021-10-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.1 (2021-09-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.0 (2021-08-27)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.3 (2021-08-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.2 (2021-08-04)
|
||||
|
||||
* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.1 (2021-07-15)
|
||||
|
||||
* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.0 (2021-06-25)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.1 (2021-05-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.0 (2021-05-14)
|
||||
|
||||
* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
202
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt
generated
vendored
Normal file
202
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
48
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
generated
vendored
Normal file
48
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
package presignedurl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
// WithIsPresigning adds the isPresigning sentinel value to a context to signal
|
||||
// that the middleware stack is using the presign flow.
|
||||
//
|
||||
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
|
||||
// to clear all stack values.
|
||||
func WithIsPresigning(ctx context.Context) context.Context {
|
||||
return middleware.WithStackValue(ctx, isPresigningKey{}, true)
|
||||
}
|
||||
|
||||
// GetIsPresigning returns if the context contains the isPresigning sentinel
|
||||
// value for presigning flows.
|
||||
//
|
||||
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
|
||||
// to clear all stack values.
|
||||
func GetIsPresigning(ctx context.Context) bool {
|
||||
v, _ := middleware.GetStackValue(ctx, isPresigningKey{}).(bool)
|
||||
return v
|
||||
}
|
||||
|
||||
type isPresigningKey struct{}
|
||||
|
||||
// AddAsIsPresigingMiddleware adds a middleware to the head of the stack that
|
||||
// will update the stack's context to be flagged as being invoked for the
|
||||
// purpose of presigning.
|
||||
func AddAsIsPresigingMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(asIsPresigningMiddleware{}, middleware.Before)
|
||||
}
|
||||
|
||||
type asIsPresigningMiddleware struct{}
|
||||
|
||||
func (asIsPresigningMiddleware) ID() string { return "AsIsPresigningMiddleware" }
|
||||
|
||||
func (asIsPresigningMiddleware) HandleInitialize(
|
||||
ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
|
||||
) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
ctx = WithIsPresigning(ctx)
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
3
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go
generated
vendored
Normal file
3
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// Package presignedurl provides the customizations for API clients to fill in
|
||||
// presigned URLs into input parameters.
|
||||
package presignedurl
|
||||
6
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
generated
vendored
Normal file
6
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
|
||||
|
||||
package presignedurl
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.10.10"
|
||||
110
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go
generated
vendored
Normal file
110
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
package presignedurl
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
// URLPresigner provides the interface to presign the input parameters in to a
|
||||
// presigned URL.
|
||||
type URLPresigner interface {
|
||||
// PresignURL presigns a URL.
|
||||
PresignURL(ctx context.Context, srcRegion string, params interface{}) (*v4.PresignedHTTPRequest, error)
|
||||
}
|
||||
|
||||
// ParameterAccessor provides an collection of accessor to for retrieving and
|
||||
// setting the values needed to PresignedURL generation
|
||||
type ParameterAccessor struct {
|
||||
// GetPresignedURL accessor points to a function that retrieves a presigned url if present
|
||||
GetPresignedURL func(interface{}) (string, bool, error)
|
||||
|
||||
// GetSourceRegion accessor points to a function that retrieves source region for presigned url
|
||||
GetSourceRegion func(interface{}) (string, bool, error)
|
||||
|
||||
// CopyInput accessor points to a function that takes in an input, and returns a copy.
|
||||
CopyInput func(interface{}) (interface{}, error)
|
||||
|
||||
// SetDestinationRegion accessor points to a function that sets destination region on api input struct
|
||||
SetDestinationRegion func(interface{}, string) error
|
||||
|
||||
// SetPresignedURL accessor points to a function that sets presigned url on api input struct
|
||||
SetPresignedURL func(interface{}, string) error
|
||||
}
|
||||
|
||||
// Options provides the set of options needed by the presigned URL middleware.
|
||||
type Options struct {
|
||||
// Accessor are the parameter accessors used by this middleware
|
||||
Accessor ParameterAccessor
|
||||
|
||||
// Presigner is the URLPresigner used by the middleware
|
||||
Presigner URLPresigner
|
||||
}
|
||||
|
||||
// AddMiddleware adds the Presign URL middleware to the middleware stack.
|
||||
func AddMiddleware(stack *middleware.Stack, opts Options) error {
|
||||
return stack.Initialize.Add(&presign{options: opts}, middleware.Before)
|
||||
}
|
||||
|
||||
// RemoveMiddleware removes the Presign URL middleware from the stack.
|
||||
func RemoveMiddleware(stack *middleware.Stack) error {
|
||||
_, err := stack.Initialize.Remove((*presign)(nil).ID())
|
||||
return err
|
||||
}
|
||||
|
||||
type presign struct {
|
||||
options Options
|
||||
}
|
||||
|
||||
func (m *presign) ID() string { return "Presign" }
|
||||
|
||||
func (m *presign) HandleInitialize(
|
||||
ctx context.Context, input middleware.InitializeInput, next middleware.InitializeHandler,
|
||||
) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
// If PresignedURL is already set ignore middleware.
|
||||
if _, ok, err := m.options.Accessor.GetPresignedURL(input.Parameters); err != nil {
|
||||
return out, metadata, fmt.Errorf("presign middleware failed, %w", err)
|
||||
} else if ok {
|
||||
return next.HandleInitialize(ctx, input)
|
||||
}
|
||||
|
||||
// If have source region is not set ignore middleware.
|
||||
srcRegion, ok, err := m.options.Accessor.GetSourceRegion(input.Parameters)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("presign middleware failed, %w", err)
|
||||
} else if !ok || len(srcRegion) == 0 {
|
||||
return next.HandleInitialize(ctx, input)
|
||||
}
|
||||
|
||||
// Create a copy of the original input so the destination region value can
|
||||
// be added. This ensures that value does not leak into the original
|
||||
// request parameters.
|
||||
paramCpy, err := m.options.Accessor.CopyInput(input.Parameters)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("unable to create presigned URL, %w", err)
|
||||
}
|
||||
|
||||
// Destination region is the API client's configured region.
|
||||
dstRegion := awsmiddleware.GetRegion(ctx)
|
||||
if err = m.options.Accessor.SetDestinationRegion(paramCpy, dstRegion); err != nil {
|
||||
return out, metadata, fmt.Errorf("presign middleware failed, %w", err)
|
||||
}
|
||||
|
||||
presignedReq, err := m.options.Presigner.PresignURL(ctx, srcRegion, paramCpy)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("unable to create presigned URL, %w", err)
|
||||
}
|
||||
|
||||
// Update the original input with the presigned URL value.
|
||||
if err = m.options.Accessor.SetPresignedURL(input.Parameters, presignedReq.URL); err != nil {
|
||||
return out, metadata, fmt.Errorf("presign middleware failed, %w", err)
|
||||
}
|
||||
|
||||
return next.HandleInitialize(ctx, input)
|
||||
}
|
||||
454
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md
generated
vendored
Normal file
454
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,454 @@
|
||||
# v1.44.7 (2024-01-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.44.6 (2023-12-20)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.44.5 (2023-12-08)
|
||||
|
||||
* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
|
||||
|
||||
# v1.44.4 (2023-12-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.44.3 (2023-12-06)
|
||||
|
||||
* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
|
||||
|
||||
# v1.44.2 (2023-12-01)
|
||||
|
||||
* **Bug Fix**: Correct wrapping of errors in authentication workflow.
|
||||
* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.44.1 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.44.0 (2023-11-29)
|
||||
|
||||
* **Feature**: Expose Options() accessor on service clients.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.43.3 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.43.2 (2023-11-28)
|
||||
|
||||
* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
|
||||
|
||||
# v1.43.1 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.43.0 (2023-11-16)
|
||||
|
||||
* **Feature**: This release introduces the ability to filter automation execution steps which have parent steps. In addition, runbook variable information is returned by GetAutomationExecution and parent step information is returned by the DescribeAutomationStepExecutions API.
|
||||
|
||||
# v1.42.2 (2023-11-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.42.1 (2023-11-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.42.0 (2023-11-01)
|
||||
|
||||
* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.41.0 (2023-10-31)
|
||||
|
||||
* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.40.0 (2023-10-24)
|
||||
|
||||
* **Feature**: **BREAKFIX**: Correct nullability and default value representation of various input fields across a large number of services. Calling code that references one or more of the affected fields will need to update usage accordingly. See [2162](https://github.com/aws/aws-sdk-go-v2/issues/2162).
|
||||
|
||||
# v1.39.0 (2023-10-20)
|
||||
|
||||
* **Feature**: This release introduces a new API: DeleteOpsItem. This allows deletion of an OpsItem.
|
||||
|
||||
# v1.38.2 (2023-10-12)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.1 (2023-10-06)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.0 (2023-09-25)
|
||||
|
||||
* **Feature**: This release updates the enum values for ResourceType in SSM DescribeInstanceInformation input and ConnectionStatus in GetConnectionStatus output.
|
||||
|
||||
# v1.37.5 (2023-08-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.37.4 (2023-08-18)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.37.3 (2023-08-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.37.2 (2023-08-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.37.1 (2023-08-01)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.37.0 (2023-07-31)
|
||||
|
||||
* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.36.9 (2023-07-28)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.36.8 (2023-07-13)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.36.7 (2023-06-27)
|
||||
|
||||
* **Documentation**: Systems Manager doc-only update for June 2023.
|
||||
|
||||
# v1.36.6 (2023-06-15)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.36.5 (2023-06-13)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.36.4 (2023-05-04)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.36.3 (2023-04-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.36.2 (2023-04-10)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.36.1 (2023-04-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.36.0 (2023-03-22)
|
||||
|
||||
* **Feature**: This Patch Manager release supports creating, updating, and deleting Patch Baselines for AmazonLinux2023, AlmaLinux.
|
||||
|
||||
# v1.35.7 (2023-03-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.35.6 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.35.5 (2023-02-22)
|
||||
|
||||
* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
|
||||
* **Documentation**: Document only update for Feb 2023
|
||||
|
||||
# v1.35.4 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.35.3 (2023-02-15)
|
||||
|
||||
* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
|
||||
* **Bug Fix**: Correct error type parsing for restJson services.
|
||||
|
||||
# v1.35.2 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.35.1 (2023-01-23)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.35.0 (2023-01-05)
|
||||
|
||||
* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
|
||||
|
||||
# v1.34.0 (2023-01-04)
|
||||
|
||||
* **Feature**: Adding support for QuickSetup Document Type in Systems Manager
|
||||
|
||||
# v1.33.4 (2022-12-21)
|
||||
|
||||
* **Documentation**: Doc-only updates for December 2022.
|
||||
|
||||
# v1.33.3 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.33.2 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.33.1 (2022-11-22)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.33.0 (2022-11-16)
|
||||
|
||||
* **Feature**: This release adds support for cross account access in CreateOpsItem, UpdateOpsItem and GetOpsItem. It introduces new APIs to setup resource policies for SSM resources: PutResourcePolicy, GetResourcePolicies and DeleteResourcePolicy.
|
||||
|
||||
# v1.32.1 (2022-11-10)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.32.0 (2022-11-07)
|
||||
|
||||
* **Feature**: This release includes support for applying a CloudWatch alarm to multi account multi region Systems Manager Automation
|
||||
|
||||
# v1.31.3 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.31.2 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.31.1 (2022-10-20)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.31.0 (2022-10-13)
|
||||
|
||||
* **Feature**: Support of AmazonLinux2022 by Patch Manager
|
||||
|
||||
# v1.30.0 (2022-09-26)
|
||||
|
||||
* **Feature**: This release includes support for applying a CloudWatch alarm to Systems Manager capabilities like Automation, Run Command, State Manager, and Maintenance Windows.
|
||||
|
||||
# v1.29.0 (2022-09-23)
|
||||
|
||||
* **Feature**: This release adds new SSM document types ConformancePackTemplate and CloudFormation
|
||||
|
||||
# v1.28.1 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.28.0 (2022-09-14)
|
||||
|
||||
* **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
|
||||
* **Feature**: This release adds support for Systems Manager State Manager Association tagging.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.13 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.12 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.11 (2022-08-30)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.27.10 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.9 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.8 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.7 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.6 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.5 (2022-07-27)
|
||||
|
||||
* **Documentation**: Adding doc updates for OpsCenter support in Service Setting actions.
|
||||
|
||||
# v1.27.4 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.3 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.2 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.1 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.27.0 (2022-05-04)
|
||||
|
||||
* **Feature**: This release adds the TargetMaps parameter in SSM State Manager API.
|
||||
|
||||
# v1.26.0 (2022-04-29)
|
||||
|
||||
* **Feature**: Update the StartChangeRequestExecution, adding TargetMaps to the Runbook parameter
|
||||
|
||||
# v1.25.1 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.25.0 (2022-04-19)
|
||||
|
||||
* **Feature**: Added offset support for specifying the number of days to wait after the date and time specified by a CRON expression when creating SSM association.
|
||||
|
||||
# v1.24.1 (2022-03-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.24.0 (2022-03-25)
|
||||
|
||||
* **Feature**: This Patch Manager release supports creating, updating, and deleting Patch Baselines for Rocky Linux OS.
|
||||
|
||||
# v1.23.1 (2022-03-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.23.0 (2022-03-23)
|
||||
|
||||
* **Feature**: Update AddTagsToResource, ListTagsForResource, and RemoveTagsFromResource APIs to reflect the support for tagging Automation resources. Includes other minor documentation updates.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.22.0 (2022-03-08)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.21.0 (2022-02-24)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.20.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated API models
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.19.0 (2022-01-07)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.0 (2021-12-21)
|
||||
|
||||
* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
|
||||
* **Feature**: Updated to latest service endpoints
|
||||
|
||||
# v1.17.1 (2021-12-02)
|
||||
|
||||
* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.0 (2021-11-30)
|
||||
|
||||
* **Feature**: API client updated
|
||||
|
||||
# v1.16.0 (2021-11-19)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.0 (2021-11-12)
|
||||
|
||||
* **Feature**: Service clients now support custom endpoints that have an initial URI path defined.
|
||||
* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature.
|
||||
|
||||
# v1.14.0 (2021-11-06)
|
||||
|
||||
* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.0 (2021-10-21)
|
||||
|
||||
* **Feature**: Updated to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.0 (2021-10-11)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.0 (2021-09-24)
|
||||
|
||||
* **Feature**: API client updated
|
||||
|
||||
# v1.10.1 (2021-09-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.0 (2021-08-27)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.1 (2021-08-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.0 (2021-08-12)
|
||||
|
||||
* **Feature**: API client updated
|
||||
|
||||
# v1.8.1 (2021-08-04)
|
||||
|
||||
* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.8.0 (2021-07-15)
|
||||
|
||||
* **Feature**: Updated service model to latest version.
|
||||
* **Documentation**: Updated service model to latest revision.
|
||||
* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.7.0 (2021-06-25)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.6.2 (2021-06-04)
|
||||
|
||||
* **Documentation**: Updated service client to latest API model.
|
||||
|
||||
# v1.6.1 (2021-05-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.6.0 (2021-05-14)
|
||||
|
||||
* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
|
||||
* **Feature**: Updated to latest service API model.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
202
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/LICENSE.txt
generated
vendored
Normal file
202
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
492
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go
generated
vendored
Normal file
492
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go
generated
vendored
Normal file
@@ -0,0 +1,492 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
cryptorand "crypto/rand"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/defaults"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/retry"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
|
||||
internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
|
||||
internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
|
||||
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
|
||||
smithy "github.com/aws/smithy-go"
|
||||
smithydocument "github.com/aws/smithy-go/document"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyrand "github.com/aws/smithy-go/rand"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"net"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
const ServiceID = "SSM"
|
||||
const ServiceAPIVersion = "2014-11-06"
|
||||
|
||||
// Client provides the API client to make operations call for Amazon Simple
|
||||
// Systems Manager (SSM).
|
||||
type Client struct {
|
||||
options Options
|
||||
}
|
||||
|
||||
// New returns an initialized Client based on the functional options. Provide
|
||||
// additional functional options to further configure the behavior of the client,
|
||||
// such as changing the client's endpoint or adding custom middleware behavior.
|
||||
func New(options Options, optFns ...func(*Options)) *Client {
|
||||
options = options.Copy()
|
||||
|
||||
resolveDefaultLogger(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveHTTPClient(&options)
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
|
||||
resolveIdempotencyTokenProvider(&options)
|
||||
|
||||
resolveEndpointResolverV2(&options)
|
||||
|
||||
resolveAuthSchemeResolver(&options)
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
finalizeRetryMaxAttempts(&options)
|
||||
|
||||
ignoreAnonymousAuth(&options)
|
||||
|
||||
wrapWithAnonymousAuth(&options)
|
||||
|
||||
resolveAuthSchemes(&options)
|
||||
|
||||
client := &Client{
|
||||
options: options,
|
||||
}
|
||||
|
||||
return client
|
||||
}
|
||||
|
||||
// Options returns a copy of the client configuration.
|
||||
//
|
||||
// Callers SHOULD NOT perform mutations on any inner structures within client
|
||||
// config. Config overrides should instead be made on a per-operation basis through
|
||||
// functional options.
|
||||
func (c *Client) Options() Options {
|
||||
return c.options.Copy()
|
||||
}
|
||||
|
||||
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
|
||||
ctx = middleware.ClearStackValues(ctx)
|
||||
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
|
||||
options := c.options.Copy()
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
finalizeOperationRetryMaxAttempts(&options, *c)
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
for _, fn := range stackFns {
|
||||
if err := fn(stack, options); err != nil {
|
||||
return nil, metadata, err
|
||||
}
|
||||
}
|
||||
|
||||
for _, fn := range options.APIOptions {
|
||||
if err := fn(stack); err != nil {
|
||||
return nil, metadata, err
|
||||
}
|
||||
}
|
||||
|
||||
handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
|
||||
result, metadata, err = handler.Handle(ctx, params)
|
||||
if err != nil {
|
||||
err = &smithy.OperationError{
|
||||
ServiceID: ServiceID,
|
||||
OperationName: opID,
|
||||
Err: err,
|
||||
}
|
||||
}
|
||||
return result, metadata, err
|
||||
}
|
||||
|
||||
type operationInputKey struct{}
|
||||
|
||||
func setOperationInput(ctx context.Context, input interface{}) context.Context {
|
||||
return middleware.WithStackValue(ctx, operationInputKey{}, input)
|
||||
}
|
||||
|
||||
func getOperationInput(ctx context.Context) interface{} {
|
||||
return middleware.GetStackValue(ctx, operationInputKey{})
|
||||
}
|
||||
|
||||
type setOperationInputMiddleware struct {
|
||||
}
|
||||
|
||||
func (*setOperationInputMiddleware) ID() string {
|
||||
return "setOperationInput"
|
||||
}
|
||||
|
||||
func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
ctx = setOperationInput(ctx, in.Parameters)
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
|
||||
func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
|
||||
if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
|
||||
return fmt.Errorf("add ResolveAuthScheme: %w", err)
|
||||
}
|
||||
if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
|
||||
return fmt.Errorf("add GetIdentity: %v", err)
|
||||
}
|
||||
if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
|
||||
return fmt.Errorf("add ResolveEndpointV2: %v", err)
|
||||
}
|
||||
if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
|
||||
return fmt.Errorf("add Signing: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func resolveAuthSchemeResolver(options *Options) {
|
||||
if options.AuthSchemeResolver == nil {
|
||||
options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
|
||||
}
|
||||
}
|
||||
|
||||
func resolveAuthSchemes(options *Options) {
|
||||
if options.AuthSchemes == nil {
|
||||
options.AuthSchemes = []smithyhttp.AuthScheme{
|
||||
internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
|
||||
Signer: options.HTTPSignerV4,
|
||||
Logger: options.Logger,
|
||||
LogSigning: options.ClientLogMode.IsSigning(),
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type noSmithyDocumentSerde = smithydocument.NoSerde
|
||||
|
||||
type legacyEndpointContextSetter struct {
|
||||
LegacyResolver EndpointResolver
|
||||
}
|
||||
|
||||
func (*legacyEndpointContextSetter) ID() string {
|
||||
return "legacyEndpointContextSetter"
|
||||
}
|
||||
|
||||
func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if m.LegacyResolver != nil {
|
||||
ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
|
||||
}
|
||||
|
||||
return next.HandleInitialize(ctx, in)
|
||||
|
||||
}
|
||||
func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
|
||||
return stack.Initialize.Add(&legacyEndpointContextSetter{
|
||||
LegacyResolver: o.EndpointResolver,
|
||||
}, middleware.Before)
|
||||
}
|
||||
|
||||
func resolveDefaultLogger(o *Options) {
|
||||
if o.Logger != nil {
|
||||
return
|
||||
}
|
||||
o.Logger = logging.Nop{}
|
||||
}
|
||||
|
||||
func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
|
||||
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
// NewFromConfig returns a new client from the provided config.
|
||||
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
opts := Options{
|
||||
Region: cfg.Region,
|
||||
DefaultsMode: cfg.DefaultsMode,
|
||||
RuntimeEnvironment: cfg.RuntimeEnvironment,
|
||||
HTTPClient: cfg.HTTPClient,
|
||||
Credentials: cfg.Credentials,
|
||||
APIOptions: cfg.APIOptions,
|
||||
Logger: cfg.Logger,
|
||||
ClientLogMode: cfg.ClientLogMode,
|
||||
AppID: cfg.AppID,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
resolveAWSRetryMode(cfg, &opts)
|
||||
resolveAWSEndpointResolver(cfg, &opts)
|
||||
resolveUseDualStackEndpoint(cfg, &opts)
|
||||
resolveUseFIPSEndpoint(cfg, &opts)
|
||||
resolveBaseEndpoint(cfg, &opts)
|
||||
return New(opts, optFns...)
|
||||
}
|
||||
|
||||
func resolveHTTPClient(o *Options) {
|
||||
var buildable *awshttp.BuildableClient
|
||||
|
||||
if o.HTTPClient != nil {
|
||||
var ok bool
|
||||
buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
buildable = awshttp.NewBuildableClient()
|
||||
}
|
||||
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
|
||||
if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
|
||||
dialer.Timeout = dialerTimeout
|
||||
}
|
||||
})
|
||||
|
||||
buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
|
||||
if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
|
||||
transport.TLSHandshakeTimeout = tlsHandshakeTimeout
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
o.HTTPClient = buildable
|
||||
}
|
||||
|
||||
func resolveRetryer(o *Options) {
|
||||
if o.Retryer != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if len(o.RetryMode) == 0 {
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
o.RetryMode = modeConfig.RetryMode
|
||||
}
|
||||
}
|
||||
if len(o.RetryMode) == 0 {
|
||||
o.RetryMode = aws.RetryModeStandard
|
||||
}
|
||||
|
||||
var standardOptions []func(*retry.StandardOptions)
|
||||
if v := o.RetryMaxAttempts; v != 0 {
|
||||
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
|
||||
so.MaxAttempts = v
|
||||
})
|
||||
}
|
||||
|
||||
switch o.RetryMode {
|
||||
case aws.RetryModeAdaptive:
|
||||
var adaptiveOptions []func(*retry.AdaptiveModeOptions)
|
||||
if len(standardOptions) != 0 {
|
||||
adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
|
||||
ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
|
||||
})
|
||||
}
|
||||
o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
|
||||
|
||||
default:
|
||||
o.Retryer = retry.NewStandard(standardOptions...)
|
||||
}
|
||||
}
|
||||
|
||||
func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
||||
if cfg.Retryer == nil {
|
||||
return
|
||||
}
|
||||
o.Retryer = cfg.Retryer()
|
||||
}
|
||||
|
||||
func resolveAWSRetryMode(cfg aws.Config, o *Options) {
|
||||
if len(cfg.RetryMode) == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMode = cfg.RetryMode
|
||||
}
|
||||
func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
|
||||
if cfg.RetryMaxAttempts == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMaxAttempts = cfg.RetryMaxAttempts
|
||||
}
|
||||
|
||||
func finalizeRetryMaxAttempts(o *Options) {
|
||||
if o.RetryMaxAttempts == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
|
||||
}
|
||||
|
||||
func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
|
||||
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
|
||||
return
|
||||
}
|
||||
|
||||
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
|
||||
}
|
||||
|
||||
func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
|
||||
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
|
||||
return
|
||||
}
|
||||
o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
|
||||
}
|
||||
|
||||
func addClientUserAgent(stack *middleware.Stack, options Options) error {
|
||||
if err := awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssm", goModuleVersion)(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(options.AppID) > 0 {
|
||||
return awsmiddleware.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)(stack)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type HTTPSignerV4 interface {
|
||||
SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
|
||||
}
|
||||
|
||||
func resolveHTTPSignerV4(o *Options) {
|
||||
if o.HTTPSignerV4 != nil {
|
||||
return
|
||||
}
|
||||
o.HTTPSignerV4 = newDefaultV4Signer(*o)
|
||||
}
|
||||
|
||||
func newDefaultV4Signer(o Options) *v4.Signer {
|
||||
return v4.NewSigner(func(so *v4.SignerOptions) {
|
||||
so.Logger = o.Logger
|
||||
so.LogSigning = o.ClientLogMode.IsSigning()
|
||||
})
|
||||
}
|
||||
|
||||
func resolveIdempotencyTokenProvider(o *Options) {
|
||||
if o.IdempotencyTokenProvider != nil {
|
||||
return
|
||||
}
|
||||
o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader)
|
||||
}
|
||||
|
||||
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
|
||||
mo := retry.AddRetryMiddlewaresOptions{
|
||||
Retryer: o.Retryer,
|
||||
LogRetryAttempts: o.ClientLogMode.IsRetries(),
|
||||
}
|
||||
return retry.AddRetryMiddlewares(stack, mo)
|
||||
}
|
||||
|
||||
// resolves dual-stack endpoint configuration
|
||||
func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
|
||||
if len(cfg.ConfigSources) == 0 {
|
||||
return nil
|
||||
}
|
||||
value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if found {
|
||||
o.EndpointOptions.UseDualStackEndpoint = value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// resolves FIPS endpoint configuration
|
||||
func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
|
||||
if len(cfg.ConfigSources) == 0 {
|
||||
return nil
|
||||
}
|
||||
value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if found {
|
||||
o.EndpointOptions.UseFIPSEndpoint = value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IdempotencyTokenProvider interface for providing idempotency token
|
||||
type IdempotencyTokenProvider interface {
|
||||
GetIdempotencyToken() (string, error)
|
||||
}
|
||||
|
||||
func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
|
||||
return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
|
||||
}
|
||||
|
||||
func addResponseErrorMiddleware(stack *middleware.Stack) error {
|
||||
return awshttp.AddResponseErrorMiddleware(stack)
|
||||
}
|
||||
|
||||
func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
|
||||
return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
|
||||
LogRequest: o.ClientLogMode.IsRequest(),
|
||||
LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
|
||||
LogResponse: o.ClientLogMode.IsResponse(),
|
||||
LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
|
||||
}, middleware.After)
|
||||
}
|
||||
|
||||
type disableHTTPSMiddleware struct {
|
||||
DisableHTTPS bool
|
||||
}
|
||||
|
||||
func (*disableHTTPSMiddleware) ID() string {
|
||||
return "disableHTTPS"
|
||||
}
|
||||
|
||||
func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
|
||||
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
req, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
|
||||
}
|
||||
|
||||
if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
|
||||
req.URL.Scheme = "http"
|
||||
}
|
||||
|
||||
return next.HandleFinalize(ctx, in)
|
||||
}
|
||||
|
||||
func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
|
||||
return stack.Finalize.Insert(&disableHTTPSMiddleware{
|
||||
DisableHTTPS: o.EndpointOptions.DisableHTTPS,
|
||||
}, "ResolveEndpointV2", middleware.After)
|
||||
}
|
||||
183
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go
generated
vendored
Normal file
183
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go
generated
vendored
Normal file
@@ -0,0 +1,183 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Adds or overwrites one or more tags for the specified resource. Tags are
|
||||
// metadata that you can assign to your automations, documents, managed nodes,
|
||||
// maintenance windows, Parameter Store parameters, and patch baselines. Tags
|
||||
// enable you to categorize your resources in different ways, for example, by
|
||||
// purpose, owner, or environment. Each tag consists of a key and an optional
|
||||
// value, both of which you define. For example, you could define a set of tags for
|
||||
// your account's managed nodes that helps you track each node's owner and stack
|
||||
// level. For example:
|
||||
// - Key=Owner,Value=DbAdmin
|
||||
// - Key=Owner,Value=SysAdmin
|
||||
// - Key=Owner,Value=Dev
|
||||
// - Key=Stack,Value=Production
|
||||
// - Key=Stack,Value=Pre-Production
|
||||
// - Key=Stack,Value=Test
|
||||
//
|
||||
// Most resources can have a maximum of 50 tags. Automations can have a maximum of
|
||||
// 5 tags. We recommend that you devise a set of tag keys that meets your needs for
|
||||
// each resource type. Using a consistent set of tag keys makes it easier for you
|
||||
// to manage your resources. You can search and filter the resources based on the
|
||||
// tags you add. Tags don't have any semantic meaning to and are interpreted
|
||||
// strictly as a string of characters. For more information about using tags with
|
||||
// Amazon Elastic Compute Cloud (Amazon EC2) instances, see Tagging your Amazon
|
||||
// EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
|
||||
// in the Amazon EC2 User Guide.
|
||||
func (c *Client) AddTagsToResource(ctx context.Context, params *AddTagsToResourceInput, optFns ...func(*Options)) (*AddTagsToResourceOutput, error) {
|
||||
if params == nil {
|
||||
params = &AddTagsToResourceInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "AddTagsToResource", params, optFns, c.addOperationAddTagsToResourceMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*AddTagsToResourceOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type AddTagsToResourceInput struct {
|
||||
|
||||
// The resource ID you want to tag. Use the ID of the resource. Here are some
|
||||
// examples: MaintenanceWindow : mw-012345abcde PatchBaseline : pb-012345abcde
|
||||
// Automation : example-c160-4567-8519-012345abcde OpsMetadata object: ResourceID
|
||||
// for tagging is created from the Amazon Resource Name (ARN) for the object.
|
||||
// Specifically, ResourceID is created from the strings that come after the word
|
||||
// opsmetadata in the ARN. For example, an OpsMetadata object with an ARN of
|
||||
// arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager has a
|
||||
// ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager .
|
||||
// For the Document and Parameter values, use the name of the resource. If you're
|
||||
// tagging a shared document, you must use the full ARN of the document.
|
||||
// ManagedInstance : mi-012345abcde The ManagedInstance type for this API
|
||||
// operation is only for on-premises managed nodes. You must specify the name of
|
||||
// the managed node in the following format: mi-ID_number . For example,
|
||||
// mi-1a2b3c4d5e6f .
|
||||
//
|
||||
// This member is required.
|
||||
ResourceId *string
|
||||
|
||||
// Specifies the type of resource you are tagging. The ManagedInstance type for
|
||||
// this API operation is for on-premises managed nodes. You must specify the name
|
||||
// of the managed node in the following format: mi-ID_number . For example,
|
||||
// mi-1a2b3c4d5e6f .
|
||||
//
|
||||
// This member is required.
|
||||
ResourceType types.ResourceTypeForTagging
|
||||
|
||||
// One or more tags. The value parameter is required. Don't enter personally
|
||||
// identifiable information in this field.
|
||||
//
|
||||
// This member is required.
|
||||
Tags []types.Tag
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type AddTagsToResourceOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpAddTagsToResource{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAddTagsToResource{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "AddTagsToResource"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddTagsToResource(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opAddTagsToResource(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "AddTagsToResource",
|
||||
}
|
||||
}
|
||||
159
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go
generated
vendored
Normal file
159
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go
generated
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Associates a related item to a Systems Manager OpsCenter OpsItem. For example,
|
||||
// you can associate an Incident Manager incident or analysis with an OpsItem.
|
||||
// Incident Manager and OpsCenter are capabilities of Amazon Web Services Systems
|
||||
// Manager.
|
||||
func (c *Client) AssociateOpsItemRelatedItem(ctx context.Context, params *AssociateOpsItemRelatedItemInput, optFns ...func(*Options)) (*AssociateOpsItemRelatedItemOutput, error) {
|
||||
if params == nil {
|
||||
params = &AssociateOpsItemRelatedItemInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "AssociateOpsItemRelatedItem", params, optFns, c.addOperationAssociateOpsItemRelatedItemMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*AssociateOpsItemRelatedItemOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type AssociateOpsItemRelatedItemInput struct {
|
||||
|
||||
// The type of association that you want to create between an OpsItem and a
|
||||
// resource. OpsCenter supports IsParentOf and RelatesTo association types.
|
||||
//
|
||||
// This member is required.
|
||||
AssociationType *string
|
||||
|
||||
// The ID of the OpsItem to which you want to associate a resource as a related
|
||||
// item.
|
||||
//
|
||||
// This member is required.
|
||||
OpsItemId *string
|
||||
|
||||
// The type of resource that you want to associate with an OpsItem. OpsCenter
|
||||
// supports the following types: AWS::SSMIncidents::IncidentRecord : an Incident
|
||||
// Manager incident. AWS::SSM::Document : a Systems Manager (SSM) document.
|
||||
//
|
||||
// This member is required.
|
||||
ResourceType *string
|
||||
|
||||
// The Amazon Resource Name (ARN) of the Amazon Web Services resource that you
|
||||
// want to associate with the OpsItem.
|
||||
//
|
||||
// This member is required.
|
||||
ResourceUri *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type AssociateOpsItemRelatedItemOutput struct {
|
||||
|
||||
// The association ID.
|
||||
AssociationId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationAssociateOpsItemRelatedItemMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateOpsItemRelatedItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateOpsItemRelatedItem"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAssociateOpsItemRelatedItemValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateOpsItemRelatedItem(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opAssociateOpsItemRelatedItem(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "AssociateOpsItemRelatedItem",
|
||||
}
|
||||
}
|
||||
141
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go
generated
vendored
Normal file
141
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go
generated
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Attempts to cancel the command specified by the Command ID. There is no
|
||||
// guarantee that the command will be terminated and the underlying process
|
||||
// stopped.
|
||||
func (c *Client) CancelCommand(ctx context.Context, params *CancelCommandInput, optFns ...func(*Options)) (*CancelCommandOutput, error) {
|
||||
if params == nil {
|
||||
params = &CancelCommandInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CancelCommand", params, optFns, c.addOperationCancelCommandMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CancelCommandOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CancelCommandInput struct {
|
||||
|
||||
// The ID of the command you want to cancel.
|
||||
//
|
||||
// This member is required.
|
||||
CommandId *string
|
||||
|
||||
// (Optional) A list of managed node IDs on which you want to cancel the command.
|
||||
// If not provided, the command is canceled on every node on which it was
|
||||
// requested.
|
||||
InstanceIds []string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Whether or not the command was successfully canceled. There is no guarantee
|
||||
// that a request can be canceled.
|
||||
type CancelCommandOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCancelCommandMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelCommand{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelCommand{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CancelCommand"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCancelCommandValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelCommand(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCancelCommand(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CancelCommand",
|
||||
}
|
||||
}
|
||||
138
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go
generated
vendored
Normal file
138
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go
generated
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Stops a maintenance window execution that is already in progress and cancels
|
||||
// any tasks in the window that haven't already starting running. Tasks already in
|
||||
// progress will continue to completion.
|
||||
func (c *Client) CancelMaintenanceWindowExecution(ctx context.Context, params *CancelMaintenanceWindowExecutionInput, optFns ...func(*Options)) (*CancelMaintenanceWindowExecutionOutput, error) {
|
||||
if params == nil {
|
||||
params = &CancelMaintenanceWindowExecutionInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CancelMaintenanceWindowExecution", params, optFns, c.addOperationCancelMaintenanceWindowExecutionMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CancelMaintenanceWindowExecutionOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CancelMaintenanceWindowExecutionInput struct {
|
||||
|
||||
// The ID of the maintenance window execution to stop.
|
||||
//
|
||||
// This member is required.
|
||||
WindowExecutionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CancelMaintenanceWindowExecutionOutput struct {
|
||||
|
||||
// The ID of the maintenance window execution that has been stopped.
|
||||
WindowExecutionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCancelMaintenanceWindowExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelMaintenanceWindowExecution{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelMaintenanceWindowExecution{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CancelMaintenanceWindowExecution"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCancelMaintenanceWindowExecutionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelMaintenanceWindowExecution(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCancelMaintenanceWindowExecution(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CancelMaintenanceWindowExecution",
|
||||
}
|
||||
}
|
||||
200
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go
generated
vendored
Normal file
200
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go
generated
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Generates an activation code and activation ID you can use to register your
|
||||
// on-premises servers, edge devices, or virtual machine (VM) with Amazon Web
|
||||
// Services Systems Manager. Registering these machines with Systems Manager makes
|
||||
// it possible to manage them using Systems Manager capabilities. You use the
|
||||
// activation code and ID when installing SSM Agent on machines in your hybrid
|
||||
// environment. For more information about requirements for managing on-premises
|
||||
// machines using Systems Manager, see Setting up Amazon Web Services Systems
|
||||
// Manager for hybrid environments (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. Amazon Elastic Compute
|
||||
// Cloud (Amazon EC2) instances, edge devices, and on-premises servers and VMs that
|
||||
// are configured for Systems Manager are all called managed nodes.
|
||||
func (c *Client) CreateActivation(ctx context.Context, params *CreateActivationInput, optFns ...func(*Options)) (*CreateActivationOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateActivationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateActivation", params, optFns, c.addOperationCreateActivationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateActivationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateActivationInput struct {
|
||||
|
||||
// The name of the Identity and Access Management (IAM) role that you want to
|
||||
// assign to the managed node. This IAM role must provide AssumeRole permissions
|
||||
// for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com
|
||||
// . For more information, see Create an IAM service role for a hybrid environment (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. You can't specify an IAM
|
||||
// service-linked role for this parameter. You must create a unique role.
|
||||
//
|
||||
// This member is required.
|
||||
IamRole *string
|
||||
|
||||
// The name of the registered, managed node as it will appear in the Amazon Web
|
||||
// Services Systems Manager console or when you use the Amazon Web Services command
|
||||
// line tools to list Systems Manager resources. Don't enter personally
|
||||
// identifiable information in this field.
|
||||
DefaultInstanceName *string
|
||||
|
||||
// A user-defined description of the resource that you want to register with
|
||||
// Systems Manager. Don't enter personally identifiable information in this field.
|
||||
Description *string
|
||||
|
||||
// The date by which this activation request should expire, in timestamp format,
|
||||
// such as "2021-07-07T00:00:00". You can specify a date up to 30 days in advance.
|
||||
// If you don't provide an expiration date, the activation code expires in 24
|
||||
// hours.
|
||||
ExpirationDate *time.Time
|
||||
|
||||
// Specify the maximum number of managed nodes you want to register. The default
|
||||
// value is 1 .
|
||||
RegistrationLimit *int32
|
||||
|
||||
// Reserved for internal use.
|
||||
RegistrationMetadata []types.RegistrationMetadataItem
|
||||
|
||||
// Optional metadata that you assign to a resource. Tags enable you to categorize
|
||||
// a resource in different ways, such as by purpose, owner, or environment. For
|
||||
// example, you might want to tag an activation to identify which servers or
|
||||
// virtual machines (VMs) in your on-premises environment you intend to activate.
|
||||
// In this case, you could specify the following key-value pairs:
|
||||
// - Key=OS,Value=Windows
|
||||
// - Key=Environment,Value=Production
|
||||
// When you install SSM Agent on your on-premises servers and VMs, you specify an
|
||||
// activation ID and code. When you specify the activation ID and code, tags
|
||||
// assigned to the activation are automatically applied to the on-premises servers
|
||||
// or VMs. You can't add tags to or delete tags from an existing activation. You
|
||||
// can tag your on-premises servers, edge devices, and VMs after they connect to
|
||||
// Systems Manager for the first time and are assigned a managed node ID. This
|
||||
// means they are listed in the Amazon Web Services Systems Manager console with an
|
||||
// ID that is prefixed with "mi-". For information about how to add tags to your
|
||||
// managed nodes, see AddTagsToResource . For information about how to remove tags
|
||||
// from your managed nodes, see RemoveTagsFromResource .
|
||||
Tags []types.Tag
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateActivationOutput struct {
|
||||
|
||||
// The code the system generates when it processes the activation. The activation
|
||||
// code functions like a password to validate the activation ID.
|
||||
ActivationCode *string
|
||||
|
||||
// The ID number generated by the system when it processed the activation. The
|
||||
// activation ID functions like a user name.
|
||||
ActivationId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateActivationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateActivation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateActivation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateActivation"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateActivationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateActivation(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateActivation(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateActivation",
|
||||
}
|
||||
}
|
||||
286
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go
generated
vendored
Normal file
286
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go
generated
vendored
Normal file
@@ -0,0 +1,286 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// A State Manager association defines the state that you want to maintain on your
|
||||
// managed nodes. For example, an association can specify that anti-virus software
|
||||
// must be installed and running on your managed nodes, or that certain ports must
|
||||
// be closed. For static targets, the association specifies a schedule for when the
|
||||
// configuration is reapplied. For dynamic targets, such as an Amazon Web Services
|
||||
// resource group or an Amazon Web Services autoscaling group, State Manager, a
|
||||
// capability of Amazon Web Services Systems Manager applies the configuration when
|
||||
// new managed nodes are added to the group. The association also specifies actions
|
||||
// to take when applying the configuration. For example, an association for
|
||||
// anti-virus software might run once a day. If the software isn't installed, then
|
||||
// State Manager installs it. If the software is installed, but the service isn't
|
||||
// running, then the association might instruct State Manager to start the service.
|
||||
func (c *Client) CreateAssociation(ctx context.Context, params *CreateAssociationInput, optFns ...func(*Options)) (*CreateAssociationOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateAssociationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateAssociation", params, optFns, c.addOperationCreateAssociationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateAssociationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateAssociationInput struct {
|
||||
|
||||
// The name of the SSM Command document or Automation runbook that contains the
|
||||
// configuration information for the managed node. You can specify Amazon Web
|
||||
// Services-predefined documents, documents you created, or a document that is
|
||||
// shared with you from another Amazon Web Services account. For Systems Manager
|
||||
// documents (SSM documents) that are shared with you from other Amazon Web
|
||||
// Services accounts, you must specify the complete SSM document ARN, in the
|
||||
// following format: arn:partition:ssm:region:account-id:document/document-name
|
||||
// For example: arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document For
|
||||
// Amazon Web Services-predefined documents and SSM documents you created in your
|
||||
// account, you only need to specify the document name. For example,
|
||||
// AWS-ApplyPatchBaseline or My-Document .
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// The details for the CloudWatch alarm you want to apply to an automation or
|
||||
// command.
|
||||
AlarmConfiguration *types.AlarmConfiguration
|
||||
|
||||
// By default, when you create a new association, the system runs it immediately
|
||||
// after it is created and then according to the schedule you specified. Specify
|
||||
// this option if you don't want an association to run immediately after you create
|
||||
// it. This parameter isn't supported for rate expressions.
|
||||
ApplyOnlyAtCronInterval bool
|
||||
|
||||
// Specify a descriptive name for the association.
|
||||
AssociationName *string
|
||||
|
||||
// Choose the parameter that will define how your automation will branch out. This
|
||||
// target is required for associations that use an Automation runbook and target
|
||||
// resources by using rate controls. Automation is a capability of Amazon Web
|
||||
// Services Systems Manager.
|
||||
AutomationTargetParameterName *string
|
||||
|
||||
// The names or Amazon Resource Names (ARNs) of the Change Calendar type documents
|
||||
// you want to gate your associations under. The associations only run when that
|
||||
// change calendar is open. For more information, see Amazon Web Services Systems
|
||||
// Manager Change Calendar (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar)
|
||||
// .
|
||||
CalendarNames []string
|
||||
|
||||
// The severity level to assign to the association.
|
||||
ComplianceSeverity types.AssociationComplianceSeverity
|
||||
|
||||
// The document version you want to associate with the target(s). Can be a
|
||||
// specific version or the default version. State Manager doesn't support running
|
||||
// associations that use a new version of a document if that document is shared
|
||||
// from another account. State Manager always runs the default version of a
|
||||
// document if shared from another account, even though the Systems Manager console
|
||||
// shows that a new version was processed. If you want to run an association using
|
||||
// a new version of a document shared form another account, you must set the
|
||||
// document version to default .
|
||||
DocumentVersion *string
|
||||
|
||||
// The managed node ID. InstanceId has been deprecated. To specify a managed node
|
||||
// ID for an association, use the Targets parameter. Requests that include the
|
||||
// parameter InstanceID with Systems Manager documents (SSM documents) that use
|
||||
// schema version 2.0 or later will fail. In addition, if you use the parameter
|
||||
// InstanceId , you can't use the parameters AssociationName , DocumentVersion ,
|
||||
// MaxErrors , MaxConcurrency , OutputLocation , or ScheduleExpression . To use
|
||||
// these parameters, you must use the Targets parameter.
|
||||
InstanceId *string
|
||||
|
||||
// The maximum number of targets allowed to run the association at the same time.
|
||||
// You can specify a number, for example 10, or a percentage of the target set, for
|
||||
// example 10%. The default value is 100%, which means all targets run the
|
||||
// association at the same time. If a new managed node starts and attempts to run
|
||||
// an association while Systems Manager is running MaxConcurrency associations,
|
||||
// the association is allowed to run. During the next association interval, the new
|
||||
// managed node will process its association within the limit specified for
|
||||
// MaxConcurrency .
|
||||
MaxConcurrency *string
|
||||
|
||||
// The number of errors that are allowed before the system stops sending requests
|
||||
// to run the association on additional targets. You can specify either an absolute
|
||||
// number of errors, for example 10, or a percentage of the target set, for example
|
||||
// 10%. If you specify 3, for example, the system stops sending requests when the
|
||||
// fourth error is received. If you specify 0, then the system stops sending
|
||||
// requests after the first error is returned. If you run an association on 50
|
||||
// managed nodes and set MaxError to 10%, then the system stops sending the
|
||||
// request when the sixth error is received. Executions that are already running an
|
||||
// association when MaxErrors is reached are allowed to complete, but some of
|
||||
// these executions may fail as well. If you need to ensure that there won't be
|
||||
// more than max-errors failed executions, set MaxConcurrency to 1 so that
|
||||
// executions proceed one at a time.
|
||||
MaxErrors *string
|
||||
|
||||
// An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the
|
||||
// output details of the request.
|
||||
OutputLocation *types.InstanceAssociationOutputLocation
|
||||
|
||||
// The parameters for the runtime configuration of the document.
|
||||
Parameters map[string][]string
|
||||
|
||||
// A cron expression when the association will be applied to the target(s).
|
||||
ScheduleExpression *string
|
||||
|
||||
// Number of days to wait after the scheduled day to run an association. For
|
||||
// example, if you specified a cron schedule of cron(0 0 ? * THU#2 *) , you could
|
||||
// specify an offset of 3 to run the association each Sunday after the second
|
||||
// Thursday of the month. For more information about cron schedules for
|
||||
// associations, see Reference: Cron and rate expressions for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. To use offsets, you must
|
||||
// specify the ApplyOnlyAtCronInterval parameter. This option tells the system not
|
||||
// to run an association immediately after you create it.
|
||||
ScheduleOffset *int32
|
||||
|
||||
// The mode for generating association compliance. You can specify AUTO or MANUAL .
|
||||
// In AUTO mode, the system uses the status of the association execution to
|
||||
// determine the compliance status. If the association execution runs successfully,
|
||||
// then the association is COMPLIANT . If the association execution doesn't run
|
||||
// successfully, the association is NON-COMPLIANT . In MANUAL mode, you must
|
||||
// specify the AssociationId as a parameter for the PutComplianceItems API
|
||||
// operation. In this case, compliance data isn't managed by State Manager. It is
|
||||
// managed by your direct call to the PutComplianceItems API operation. By
|
||||
// default, all associations use AUTO mode.
|
||||
SyncCompliance types.AssociationSyncCompliance
|
||||
|
||||
// Adds or overwrites one or more tags for a State Manager association. Tags are
|
||||
// metadata that you can assign to your Amazon Web Services resources. Tags enable
|
||||
// you to categorize your resources in different ways, for example, by purpose,
|
||||
// owner, or environment. Each tag consists of a key and an optional value, both of
|
||||
// which you define.
|
||||
Tags []types.Tag
|
||||
|
||||
// A location is a combination of Amazon Web Services Regions and Amazon Web
|
||||
// Services accounts where you want to run the association. Use this action to
|
||||
// create an association in multiple Regions and multiple accounts.
|
||||
TargetLocations []types.TargetLocation
|
||||
|
||||
// A key-value mapping of document parameters to target resources. Both Targets
|
||||
// and TargetMaps can't be specified together.
|
||||
TargetMaps []map[string][]string
|
||||
|
||||
// The targets for the association. You can target managed nodes by using tags,
|
||||
// Amazon Web Services resource groups, all managed nodes in an Amazon Web Services
|
||||
// account, or individual managed node IDs. You can target all managed nodes in an
|
||||
// Amazon Web Services account by specifying the InstanceIds key with a value of *
|
||||
// . For more information about choosing targets for an association, see Using
|
||||
// targets and rate controls with State Manager associations (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
Targets []types.Target
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateAssociationOutput struct {
|
||||
|
||||
// Information about the association.
|
||||
AssociationDescription *types.AssociationDescription
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAssociation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAssociation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAssociation"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateAssociationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAssociation(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateAssociation",
|
||||
}
|
||||
}
|
||||
146
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go
generated
vendored
Normal file
146
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go
generated
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Associates the specified Amazon Web Services Systems Manager document (SSM
|
||||
// document) with the specified managed nodes or targets. When you associate a
|
||||
// document with one or more managed nodes using IDs or tags, Amazon Web Services
|
||||
// Systems Manager Agent (SSM Agent) running on the managed node processes the
|
||||
// document and configures the node as specified. If you associate a document with
|
||||
// a managed node that already has an associated document, the system returns the
|
||||
// AssociationAlreadyExists exception.
|
||||
func (c *Client) CreateAssociationBatch(ctx context.Context, params *CreateAssociationBatchInput, optFns ...func(*Options)) (*CreateAssociationBatchOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateAssociationBatchInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateAssociationBatch", params, optFns, c.addOperationCreateAssociationBatchMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateAssociationBatchOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateAssociationBatchInput struct {
|
||||
|
||||
// One or more associations.
|
||||
//
|
||||
// This member is required.
|
||||
Entries []types.CreateAssociationBatchRequestEntry
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateAssociationBatchOutput struct {
|
||||
|
||||
// Information about the associations that failed.
|
||||
Failed []types.FailedCreateAssociation
|
||||
|
||||
// Information about the associations that succeeded.
|
||||
Successful []types.AssociationDescription
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateAssociationBatchMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAssociationBatch{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAssociationBatch{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAssociationBatch"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateAssociationBatchValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAssociationBatch(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateAssociationBatch(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateAssociationBatch",
|
||||
}
|
||||
}
|
||||
208
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go
generated
vendored
Normal file
208
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go
generated
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Creates a Amazon Web Services Systems Manager (SSM document). An SSM document
|
||||
// defines the actions that Systems Manager performs on your managed nodes. For
|
||||
// more information about SSM documents, including information about supported
|
||||
// schemas, features, and syntax, see Amazon Web Services Systems Manager Documents (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
func (c *Client) CreateDocument(ctx context.Context, params *CreateDocumentInput, optFns ...func(*Options)) (*CreateDocumentOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateDocumentInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateDocument", params, optFns, c.addOperationCreateDocumentMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateDocumentOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateDocumentInput struct {
|
||||
|
||||
// The content for the new SSM document in JSON or YAML format. The content of the
|
||||
// document must not exceed 64KB. This quota also includes the content specified
|
||||
// for input parameters at runtime. We recommend storing the contents for your new
|
||||
// document in an external JSON or YAML file and referencing the file in a command.
|
||||
// For examples, see the following topics in the Amazon Web Services Systems
|
||||
// Manager User Guide.
|
||||
// - Create an SSM document (Amazon Web Services API) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html)
|
||||
// - Create an SSM document (Amazon Web Services CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-cli.html)
|
||||
// - Create an SSM document (API) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html)
|
||||
//
|
||||
// This member is required.
|
||||
Content *string
|
||||
|
||||
// A name for the SSM document. You can't use the following strings as document
|
||||
// name prefixes. These are reserved by Amazon Web Services for use as document
|
||||
// name prefixes:
|
||||
// - aws
|
||||
// - amazon
|
||||
// - amzn
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// A list of key-value pairs that describe attachments to a version of a document.
|
||||
Attachments []types.AttachmentsSource
|
||||
|
||||
// An optional field where you can specify a friendly name for the SSM document.
|
||||
// This value can differ for each version of the document. You can update this
|
||||
// value at a later time using the UpdateDocument operation.
|
||||
DisplayName *string
|
||||
|
||||
// Specify the document format for the request. The document format can be JSON,
|
||||
// YAML, or TEXT. JSON is the default format.
|
||||
DocumentFormat types.DocumentFormat
|
||||
|
||||
// The type of document to create. The DeploymentStrategy document type is an
|
||||
// internal-use-only document type reserved for AppConfig.
|
||||
DocumentType types.DocumentType
|
||||
|
||||
// A list of SSM documents required by a document. This parameter is used
|
||||
// exclusively by AppConfig. When a user creates an AppConfig configuration in an
|
||||
// SSM document, the user must also specify a required document for validation
|
||||
// purposes. In this case, an ApplicationConfiguration document requires an
|
||||
// ApplicationConfigurationSchema document for validation purposes. For more
|
||||
// information, see What is AppConfig? (https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html)
|
||||
// in the AppConfig User Guide.
|
||||
Requires []types.DocumentRequires
|
||||
|
||||
// Optional metadata that you assign to a resource. Tags enable you to categorize
|
||||
// a resource in different ways, such as by purpose, owner, or environment. For
|
||||
// example, you might want to tag an SSM document to identify the types of targets
|
||||
// or the environment where it will run. In this case, you could specify the
|
||||
// following key-value pairs:
|
||||
// - Key=OS,Value=Windows
|
||||
// - Key=Environment,Value=Production
|
||||
// To add tags to an existing SSM document, use the AddTagsToResource operation.
|
||||
Tags []types.Tag
|
||||
|
||||
// Specify a target type to define the kinds of resources the document can run on.
|
||||
// For example, to run a document on EC2 instances, specify the following value:
|
||||
// /AWS::EC2::Instance . If you specify a value of '/' the document can run on all
|
||||
// types of resources. If you don't specify a value, the document can't run on any
|
||||
// resources. For a list of valid resource types, see Amazon Web Services resource
|
||||
// and property types reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html)
|
||||
// in the CloudFormation User Guide.
|
||||
TargetType *string
|
||||
|
||||
// An optional field specifying the version of the artifact you are creating with
|
||||
// the document. For example, Release12.1 . This value is unique across all
|
||||
// versions of a document, and can't be changed.
|
||||
VersionName *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateDocumentOutput struct {
|
||||
|
||||
// Information about the SSM document.
|
||||
DocumentDescription *types.DocumentDescription
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateDocument{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateDocument{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDocument"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateDocumentValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDocument(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateDocument(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateDocument",
|
||||
}
|
||||
}
|
||||
247
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go
generated
vendored
Normal file
247
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go
generated
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Creates a new maintenance window. The value you specify for Duration determines
|
||||
// the specific end time for the maintenance window based on the time it begins. No
|
||||
// maintenance window tasks are permitted to start after the resulting endtime
|
||||
// minus the number of hours you specify for Cutoff . For example, if the
|
||||
// maintenance window starts at 3 PM, the duration is three hours, and the value
|
||||
// you specify for Cutoff is one hour, no maintenance window tasks can start after
|
||||
// 5 PM.
|
||||
func (c *Client) CreateMaintenanceWindow(ctx context.Context, params *CreateMaintenanceWindowInput, optFns ...func(*Options)) (*CreateMaintenanceWindowOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateMaintenanceWindowInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateMaintenanceWindow", params, optFns, c.addOperationCreateMaintenanceWindowMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateMaintenanceWindowOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateMaintenanceWindowInput struct {
|
||||
|
||||
// Enables a maintenance window task to run on managed nodes, even if you haven't
|
||||
// registered those nodes as targets. If enabled, then you must specify the
|
||||
// unregistered managed nodes (by node ID) when you register a task with the
|
||||
// maintenance window. If you don't enable this option, then you must specify
|
||||
// previously-registered targets when you register a task with the maintenance
|
||||
// window.
|
||||
//
|
||||
// This member is required.
|
||||
AllowUnassociatedTargets bool
|
||||
|
||||
// The number of hours before the end of the maintenance window that Amazon Web
|
||||
// Services Systems Manager stops scheduling new tasks for execution.
|
||||
//
|
||||
// This member is required.
|
||||
Cutoff int32
|
||||
|
||||
// The duration of the maintenance window in hours.
|
||||
//
|
||||
// This member is required.
|
||||
Duration *int32
|
||||
|
||||
// The name of the maintenance window.
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// The schedule of the maintenance window in the form of a cron or rate expression.
|
||||
//
|
||||
// This member is required.
|
||||
Schedule *string
|
||||
|
||||
// User-provided idempotency token.
|
||||
ClientToken *string
|
||||
|
||||
// An optional description for the maintenance window. We recommend specifying a
|
||||
// description to help you organize your maintenance windows.
|
||||
Description *string
|
||||
|
||||
// The date and time, in ISO-8601 Extended format, for when you want the
|
||||
// maintenance window to become inactive. EndDate allows you to set a date and
|
||||
// time in the future when the maintenance window will no longer run.
|
||||
EndDate *string
|
||||
|
||||
// The number of days to wait after the date and time specified by a cron
|
||||
// expression before running the maintenance window. For example, the following
|
||||
// cron expression schedules a maintenance window to run on the third Tuesday of
|
||||
// every month at 11:30 PM. cron(30 23 ? * TUE#3 *) If the schedule offset is 2 ,
|
||||
// the maintenance window won't run until two days later.
|
||||
ScheduleOffset *int32
|
||||
|
||||
// The time zone that the scheduled maintenance window executions are based on, in
|
||||
// Internet Assigned Numbers Authority (IANA) format. For example:
|
||||
// "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the
|
||||
// Time Zone Database (https://www.iana.org/time-zones) on the IANA website.
|
||||
ScheduleTimezone *string
|
||||
|
||||
// The date and time, in ISO-8601 Extended format, for when you want the
|
||||
// maintenance window to become active. StartDate allows you to delay activation
|
||||
// of the maintenance window until the specified future date.
|
||||
StartDate *string
|
||||
|
||||
// Optional metadata that you assign to a resource. Tags enable you to categorize
|
||||
// a resource in different ways, such as by purpose, owner, or environment. For
|
||||
// example, you might want to tag a maintenance window to identify the type of
|
||||
// tasks it will run, the types of targets, and the environment it will run in. In
|
||||
// this case, you could specify the following key-value pairs:
|
||||
// - Key=TaskType,Value=AgentUpdate
|
||||
// - Key=OS,Value=Windows
|
||||
// - Key=Environment,Value=Production
|
||||
// To add tags to an existing maintenance window, use the AddTagsToResource
|
||||
// operation.
|
||||
Tags []types.Tag
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateMaintenanceWindowOutput struct {
|
||||
|
||||
// The ID of the created maintenance window.
|
||||
WindowId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateMaintenanceWindow"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addIdempotencyToken_opCreateMaintenanceWindowMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateMaintenanceWindowValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMaintenanceWindow(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type idempotencyToken_initializeOpCreateMaintenanceWindow struct {
|
||||
tokenProvider IdempotencyTokenProvider
|
||||
}
|
||||
|
||||
func (*idempotencyToken_initializeOpCreateMaintenanceWindow) ID() string {
|
||||
return "OperationIdempotencyTokenAutoFill"
|
||||
}
|
||||
|
||||
func (m *idempotencyToken_initializeOpCreateMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if m.tokenProvider == nil {
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*CreateMaintenanceWindowInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateMaintenanceWindowInput ")
|
||||
}
|
||||
|
||||
if input.ClientToken == nil {
|
||||
t, err := m.tokenProvider.GetIdempotencyToken()
|
||||
if err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
input.ClientToken = &t
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
func addIdempotencyToken_opCreateMaintenanceWindowMiddleware(stack *middleware.Stack, cfg Options) error {
|
||||
return stack.Initialize.Add(&idempotencyToken_initializeOpCreateMaintenanceWindow{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateMaintenanceWindow",
|
||||
}
|
||||
}
|
||||
239
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go
generated
vendored
Normal file
239
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go
generated
vendored
Normal file
@@ -0,0 +1,239 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Creates a new OpsItem. You must have permission in Identity and Access
|
||||
// Management (IAM) to create a new OpsItem. For more information, see Set up
|
||||
// OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. Operations engineers and
|
||||
// IT professionals use Amazon Web Services Systems Manager OpsCenter to view,
|
||||
// investigate, and remediate operational issues impacting the performance and
|
||||
// health of their Amazon Web Services resources. For more information, see Amazon
|
||||
// Web Services Systems Manager OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
func (c *Client) CreateOpsItem(ctx context.Context, params *CreateOpsItemInput, optFns ...func(*Options)) (*CreateOpsItemOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateOpsItemInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateOpsItem", params, optFns, c.addOperationCreateOpsItemMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateOpsItemOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateOpsItemInput struct {
|
||||
|
||||
// User-defined text that contains information about the OpsItem, in Markdown
|
||||
// format. Provide enough information so that users viewing this OpsItem for the
|
||||
// first time understand the issue.
|
||||
//
|
||||
// This member is required.
|
||||
Description *string
|
||||
|
||||
// The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The source
|
||||
// name can't contain the following strings: aws , amazon , and amzn .
|
||||
//
|
||||
// This member is required.
|
||||
Source *string
|
||||
|
||||
// A short heading that describes the nature of the OpsItem and the impacted
|
||||
// resource.
|
||||
//
|
||||
// This member is required.
|
||||
Title *string
|
||||
|
||||
// The target Amazon Web Services account where you want to create an OpsItem. To
|
||||
// make this call, your account must be configured to work with OpsItems across
|
||||
// accounts. For more information, see Set up OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
AccountId *string
|
||||
|
||||
// The time a runbook workflow ended. Currently reported only for the OpsItem type
|
||||
// /aws/changerequest .
|
||||
ActualEndTime *time.Time
|
||||
|
||||
// The time a runbook workflow started. Currently reported only for the OpsItem
|
||||
// type /aws/changerequest .
|
||||
ActualStartTime *time.Time
|
||||
|
||||
// Specify a category to assign to an OpsItem.
|
||||
Category *string
|
||||
|
||||
// The Amazon Resource Name (ARN) of an SNS topic where notifications are sent
|
||||
// when this OpsItem is edited or changed.
|
||||
Notifications []types.OpsItemNotification
|
||||
|
||||
// Operational data is custom data that provides useful reference details about
|
||||
// the OpsItem. For example, you can specify log files, error strings, license
|
||||
// keys, troubleshooting tips, or other relevant data. You enter operational data
|
||||
// as key-value pairs. The key has a maximum length of 128 characters. The value
|
||||
// has a maximum size of 20 KB. Operational data keys can't begin with the
|
||||
// following: amazon , aws , amzn , ssm , /amazon , /aws , /amzn , /ssm . You can
|
||||
// choose to make the data searchable by other users in the account or you can
|
||||
// restrict search access. Searchable data means that all users with access to the
|
||||
// OpsItem Overview page (as provided by the DescribeOpsItems API operation) can
|
||||
// view and search on the specified data. Operational data that isn't searchable is
|
||||
// only viewable by users who have access to the OpsItem (as provided by the
|
||||
// GetOpsItem API operation). Use the /aws/resources key in OperationalData to
|
||||
// specify a related resource in the request. Use the /aws/automations key in
|
||||
// OperationalData to associate an Automation runbook with the OpsItem. To view
|
||||
// Amazon Web Services CLI example commands that use these keys, see Creating
|
||||
// OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
OperationalData map[string]types.OpsItemDataValue
|
||||
|
||||
// The type of OpsItem to create. Systems Manager supports the following types of
|
||||
// OpsItems:
|
||||
// - /aws/issue This type of OpsItem is used for default OpsItems created by
|
||||
// OpsCenter.
|
||||
// - /aws/changerequest This type of OpsItem is used by Change Manager for
|
||||
// reviewing and approving or rejecting change requests.
|
||||
// - /aws/insight This type of OpsItem is used by OpsCenter for aggregating and
|
||||
// reporting on duplicate OpsItems.
|
||||
OpsItemType *string
|
||||
|
||||
// The time specified in a change request for a runbook workflow to end. Currently
|
||||
// supported only for the OpsItem type /aws/changerequest .
|
||||
PlannedEndTime *time.Time
|
||||
|
||||
// The time specified in a change request for a runbook workflow to start.
|
||||
// Currently supported only for the OpsItem type /aws/changerequest .
|
||||
PlannedStartTime *time.Time
|
||||
|
||||
// The importance of this OpsItem in relation to other OpsItems in the system.
|
||||
Priority *int32
|
||||
|
||||
// One or more OpsItems that share something in common with the current OpsItems.
|
||||
// For example, related OpsItems can include OpsItems with similar error messages,
|
||||
// impacted resources, or statuses for the impacted resource.
|
||||
RelatedOpsItems []types.RelatedOpsItem
|
||||
|
||||
// Specify a severity to assign to an OpsItem.
|
||||
Severity *string
|
||||
|
||||
// Optional metadata that you assign to a resource. Tags use a key-value pair. For
|
||||
// example: Key=Department,Value=Finance To add tags to a new OpsItem, a user must
|
||||
// have IAM permissions for both the ssm:CreateOpsItems operation and the
|
||||
// ssm:AddTagsToResource operation. To add tags to an existing OpsItem, use the
|
||||
// AddTagsToResource operation.
|
||||
Tags []types.Tag
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateOpsItemOutput struct {
|
||||
|
||||
// The OpsItem Amazon Resource Name (ARN).
|
||||
OpsItemArn *string
|
||||
|
||||
// The ID of the OpsItem.
|
||||
OpsItemId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateOpsItemMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOpsItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOpsItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOpsItem"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateOpsItemValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOpsItem(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateOpsItem(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateOpsItem",
|
||||
}
|
||||
}
|
||||
153
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go
generated
vendored
Normal file
153
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// If you create a new application in Application Manager, Amazon Web Services
|
||||
// Systems Manager calls this API operation to specify information about the new
|
||||
// application, including the application type.
|
||||
func (c *Client) CreateOpsMetadata(ctx context.Context, params *CreateOpsMetadataInput, optFns ...func(*Options)) (*CreateOpsMetadataOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateOpsMetadataInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateOpsMetadata", params, optFns, c.addOperationCreateOpsMetadataMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateOpsMetadataOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateOpsMetadataInput struct {
|
||||
|
||||
// A resource ID for a new Application Manager application.
|
||||
//
|
||||
// This member is required.
|
||||
ResourceId *string
|
||||
|
||||
// Metadata for a new Application Manager application.
|
||||
Metadata map[string]types.MetadataValue
|
||||
|
||||
// Optional metadata that you assign to a resource. You can specify a maximum of
|
||||
// five tags for an OpsMetadata object. Tags enable you to categorize a resource in
|
||||
// different ways, such as by purpose, owner, or environment. For example, you
|
||||
// might want to tag an OpsMetadata object to identify an environment or target
|
||||
// Amazon Web Services Region. In this case, you could specify the following
|
||||
// key-value pairs:
|
||||
// - Key=Environment,Value=Production
|
||||
// - Key=Region,Value=us-east-2
|
||||
Tags []types.Tag
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateOpsMetadataOutput struct {
|
||||
|
||||
// The Amazon Resource Name (ARN) of the OpsMetadata Object or blob created by the
|
||||
// call.
|
||||
OpsMetadataArn *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateOpsMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOpsMetadata{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOpsMetadata{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOpsMetadata"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateOpsMetadataValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOpsMetadata(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateOpsMetadata",
|
||||
}
|
||||
}
|
||||
240
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go
generated
vendored
Normal file
240
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go
generated
vendored
Normal file
@@ -0,0 +1,240 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Creates a patch baseline. For information about valid key-value pairs in
|
||||
// PatchFilters for each supported operating system type, see PatchFilter .
|
||||
func (c *Client) CreatePatchBaseline(ctx context.Context, params *CreatePatchBaselineInput, optFns ...func(*Options)) (*CreatePatchBaselineOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreatePatchBaselineInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreatePatchBaseline", params, optFns, c.addOperationCreatePatchBaselineMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreatePatchBaselineOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreatePatchBaselineInput struct {
|
||||
|
||||
// The name of the patch baseline.
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// A set of rules used to include patches in the baseline.
|
||||
ApprovalRules *types.PatchRuleGroup
|
||||
|
||||
// A list of explicitly approved patches for the baseline. For information about
|
||||
// accepted formats for lists of approved patches and rejected patches, see About
|
||||
// package name formats for approved and rejected patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
ApprovedPatches []string
|
||||
|
||||
// Defines the compliance level for approved patches. When an approved patch is
|
||||
// reported as missing, this value describes the severity of the compliance
|
||||
// violation. The default value is UNSPECIFIED .
|
||||
ApprovedPatchesComplianceLevel types.PatchComplianceLevel
|
||||
|
||||
// Indicates whether the list of approved patches includes non-security updates
|
||||
// that should be applied to the managed nodes. The default value is false .
|
||||
// Applies to Linux managed nodes only.
|
||||
ApprovedPatchesEnableNonSecurity *bool
|
||||
|
||||
// User-provided idempotency token.
|
||||
ClientToken *string
|
||||
|
||||
// A description of the patch baseline.
|
||||
Description *string
|
||||
|
||||
// A set of global filters used to include patches in the baseline.
|
||||
GlobalFilters *types.PatchFilterGroup
|
||||
|
||||
// Defines the operating system the patch baseline applies to. The default value
|
||||
// is WINDOWS .
|
||||
OperatingSystem types.OperatingSystem
|
||||
|
||||
// A list of explicitly rejected patches for the baseline. For information about
|
||||
// accepted formats for lists of approved patches and rejected patches, see About
|
||||
// package name formats for approved and rejected patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
RejectedPatches []string
|
||||
|
||||
// The action for Patch Manager to take on patches included in the RejectedPackages
|
||||
// list.
|
||||
// - ALLOW_AS_DEPENDENCY : A package in the Rejected patches list is installed
|
||||
// only if it is a dependency of another package. It is considered compliant with
|
||||
// the patch baseline, and its status is reported as InstalledOther . This is the
|
||||
// default action if no option is specified.
|
||||
// - BLOCK : Packages in the RejectedPatches list, and packages that include them
|
||||
// as dependencies, aren't installed under any circumstances. If a package was
|
||||
// installed before it was added to the Rejected patches list, it is considered
|
||||
// non-compliant with the patch baseline, and its status is reported as
|
||||
// InstalledRejected .
|
||||
RejectedPatchesAction types.PatchAction
|
||||
|
||||
// Information about the patches to use to update the managed nodes, including
|
||||
// target operating systems and source repositories. Applies to Linux managed nodes
|
||||
// only.
|
||||
Sources []types.PatchSource
|
||||
|
||||
// Optional metadata that you assign to a resource. Tags enable you to categorize
|
||||
// a resource in different ways, such as by purpose, owner, or environment. For
|
||||
// example, you might want to tag a patch baseline to identify the severity level
|
||||
// of patches it specifies and the operating system family it applies to. In this
|
||||
// case, you could specify the following key-value pairs:
|
||||
// - Key=PatchSeverity,Value=Critical
|
||||
// - Key=OS,Value=Windows
|
||||
// To add tags to an existing patch baseline, use the AddTagsToResource operation.
|
||||
Tags []types.Tag
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreatePatchBaselineOutput struct {
|
||||
|
||||
// The ID of the created patch baseline.
|
||||
BaselineId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreatePatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreatePatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreatePatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePatchBaseline"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addIdempotencyToken_opCreatePatchBaselineMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreatePatchBaselineValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePatchBaseline(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type idempotencyToken_initializeOpCreatePatchBaseline struct {
|
||||
tokenProvider IdempotencyTokenProvider
|
||||
}
|
||||
|
||||
func (*idempotencyToken_initializeOpCreatePatchBaseline) ID() string {
|
||||
return "OperationIdempotencyTokenAutoFill"
|
||||
}
|
||||
|
||||
func (m *idempotencyToken_initializeOpCreatePatchBaseline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if m.tokenProvider == nil {
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*CreatePatchBaselineInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("expected middleware input to be of type *CreatePatchBaselineInput ")
|
||||
}
|
||||
|
||||
if input.ClientToken == nil {
|
||||
t, err := m.tokenProvider.GetIdempotencyToken()
|
||||
if err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
input.ClientToken = &t
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
func addIdempotencyToken_opCreatePatchBaselineMiddleware(stack *middleware.Stack, cfg Options) error {
|
||||
return stack.Initialize.Add(&idempotencyToken_initializeOpCreatePatchBaseline{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreatePatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreatePatchBaseline",
|
||||
}
|
||||
}
|
||||
171
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go
generated
vendored
Normal file
171
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go
generated
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// A resource data sync helps you view data from multiple sources in a single
|
||||
// location. Amazon Web Services Systems Manager offers two types of resource data
|
||||
// sync: SyncToDestination and SyncFromSource . You can configure Systems Manager
|
||||
// Inventory to use the SyncToDestination type to synchronize Inventory data from
|
||||
// multiple Amazon Web Services Regions to a single Amazon Simple Storage Service
|
||||
// (Amazon S3) bucket. For more information, see Configuring resource data sync
|
||||
// for Inventory (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. You can configure Systems
|
||||
// Manager Explorer to use the SyncFromSource type to synchronize operational work
|
||||
// items (OpsItems) and operational data (OpsData) from multiple Amazon Web
|
||||
// Services Regions to a single Amazon S3 bucket. This type can synchronize
|
||||
// OpsItems and OpsData from multiple Amazon Web Services accounts and Amazon Web
|
||||
// Services Regions or EntireOrganization by using Organizations. For more
|
||||
// information, see Setting up Systems Manager Explorer to display data from
|
||||
// multiple accounts and Regions (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. A resource data sync is
|
||||
// an asynchronous operation that returns immediately. After a successful initial
|
||||
// sync is completed, the system continuously syncs data. To check the status of a
|
||||
// sync, use the ListResourceDataSync . By default, data isn't encrypted in Amazon
|
||||
// S3. We strongly recommend that you enable encryption in Amazon S3 to ensure
|
||||
// secure data storage. We also recommend that you secure access to the Amazon S3
|
||||
// bucket by creating a restrictive bucket policy.
|
||||
func (c *Client) CreateResourceDataSync(ctx context.Context, params *CreateResourceDataSyncInput, optFns ...func(*Options)) (*CreateResourceDataSyncOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateResourceDataSyncInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateResourceDataSync", params, optFns, c.addOperationCreateResourceDataSyncMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateResourceDataSyncOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateResourceDataSyncInput struct {
|
||||
|
||||
// A name for the configuration.
|
||||
//
|
||||
// This member is required.
|
||||
SyncName *string
|
||||
|
||||
// Amazon S3 configuration details for the sync. This parameter is required if the
|
||||
// SyncType value is SyncToDestination.
|
||||
S3Destination *types.ResourceDataSyncS3Destination
|
||||
|
||||
// Specify information about the data sources to synchronize. This parameter is
|
||||
// required if the SyncType value is SyncFromSource.
|
||||
SyncSource *types.ResourceDataSyncSource
|
||||
|
||||
// Specify SyncToDestination to create a resource data sync that synchronizes data
|
||||
// to an S3 bucket for Inventory. If you specify SyncToDestination , you must
|
||||
// provide a value for S3Destination . Specify SyncFromSource to synchronize data
|
||||
// from a single account and multiple Regions, or multiple Amazon Web Services
|
||||
// accounts and Amazon Web Services Regions, as listed in Organizations for
|
||||
// Explorer. If you specify SyncFromSource , you must provide a value for
|
||||
// SyncSource . The default value is SyncToDestination .
|
||||
SyncType *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateResourceDataSyncOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateResourceDataSyncMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateResourceDataSync{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateResourceDataSync{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateResourceDataSync"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateResourceDataSyncValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateResourceDataSync(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateResourceDataSync(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateResourceDataSync",
|
||||
}
|
||||
}
|
||||
135
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go
generated
vendored
Normal file
135
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Deletes an activation. You aren't required to delete an activation. If you
|
||||
// delete an activation, you can no longer use it to register additional managed
|
||||
// nodes. Deleting an activation doesn't de-register managed nodes. You must
|
||||
// manually de-register managed nodes.
|
||||
func (c *Client) DeleteActivation(ctx context.Context, params *DeleteActivationInput, optFns ...func(*Options)) (*DeleteActivationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteActivationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteActivation", params, optFns, c.addOperationDeleteActivationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteActivationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteActivationInput struct {
|
||||
|
||||
// The ID of the activation that you want to delete.
|
||||
//
|
||||
// This member is required.
|
||||
ActivationId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteActivationOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteActivationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteActivation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteActivation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteActivation"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteActivationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteActivation(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteActivation(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteActivation",
|
||||
}
|
||||
}
|
||||
145
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go
generated
vendored
Normal file
145
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go
generated
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Disassociates the specified Amazon Web Services Systems Manager document (SSM
|
||||
// document) from the specified managed node. If you created the association by
|
||||
// using the Targets parameter, then you must delete the association by using the
|
||||
// association ID. When you disassociate a document from a managed node, it doesn't
|
||||
// change the configuration of the node. To change the configuration state of a
|
||||
// managed node after you disassociate a document, you must create a new document
|
||||
// with the desired configuration and associate it with the node.
|
||||
func (c *Client) DeleteAssociation(ctx context.Context, params *DeleteAssociationInput, optFns ...func(*Options)) (*DeleteAssociationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteAssociationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteAssociation", params, optFns, c.addOperationDeleteAssociationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteAssociationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteAssociationInput struct {
|
||||
|
||||
// The association ID that you want to delete.
|
||||
AssociationId *string
|
||||
|
||||
// The managed node ID. InstanceId has been deprecated. To specify a managed node
|
||||
// ID for an association, use the Targets parameter. Requests that include the
|
||||
// parameter InstanceID with Systems Manager documents (SSM documents) that use
|
||||
// schema version 2.0 or later will fail. In addition, if you use the parameter
|
||||
// InstanceId , you can't use the parameters AssociationName , DocumentVersion ,
|
||||
// MaxErrors , MaxConcurrency , OutputLocation , or ScheduleExpression . To use
|
||||
// these parameters, you must use the Targets parameter.
|
||||
InstanceId *string
|
||||
|
||||
// The name of the SSM document.
|
||||
Name *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteAssociationOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteAssociation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteAssociation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAssociation"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAssociation(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteAssociation",
|
||||
}
|
||||
}
|
||||
149
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go
generated
vendored
Normal file
149
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Deletes the Amazon Web Services Systems Manager document (SSM document) and all
|
||||
// managed node associations to the document. Before you delete the document, we
|
||||
// recommend that you use DeleteAssociation to disassociate all managed nodes that
|
||||
// are associated with the document.
|
||||
func (c *Client) DeleteDocument(ctx context.Context, params *DeleteDocumentInput, optFns ...func(*Options)) (*DeleteDocumentOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteDocumentInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteDocument", params, optFns, c.addOperationDeleteDocumentMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteDocumentOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteDocumentInput struct {
|
||||
|
||||
// The name of the document.
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// The version of the document that you want to delete. If not provided, all
|
||||
// versions of the document are deleted.
|
||||
DocumentVersion *string
|
||||
|
||||
// Some SSM document types require that you specify a Force flag before you can
|
||||
// delete the document. For example, you must specify a Force flag to delete a
|
||||
// document of type ApplicationConfigurationSchema . You can restrict access to the
|
||||
// Force flag in an Identity and Access Management (IAM) policy.
|
||||
Force bool
|
||||
|
||||
// The version name of the document that you want to delete. If not provided, all
|
||||
// versions of the document are deleted.
|
||||
VersionName *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteDocumentOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDocument{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDocument{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDocument"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteDocumentValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDocument(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteDocument(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteDocument",
|
||||
}
|
||||
}
|
||||
207
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go
generated
vendored
Normal file
207
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go
generated
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Delete a custom inventory type or the data associated with a custom Inventory
|
||||
// type. Deleting a custom inventory type is also referred to as deleting a custom
|
||||
// inventory schema.
|
||||
func (c *Client) DeleteInventory(ctx context.Context, params *DeleteInventoryInput, optFns ...func(*Options)) (*DeleteInventoryOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteInventoryInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteInventory", params, optFns, c.addOperationDeleteInventoryMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteInventoryOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteInventoryInput struct {
|
||||
|
||||
// The name of the custom inventory type for which you want to delete either all
|
||||
// previously collected data or the inventory type itself.
|
||||
//
|
||||
// This member is required.
|
||||
TypeName *string
|
||||
|
||||
// User-provided idempotency token.
|
||||
ClientToken *string
|
||||
|
||||
// Use this option to view a summary of the deletion request without deleting any
|
||||
// data or the data type. This option is useful when you only want to understand
|
||||
// what will be deleted. Once you validate that the data to be deleted is what you
|
||||
// intend to delete, you can run the same command without specifying the DryRun
|
||||
// option.
|
||||
DryRun bool
|
||||
|
||||
// Use the SchemaDeleteOption to delete a custom inventory type (schema). If you
|
||||
// don't choose this option, the system only deletes existing inventory data
|
||||
// associated with the custom inventory type. Choose one of the following options:
|
||||
// DisableSchema: If you choose this option, the system ignores all inventory data
|
||||
// for the specified version, and any earlier versions. To enable this schema
|
||||
// again, you must call the PutInventory operation for a version greater than the
|
||||
// disabled version. DeleteSchema: This option deletes the specified custom type
|
||||
// from the Inventory service. You can recreate the schema later, if you want.
|
||||
SchemaDeleteOption types.InventorySchemaDeleteOption
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteInventoryOutput struct {
|
||||
|
||||
// Every DeleteInventory operation is assigned a unique ID. This option returns a
|
||||
// unique ID. You can use this ID to query the status of a delete operation. This
|
||||
// option is useful for ensuring that a delete operation has completed before you
|
||||
// begin other operations.
|
||||
DeletionId *string
|
||||
|
||||
// A summary of the delete operation. For more information about this summary, see
|
||||
// Deleting custom inventory (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
DeletionSummary *types.InventoryDeletionSummary
|
||||
|
||||
// The name of the inventory data type specified in the request.
|
||||
TypeName *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteInventoryMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteInventory{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteInventory{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteInventory"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addIdempotencyToken_opDeleteInventoryMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteInventoryValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInventory(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type idempotencyToken_initializeOpDeleteInventory struct {
|
||||
tokenProvider IdempotencyTokenProvider
|
||||
}
|
||||
|
||||
func (*idempotencyToken_initializeOpDeleteInventory) ID() string {
|
||||
return "OperationIdempotencyTokenAutoFill"
|
||||
}
|
||||
|
||||
func (m *idempotencyToken_initializeOpDeleteInventory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
if m.tokenProvider == nil {
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*DeleteInventoryInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteInventoryInput ")
|
||||
}
|
||||
|
||||
if input.ClientToken == nil {
|
||||
t, err := m.tokenProvider.GetIdempotencyToken()
|
||||
if err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
input.ClientToken = &t
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
func addIdempotencyToken_opDeleteInventoryMiddleware(stack *middleware.Stack, cfg Options) error {
|
||||
return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteInventory{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteInventory(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteInventory",
|
||||
}
|
||||
}
|
||||
136
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go
generated
vendored
Normal file
136
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Deletes a maintenance window.
|
||||
func (c *Client) DeleteMaintenanceWindow(ctx context.Context, params *DeleteMaintenanceWindowInput, optFns ...func(*Options)) (*DeleteMaintenanceWindowOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteMaintenanceWindowInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteMaintenanceWindow", params, optFns, c.addOperationDeleteMaintenanceWindowMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteMaintenanceWindowOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteMaintenanceWindowInput struct {
|
||||
|
||||
// The ID of the maintenance window to delete.
|
||||
//
|
||||
// This member is required.
|
||||
WindowId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteMaintenanceWindowOutput struct {
|
||||
|
||||
// The ID of the deleted maintenance window.
|
||||
WindowId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMaintenanceWindow"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteMaintenanceWindowValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMaintenanceWindow(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteMaintenanceWindow",
|
||||
}
|
||||
}
|
||||
149
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go
generated
vendored
Normal file
149
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Delete an OpsItem. You must have permission in Identity and Access Management
|
||||
// (IAM) to delete an OpsItem. Note the following important information about this
|
||||
// operation.
|
||||
// - Deleting an OpsItem is irreversible. You can't restore a deleted OpsItem.
|
||||
// - This operation uses an eventual consistency model, which means the system
|
||||
// can take a few minutes to complete this operation. If you delete an OpsItem and
|
||||
// immediately call, for example, GetOpsItem , the deleted OpsItem might still
|
||||
// appear in the response.
|
||||
// - This operation is idempotent. The system doesn't throw an exception if you
|
||||
// repeatedly call this operation for the same OpsItem. If the first call is
|
||||
// successful, all additional calls return the same successful response as the
|
||||
// first call.
|
||||
// - This operation doesn't support cross-account calls. A delegated
|
||||
// administrator or management account can't delete OpsItems in other accounts,
|
||||
// even if OpsCenter has been set up for cross-account administration. For more
|
||||
// information about cross-account administration, see Setting up OpsCenter to
|
||||
// centrally manage OpsItems across accounts (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setting-up-cross-account.html)
|
||||
// in the Systems Manager User Guide.
|
||||
func (c *Client) DeleteOpsItem(ctx context.Context, params *DeleteOpsItemInput, optFns ...func(*Options)) (*DeleteOpsItemOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteOpsItemInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteOpsItem", params, optFns, c.addOperationDeleteOpsItemMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteOpsItemOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteOpsItemInput struct {
|
||||
|
||||
// The ID of the OpsItem that you want to delete.
|
||||
//
|
||||
// This member is required.
|
||||
OpsItemId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteOpsItemOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteOpsItemMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOpsItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOpsItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOpsItem"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteOpsItemValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOpsItem(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteOpsItem(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteOpsItem",
|
||||
}
|
||||
}
|
||||
132
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go
generated
vendored
Normal file
132
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Delete OpsMetadata related to an application.
|
||||
func (c *Client) DeleteOpsMetadata(ctx context.Context, params *DeleteOpsMetadataInput, optFns ...func(*Options)) (*DeleteOpsMetadataOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteOpsMetadataInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteOpsMetadata", params, optFns, c.addOperationDeleteOpsMetadataMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteOpsMetadataOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteOpsMetadataInput struct {
|
||||
|
||||
// The Amazon Resource Name (ARN) of an OpsMetadata Object to delete.
|
||||
//
|
||||
// This member is required.
|
||||
OpsMetadataArn *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteOpsMetadataOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteOpsMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOpsMetadata{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOpsMetadata{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOpsMetadata"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteOpsMetadataValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOpsMetadata(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteOpsMetadata",
|
||||
}
|
||||
}
|
||||
133
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go
generated
vendored
Normal file
133
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Delete a parameter from the system. After deleting a parameter, wait for at
|
||||
// least 30 seconds to create a parameter with the same name.
|
||||
func (c *Client) DeleteParameter(ctx context.Context, params *DeleteParameterInput, optFns ...func(*Options)) (*DeleteParameterOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteParameterInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteParameter", params, optFns, c.addOperationDeleteParameterMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteParameterOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteParameterInput struct {
|
||||
|
||||
// The name of the parameter to delete.
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteParameterOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteParameterMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteParameter{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteParameter{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteParameter"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteParameterValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteParameter(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteParameter(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteParameter",
|
||||
}
|
||||
}
|
||||
142
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go
generated
vendored
Normal file
142
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Delete a list of parameters. After deleting a parameter, wait for at least 30
|
||||
// seconds to create a parameter with the same name.
|
||||
func (c *Client) DeleteParameters(ctx context.Context, params *DeleteParametersInput, optFns ...func(*Options)) (*DeleteParametersOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteParametersInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteParameters", params, optFns, c.addOperationDeleteParametersMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteParametersOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteParametersInput struct {
|
||||
|
||||
// The names of the parameters to delete. After deleting a parameter, wait for at
|
||||
// least 30 seconds to create a parameter with the same name.
|
||||
//
|
||||
// This member is required.
|
||||
Names []string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteParametersOutput struct {
|
||||
|
||||
// The names of the deleted parameters.
|
||||
DeletedParameters []string
|
||||
|
||||
// The names of parameters that weren't deleted because the parameters aren't
|
||||
// valid.
|
||||
InvalidParameters []string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteParametersMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteParameters{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteParameters{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteParameters"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteParametersValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteParameters(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteParameters(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteParameters",
|
||||
}
|
||||
}
|
||||
136
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go
generated
vendored
Normal file
136
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Deletes a patch baseline.
|
||||
func (c *Client) DeletePatchBaseline(ctx context.Context, params *DeletePatchBaselineInput, optFns ...func(*Options)) (*DeletePatchBaselineOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeletePatchBaselineInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeletePatchBaseline", params, optFns, c.addOperationDeletePatchBaselineMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeletePatchBaselineOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeletePatchBaselineInput struct {
|
||||
|
||||
// The ID of the patch baseline to delete.
|
||||
//
|
||||
// This member is required.
|
||||
BaselineId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeletePatchBaselineOutput struct {
|
||||
|
||||
// The ID of the deleted patch baseline.
|
||||
BaselineId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeletePatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeletePatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeletePatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePatchBaseline"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeletePatchBaselineValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePatchBaseline(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeletePatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeletePatchBaseline",
|
||||
}
|
||||
}
|
||||
137
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go
generated
vendored
Normal file
137
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go
generated
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Deletes a resource data sync configuration. After the configuration is deleted,
|
||||
// changes to data on managed nodes are no longer synced to or from the target.
|
||||
// Deleting a sync configuration doesn't delete data.
|
||||
func (c *Client) DeleteResourceDataSync(ctx context.Context, params *DeleteResourceDataSyncInput, optFns ...func(*Options)) (*DeleteResourceDataSyncOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteResourceDataSyncInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteResourceDataSync", params, optFns, c.addOperationDeleteResourceDataSyncMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteResourceDataSyncOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteResourceDataSyncInput struct {
|
||||
|
||||
// The name of the configuration to delete.
|
||||
//
|
||||
// This member is required.
|
||||
SyncName *string
|
||||
|
||||
// Specify the type of resource data sync to delete.
|
||||
SyncType *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteResourceDataSyncOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteResourceDataSyncMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourceDataSync{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourceDataSync{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourceDataSync"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteResourceDataSyncValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourceDataSync(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteResourceDataSync(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteResourceDataSync",
|
||||
}
|
||||
}
|
||||
148
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go
generated
vendored
Normal file
148
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Deletes a Systems Manager resource policy. A resource policy helps you to
|
||||
// define the IAM entity (for example, an Amazon Web Services account) that can
|
||||
// manage your Systems Manager resources. Currently, OpsItemGroup is the only
|
||||
// resource that supports Systems Manager resource policies. The resource policy
|
||||
// for OpsItemGroup enables Amazon Web Services accounts to view and interact with
|
||||
// OpsCenter operational work items (OpsItems).
|
||||
func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteResourcePolicyInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteResourcePolicyOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeleteResourcePolicyInput struct {
|
||||
|
||||
// ID of the current policy version. The hash helps to prevent multiple calls from
|
||||
// attempting to overwrite a policy.
|
||||
//
|
||||
// This member is required.
|
||||
PolicyHash *string
|
||||
|
||||
// The policy ID.
|
||||
//
|
||||
// This member is required.
|
||||
PolicyId *string
|
||||
|
||||
// Amazon Resource Name (ARN) of the resource to which the policies are attached.
|
||||
//
|
||||
// This member is required.
|
||||
ResourceArn *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeleteResourcePolicyOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourcePolicy{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourcePolicy{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePolicy"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeleteResourcePolicy",
|
||||
}
|
||||
}
|
||||
135
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go
generated
vendored
Normal file
135
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Removes the server or virtual machine from the list of registered servers. You
|
||||
// can reregister the node again at any time. If you don't plan to use Run Command
|
||||
// on the server, we suggest uninstalling SSM Agent first.
|
||||
func (c *Client) DeregisterManagedInstance(ctx context.Context, params *DeregisterManagedInstanceInput, optFns ...func(*Options)) (*DeregisterManagedInstanceOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeregisterManagedInstanceInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeregisterManagedInstance", params, optFns, c.addOperationDeregisterManagedInstanceMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeregisterManagedInstanceOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeregisterManagedInstanceInput struct {
|
||||
|
||||
// The ID assigned to the managed node when you registered it using the activation
|
||||
// process.
|
||||
//
|
||||
// This member is required.
|
||||
InstanceId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeregisterManagedInstanceOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeregisterManagedInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterManagedInstance{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterManagedInstance{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterManagedInstance"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeregisterManagedInstanceValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterManagedInstance(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeregisterManagedInstance(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeregisterManagedInstance",
|
||||
}
|
||||
}
|
||||
144
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go
generated
vendored
Normal file
144
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go
generated
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Removes a patch group from a patch baseline.
|
||||
func (c *Client) DeregisterPatchBaselineForPatchGroup(ctx context.Context, params *DeregisterPatchBaselineForPatchGroupInput, optFns ...func(*Options)) (*DeregisterPatchBaselineForPatchGroupOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeregisterPatchBaselineForPatchGroupInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeregisterPatchBaselineForPatchGroup", params, optFns, c.addOperationDeregisterPatchBaselineForPatchGroupMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeregisterPatchBaselineForPatchGroupOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeregisterPatchBaselineForPatchGroupInput struct {
|
||||
|
||||
// The ID of the patch baseline to deregister the patch group from.
|
||||
//
|
||||
// This member is required.
|
||||
BaselineId *string
|
||||
|
||||
// The name of the patch group that should be deregistered from the patch baseline.
|
||||
//
|
||||
// This member is required.
|
||||
PatchGroup *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeregisterPatchBaselineForPatchGroupOutput struct {
|
||||
|
||||
// The ID of the patch baseline the patch group was deregistered from.
|
||||
BaselineId *string
|
||||
|
||||
// The name of the patch group deregistered from the patch baseline.
|
||||
PatchGroup *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeregisterPatchBaselineForPatchGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterPatchBaselineForPatchGroup{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterPatchBaselineForPatchGroup"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeregisterPatchBaselineForPatchGroupValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterPatchBaselineForPatchGroup(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeregisterPatchBaselineForPatchGroup(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeregisterPatchBaselineForPatchGroup",
|
||||
}
|
||||
}
|
||||
149
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go
generated
vendored
Normal file
149
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Removes a target from a maintenance window.
|
||||
func (c *Client) DeregisterTargetFromMaintenanceWindow(ctx context.Context, params *DeregisterTargetFromMaintenanceWindowInput, optFns ...func(*Options)) (*DeregisterTargetFromMaintenanceWindowOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeregisterTargetFromMaintenanceWindowInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeregisterTargetFromMaintenanceWindow", params, optFns, c.addOperationDeregisterTargetFromMaintenanceWindowMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeregisterTargetFromMaintenanceWindowOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeregisterTargetFromMaintenanceWindowInput struct {
|
||||
|
||||
// The ID of the maintenance window the target should be removed from.
|
||||
//
|
||||
// This member is required.
|
||||
WindowId *string
|
||||
|
||||
// The ID of the target definition to remove.
|
||||
//
|
||||
// This member is required.
|
||||
WindowTargetId *string
|
||||
|
||||
// The system checks if the target is being referenced by a task. If the target is
|
||||
// being referenced, the system returns an error and doesn't deregister the target
|
||||
// from the maintenance window.
|
||||
Safe *bool
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeregisterTargetFromMaintenanceWindowOutput struct {
|
||||
|
||||
// The ID of the maintenance window the target was removed from.
|
||||
WindowId *string
|
||||
|
||||
// The ID of the removed target definition.
|
||||
WindowTargetId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeregisterTargetFromMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterTargetFromMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterTargetFromMaintenanceWindow"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeregisterTargetFromMaintenanceWindowValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterTargetFromMaintenanceWindow(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeregisterTargetFromMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeregisterTargetFromMaintenanceWindow",
|
||||
}
|
||||
}
|
||||
144
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go
generated
vendored
Normal file
144
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go
generated
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Removes a task from a maintenance window.
|
||||
func (c *Client) DeregisterTaskFromMaintenanceWindow(ctx context.Context, params *DeregisterTaskFromMaintenanceWindowInput, optFns ...func(*Options)) (*DeregisterTaskFromMaintenanceWindowOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeregisterTaskFromMaintenanceWindowInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeregisterTaskFromMaintenanceWindow", params, optFns, c.addOperationDeregisterTaskFromMaintenanceWindowMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeregisterTaskFromMaintenanceWindowOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DeregisterTaskFromMaintenanceWindowInput struct {
|
||||
|
||||
// The ID of the maintenance window the task should be removed from.
|
||||
//
|
||||
// This member is required.
|
||||
WindowId *string
|
||||
|
||||
// The ID of the task to remove from the maintenance window.
|
||||
//
|
||||
// This member is required.
|
||||
WindowTaskId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DeregisterTaskFromMaintenanceWindowOutput struct {
|
||||
|
||||
// The ID of the maintenance window the task was removed from.
|
||||
WindowId *string
|
||||
|
||||
// The ID of the task removed from the maintenance window.
|
||||
WindowTaskId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeregisterTaskFromMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterTaskFromMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterTaskFromMaintenanceWindow"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeregisterTaskFromMaintenanceWindowValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterTaskFromMaintenanceWindow(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDeregisterTaskFromMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DeregisterTaskFromMaintenanceWindow",
|
||||
}
|
||||
}
|
||||
238
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go
generated
vendored
Normal file
238
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go
generated
vendored
Normal file
@@ -0,0 +1,238 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Describes details about the activation, such as the date and time the
|
||||
// activation was created, its expiration date, the Identity and Access Management
|
||||
// (IAM) role assigned to the managed nodes in the activation, and the number of
|
||||
// nodes registered by using this activation.
|
||||
func (c *Client) DescribeActivations(ctx context.Context, params *DescribeActivationsInput, optFns ...func(*Options)) (*DescribeActivationsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeActivationsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeActivations", params, optFns, c.addOperationDescribeActivationsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeActivationsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeActivationsInput struct {
|
||||
|
||||
// A filter to view information about your activations.
|
||||
Filters []types.DescribeActivationsFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeActivationsOutput struct {
|
||||
|
||||
// A list of activations for your Amazon Web Services account.
|
||||
ActivationList []types.Activation
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeActivationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeActivations{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeActivations{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeActivations"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeActivations(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeActivationsAPIClient is a client that implements the
|
||||
// DescribeActivations operation.
|
||||
type DescribeActivationsAPIClient interface {
|
||||
DescribeActivations(context.Context, *DescribeActivationsInput, ...func(*Options)) (*DescribeActivationsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeActivationsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeActivationsPaginatorOptions is the paginator options for
|
||||
// DescribeActivations
|
||||
type DescribeActivationsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeActivationsPaginator is a paginator for DescribeActivations
|
||||
type DescribeActivationsPaginator struct {
|
||||
options DescribeActivationsPaginatorOptions
|
||||
client DescribeActivationsAPIClient
|
||||
params *DescribeActivationsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeActivationsPaginator returns a new DescribeActivationsPaginator
|
||||
func NewDescribeActivationsPaginator(client DescribeActivationsAPIClient, params *DescribeActivationsInput, optFns ...func(*DescribeActivationsPaginatorOptions)) *DescribeActivationsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeActivationsInput{}
|
||||
}
|
||||
|
||||
options := DescribeActivationsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeActivationsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeActivationsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeActivations page.
|
||||
func (p *DescribeActivationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeActivationsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeActivations(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeActivations(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeActivations",
|
||||
}
|
||||
}
|
||||
146
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go
generated
vendored
Normal file
146
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go
generated
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Describes the association for the specified target or managed node. If you
|
||||
// created the association by using the Targets parameter, then you must retrieve
|
||||
// the association by using the association ID.
|
||||
func (c *Client) DescribeAssociation(ctx context.Context, params *DescribeAssociationInput, optFns ...func(*Options)) (*DescribeAssociationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeAssociationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeAssociation", params, optFns, c.addOperationDescribeAssociationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeAssociationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeAssociationInput struct {
|
||||
|
||||
// The association ID for which you want information.
|
||||
AssociationId *string
|
||||
|
||||
// Specify the association version to retrieve. To view the latest version, either
|
||||
// specify $LATEST for this parameter, or omit this parameter. To view a list of
|
||||
// all associations for a managed node, use ListAssociations . To get a list of
|
||||
// versions for a specific association, use ListAssociationVersions .
|
||||
AssociationVersion *string
|
||||
|
||||
// The managed node ID.
|
||||
InstanceId *string
|
||||
|
||||
// The name of the SSM document.
|
||||
Name *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeAssociationOutput struct {
|
||||
|
||||
// Information about the association.
|
||||
AssociationDescription *types.AssociationDescription
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAssociation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAssociation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAssociation"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAssociation(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeAssociation",
|
||||
}
|
||||
}
|
||||
252
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go
generated
vendored
Normal file
252
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go
generated
vendored
Normal file
@@ -0,0 +1,252 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Views information about a specific execution of a specific association.
|
||||
func (c *Client) DescribeAssociationExecutionTargets(ctx context.Context, params *DescribeAssociationExecutionTargetsInput, optFns ...func(*Options)) (*DescribeAssociationExecutionTargetsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeAssociationExecutionTargetsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeAssociationExecutionTargets", params, optFns, c.addOperationDescribeAssociationExecutionTargetsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeAssociationExecutionTargetsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeAssociationExecutionTargetsInput struct {
|
||||
|
||||
// The association ID that includes the execution for which you want to view
|
||||
// details.
|
||||
//
|
||||
// This member is required.
|
||||
AssociationId *string
|
||||
|
||||
// The execution ID for which you want to view details.
|
||||
//
|
||||
// This member is required.
|
||||
ExecutionId *string
|
||||
|
||||
// Filters for the request. You can specify the following filters and values.
|
||||
// Status (EQUAL) ResourceId (EQUAL) ResourceType (EQUAL)
|
||||
Filters []types.AssociationExecutionTargetsFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeAssociationExecutionTargetsOutput struct {
|
||||
|
||||
// Information about the execution.
|
||||
AssociationExecutionTargets []types.AssociationExecutionTarget
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeAssociationExecutionTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAssociationExecutionTargets{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAssociationExecutionTargets{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAssociationExecutionTargets"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeAssociationExecutionTargetsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAssociationExecutionTargets(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeAssociationExecutionTargetsAPIClient is a client that implements the
|
||||
// DescribeAssociationExecutionTargets operation.
|
||||
type DescribeAssociationExecutionTargetsAPIClient interface {
|
||||
DescribeAssociationExecutionTargets(context.Context, *DescribeAssociationExecutionTargetsInput, ...func(*Options)) (*DescribeAssociationExecutionTargetsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeAssociationExecutionTargetsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeAssociationExecutionTargetsPaginatorOptions is the paginator options
|
||||
// for DescribeAssociationExecutionTargets
|
||||
type DescribeAssociationExecutionTargetsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeAssociationExecutionTargetsPaginator is a paginator for
|
||||
// DescribeAssociationExecutionTargets
|
||||
type DescribeAssociationExecutionTargetsPaginator struct {
|
||||
options DescribeAssociationExecutionTargetsPaginatorOptions
|
||||
client DescribeAssociationExecutionTargetsAPIClient
|
||||
params *DescribeAssociationExecutionTargetsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeAssociationExecutionTargetsPaginator returns a new
|
||||
// DescribeAssociationExecutionTargetsPaginator
|
||||
func NewDescribeAssociationExecutionTargetsPaginator(client DescribeAssociationExecutionTargetsAPIClient, params *DescribeAssociationExecutionTargetsInput, optFns ...func(*DescribeAssociationExecutionTargetsPaginatorOptions)) *DescribeAssociationExecutionTargetsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeAssociationExecutionTargetsInput{}
|
||||
}
|
||||
|
||||
options := DescribeAssociationExecutionTargetsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeAssociationExecutionTargetsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeAssociationExecutionTargetsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeAssociationExecutionTargets page.
|
||||
func (p *DescribeAssociationExecutionTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAssociationExecutionTargetsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeAssociationExecutionTargets(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeAssociationExecutionTargets(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeAssociationExecutionTargets",
|
||||
}
|
||||
}
|
||||
246
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go
generated
vendored
Normal file
246
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go
generated
vendored
Normal file
@@ -0,0 +1,246 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Views all executions for a specific association ID.
|
||||
func (c *Client) DescribeAssociationExecutions(ctx context.Context, params *DescribeAssociationExecutionsInput, optFns ...func(*Options)) (*DescribeAssociationExecutionsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeAssociationExecutionsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeAssociationExecutions", params, optFns, c.addOperationDescribeAssociationExecutionsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeAssociationExecutionsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeAssociationExecutionsInput struct {
|
||||
|
||||
// The association ID for which you want to view execution history details.
|
||||
//
|
||||
// This member is required.
|
||||
AssociationId *string
|
||||
|
||||
// Filters for the request. You can specify the following filters and values.
|
||||
// ExecutionId (EQUAL) Status (EQUAL) CreatedTime (EQUAL, GREATER_THAN, LESS_THAN)
|
||||
Filters []types.AssociationExecutionFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeAssociationExecutionsOutput struct {
|
||||
|
||||
// A list of the executions for the specified association ID.
|
||||
AssociationExecutions []types.AssociationExecution
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeAssociationExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAssociationExecutions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAssociationExecutions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAssociationExecutions"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeAssociationExecutionsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAssociationExecutions(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeAssociationExecutionsAPIClient is a client that implements the
|
||||
// DescribeAssociationExecutions operation.
|
||||
type DescribeAssociationExecutionsAPIClient interface {
|
||||
DescribeAssociationExecutions(context.Context, *DescribeAssociationExecutionsInput, ...func(*Options)) (*DescribeAssociationExecutionsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeAssociationExecutionsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeAssociationExecutionsPaginatorOptions is the paginator options for
|
||||
// DescribeAssociationExecutions
|
||||
type DescribeAssociationExecutionsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeAssociationExecutionsPaginator is a paginator for
|
||||
// DescribeAssociationExecutions
|
||||
type DescribeAssociationExecutionsPaginator struct {
|
||||
options DescribeAssociationExecutionsPaginatorOptions
|
||||
client DescribeAssociationExecutionsAPIClient
|
||||
params *DescribeAssociationExecutionsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeAssociationExecutionsPaginator returns a new
|
||||
// DescribeAssociationExecutionsPaginator
|
||||
func NewDescribeAssociationExecutionsPaginator(client DescribeAssociationExecutionsAPIClient, params *DescribeAssociationExecutionsInput, optFns ...func(*DescribeAssociationExecutionsPaginatorOptions)) *DescribeAssociationExecutionsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeAssociationExecutionsInput{}
|
||||
}
|
||||
|
||||
options := DescribeAssociationExecutionsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeAssociationExecutionsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeAssociationExecutionsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeAssociationExecutions page.
|
||||
func (p *DescribeAssociationExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAssociationExecutionsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeAssociationExecutions(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeAssociationExecutions(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeAssociationExecutions",
|
||||
}
|
||||
}
|
||||
242
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go
generated
vendored
Normal file
242
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go
generated
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Provides details about all active and terminated Automation executions.
|
||||
func (c *Client) DescribeAutomationExecutions(ctx context.Context, params *DescribeAutomationExecutionsInput, optFns ...func(*Options)) (*DescribeAutomationExecutionsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeAutomationExecutionsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeAutomationExecutions", params, optFns, c.addOperationDescribeAutomationExecutionsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeAutomationExecutionsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeAutomationExecutionsInput struct {
|
||||
|
||||
// Filters used to limit the scope of executions that are requested.
|
||||
Filters []types.AutomationExecutionFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeAutomationExecutionsOutput struct {
|
||||
|
||||
// The list of details about each automation execution which has occurred which
|
||||
// matches the filter specification, if any.
|
||||
AutomationExecutionMetadataList []types.AutomationExecutionMetadata
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeAutomationExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAutomationExecutions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAutomationExecutions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAutomationExecutions"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeAutomationExecutionsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAutomationExecutions(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeAutomationExecutionsAPIClient is a client that implements the
|
||||
// DescribeAutomationExecutions operation.
|
||||
type DescribeAutomationExecutionsAPIClient interface {
|
||||
DescribeAutomationExecutions(context.Context, *DescribeAutomationExecutionsInput, ...func(*Options)) (*DescribeAutomationExecutionsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeAutomationExecutionsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeAutomationExecutionsPaginatorOptions is the paginator options for
|
||||
// DescribeAutomationExecutions
|
||||
type DescribeAutomationExecutionsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeAutomationExecutionsPaginator is a paginator for
|
||||
// DescribeAutomationExecutions
|
||||
type DescribeAutomationExecutionsPaginator struct {
|
||||
options DescribeAutomationExecutionsPaginatorOptions
|
||||
client DescribeAutomationExecutionsAPIClient
|
||||
params *DescribeAutomationExecutionsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeAutomationExecutionsPaginator returns a new
|
||||
// DescribeAutomationExecutionsPaginator
|
||||
func NewDescribeAutomationExecutionsPaginator(client DescribeAutomationExecutionsAPIClient, params *DescribeAutomationExecutionsInput, optFns ...func(*DescribeAutomationExecutionsPaginatorOptions)) *DescribeAutomationExecutionsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeAutomationExecutionsInput{}
|
||||
}
|
||||
|
||||
options := DescribeAutomationExecutionsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeAutomationExecutionsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeAutomationExecutionsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeAutomationExecutions page.
|
||||
func (p *DescribeAutomationExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAutomationExecutionsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeAutomationExecutions(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeAutomationExecutions(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeAutomationExecutions",
|
||||
}
|
||||
}
|
||||
253
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go
generated
vendored
Normal file
253
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go
generated
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Information about all active and terminated step executions in an Automation
|
||||
// workflow.
|
||||
func (c *Client) DescribeAutomationStepExecutions(ctx context.Context, params *DescribeAutomationStepExecutionsInput, optFns ...func(*Options)) (*DescribeAutomationStepExecutionsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeAutomationStepExecutionsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeAutomationStepExecutions", params, optFns, c.addOperationDescribeAutomationStepExecutionsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeAutomationStepExecutionsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeAutomationStepExecutionsInput struct {
|
||||
|
||||
// The Automation execution ID for which you want step execution descriptions.
|
||||
//
|
||||
// This member is required.
|
||||
AutomationExecutionId *string
|
||||
|
||||
// One or more filters to limit the number of step executions returned by the
|
||||
// request.
|
||||
Filters []types.StepExecutionFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
// Indicates whether to list step executions in reverse order by start time. The
|
||||
// default value is 'false'.
|
||||
ReverseOrder *bool
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeAutomationStepExecutionsOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// A list of details about the current state of all steps that make up an
|
||||
// execution.
|
||||
StepExecutions []types.StepExecution
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeAutomationStepExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAutomationStepExecutions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAutomationStepExecutions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAutomationStepExecutions"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeAutomationStepExecutionsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAutomationStepExecutions(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeAutomationStepExecutionsAPIClient is a client that implements the
|
||||
// DescribeAutomationStepExecutions operation.
|
||||
type DescribeAutomationStepExecutionsAPIClient interface {
|
||||
DescribeAutomationStepExecutions(context.Context, *DescribeAutomationStepExecutionsInput, ...func(*Options)) (*DescribeAutomationStepExecutionsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeAutomationStepExecutionsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeAutomationStepExecutionsPaginatorOptions is the paginator options for
|
||||
// DescribeAutomationStepExecutions
|
||||
type DescribeAutomationStepExecutionsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeAutomationStepExecutionsPaginator is a paginator for
|
||||
// DescribeAutomationStepExecutions
|
||||
type DescribeAutomationStepExecutionsPaginator struct {
|
||||
options DescribeAutomationStepExecutionsPaginatorOptions
|
||||
client DescribeAutomationStepExecutionsAPIClient
|
||||
params *DescribeAutomationStepExecutionsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeAutomationStepExecutionsPaginator returns a new
|
||||
// DescribeAutomationStepExecutionsPaginator
|
||||
func NewDescribeAutomationStepExecutionsPaginator(client DescribeAutomationStepExecutionsAPIClient, params *DescribeAutomationStepExecutionsInput, optFns ...func(*DescribeAutomationStepExecutionsPaginatorOptions)) *DescribeAutomationStepExecutionsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeAutomationStepExecutionsInput{}
|
||||
}
|
||||
|
||||
options := DescribeAutomationStepExecutionsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeAutomationStepExecutionsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeAutomationStepExecutionsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeAutomationStepExecutions page.
|
||||
func (p *DescribeAutomationStepExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAutomationStepExecutionsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeAutomationStepExecutions(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeAutomationStepExecutions(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeAutomationStepExecutions",
|
||||
}
|
||||
}
|
||||
263
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go
generated
vendored
Normal file
263
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go
generated
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists all patches eligible to be included in a patch baseline.
|
||||
func (c *Client) DescribeAvailablePatches(ctx context.Context, params *DescribeAvailablePatchesInput, optFns ...func(*Options)) (*DescribeAvailablePatchesOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeAvailablePatchesInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeAvailablePatches", params, optFns, c.addOperationDescribeAvailablePatchesMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeAvailablePatchesOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeAvailablePatchesInput struct {
|
||||
|
||||
// Each element in the array is a structure containing a key-value pair. Windows
|
||||
// Server Supported keys for Windows Server managed node patches include the
|
||||
// following:
|
||||
// - PATCH_SET Sample values: OS | APPLICATION
|
||||
// - PRODUCT Sample values: WindowsServer2012 | Office 2010 |
|
||||
// MicrosoftDefenderAntivirus
|
||||
// - PRODUCT_FAMILY Sample values: Windows | Office
|
||||
// - MSRC_SEVERITY Sample values: ServicePacks | Important | Moderate
|
||||
// - CLASSIFICATION Sample values: ServicePacks | SecurityUpdates |
|
||||
// DefinitionUpdates
|
||||
// - PATCH_ID Sample values: KB123456 | KB4516046
|
||||
// Linux When specifying filters for Linux patches, you must specify a key-pair
|
||||
// for PRODUCT . For example, using the Command Line Interface (CLI), the following
|
||||
// command fails: aws ssm describe-available-patches --filters
|
||||
// Key=CVE_ID,Values=CVE-2018-3615 However, the following command succeeds: aws
|
||||
// ssm describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03
|
||||
// Key=CVE_ID,Values=CVE-2018-3615 Supported keys for Linux managed node patches
|
||||
// include the following:
|
||||
// - PRODUCT Sample values: AmazonLinux2018.03 | AmazonLinux2.0
|
||||
// - NAME Sample values: kernel-headers | samba-python | php
|
||||
// - SEVERITY Sample values: Critical | Important | Medium | Low
|
||||
// - EPOCH Sample values: 0 | 1
|
||||
// - VERSION Sample values: 78.6.1 | 4.10.16
|
||||
// - RELEASE Sample values: 9.56.amzn1 | 1.amzn2
|
||||
// - ARCH Sample values: i686 | x86_64
|
||||
// - REPOSITORY Sample values: Core | Updates
|
||||
// - ADVISORY_ID Sample values: ALAS-2018-1058 | ALAS2-2021-1594
|
||||
// - CVE_ID Sample values: CVE-2018-3615 | CVE-2020-1472
|
||||
// - BUGZILLA_ID Sample values: 1463241
|
||||
Filters []types.PatchOrchestratorFilter
|
||||
|
||||
// The maximum number of patches to return (per page).
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeAvailablePatchesOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// An array of patches. Each entry in the array is a patch structure.
|
||||
Patches []types.Patch
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeAvailablePatchesMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAvailablePatches{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAvailablePatches{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAvailablePatches"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAvailablePatches(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeAvailablePatchesAPIClient is a client that implements the
|
||||
// DescribeAvailablePatches operation.
|
||||
type DescribeAvailablePatchesAPIClient interface {
|
||||
DescribeAvailablePatches(context.Context, *DescribeAvailablePatchesInput, ...func(*Options)) (*DescribeAvailablePatchesOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeAvailablePatchesAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeAvailablePatchesPaginatorOptions is the paginator options for
|
||||
// DescribeAvailablePatches
|
||||
type DescribeAvailablePatchesPaginatorOptions struct {
|
||||
// The maximum number of patches to return (per page).
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeAvailablePatchesPaginator is a paginator for DescribeAvailablePatches
|
||||
type DescribeAvailablePatchesPaginator struct {
|
||||
options DescribeAvailablePatchesPaginatorOptions
|
||||
client DescribeAvailablePatchesAPIClient
|
||||
params *DescribeAvailablePatchesInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeAvailablePatchesPaginator returns a new
|
||||
// DescribeAvailablePatchesPaginator
|
||||
func NewDescribeAvailablePatchesPaginator(client DescribeAvailablePatchesAPIClient, params *DescribeAvailablePatchesInput, optFns ...func(*DescribeAvailablePatchesPaginatorOptions)) *DescribeAvailablePatchesPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeAvailablePatchesInput{}
|
||||
}
|
||||
|
||||
options := DescribeAvailablePatchesPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeAvailablePatchesPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeAvailablePatchesPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeAvailablePatches page.
|
||||
func (p *DescribeAvailablePatchesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAvailablePatchesOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeAvailablePatches(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeAvailablePatches(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeAvailablePatches",
|
||||
}
|
||||
}
|
||||
147
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go
generated
vendored
Normal file
147
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Describes the specified Amazon Web Services Systems Manager document (SSM
|
||||
// document).
|
||||
func (c *Client) DescribeDocument(ctx context.Context, params *DescribeDocumentInput, optFns ...func(*Options)) (*DescribeDocumentOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeDocumentInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeDocument", params, optFns, c.addOperationDescribeDocumentMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeDocumentOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeDocumentInput struct {
|
||||
|
||||
// The name of the SSM document.
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// The document version for which you want information. Can be a specific version
|
||||
// or the default version.
|
||||
DocumentVersion *string
|
||||
|
||||
// An optional field specifying the version of the artifact associated with the
|
||||
// document. For example, "Release 12, Update 6". This value is unique across all
|
||||
// versions of a document, and can't be changed.
|
||||
VersionName *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeDocumentOutput struct {
|
||||
|
||||
// Information about the SSM document.
|
||||
Document *types.DocumentDescription
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeDocument{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeDocument{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDocument"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeDocumentValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDocument(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeDocument(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeDocument",
|
||||
}
|
||||
}
|
||||
162
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go
generated
vendored
Normal file
162
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go
generated
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Describes the permissions for a Amazon Web Services Systems Manager document
|
||||
// (SSM document). If you created the document, you are the owner. If a document is
|
||||
// shared, it can either be shared privately (by specifying a user's Amazon Web
|
||||
// Services account ID) or publicly (All).
|
||||
func (c *Client) DescribeDocumentPermission(ctx context.Context, params *DescribeDocumentPermissionInput, optFns ...func(*Options)) (*DescribeDocumentPermissionOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeDocumentPermissionInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeDocumentPermission", params, optFns, c.addOperationDescribeDocumentPermissionMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeDocumentPermissionOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeDocumentPermissionInput struct {
|
||||
|
||||
// The name of the document for which you are the owner.
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// The permission type for the document. The permission type can be Share.
|
||||
//
|
||||
// This member is required.
|
||||
PermissionType types.DocumentPermissionType
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeDocumentPermissionOutput struct {
|
||||
|
||||
// The account IDs that have permission to use this document. The ID can be either
|
||||
// an Amazon Web Services account or All.
|
||||
AccountIds []string
|
||||
|
||||
// A list of Amazon Web Services accounts where the current document is shared and
|
||||
// the version shared with each account.
|
||||
AccountSharingInfoList []types.AccountSharingInfo
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeDocumentPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeDocumentPermission{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeDocumentPermission{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDocumentPermission"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeDocumentPermissionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDocumentPermission(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeDocumentPermission(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeDocumentPermission",
|
||||
}
|
||||
}
|
||||
243
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go
generated
vendored
Normal file
243
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go
generated
vendored
Normal file
@@ -0,0 +1,243 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// All associations for the managed node(s).
|
||||
func (c *Client) DescribeEffectiveInstanceAssociations(ctx context.Context, params *DescribeEffectiveInstanceAssociationsInput, optFns ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeEffectiveInstanceAssociationsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeEffectiveInstanceAssociations", params, optFns, c.addOperationDescribeEffectiveInstanceAssociationsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeEffectiveInstanceAssociationsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeEffectiveInstanceAssociationsInput struct {
|
||||
|
||||
// The managed node ID for which you want to view all associations.
|
||||
//
|
||||
// This member is required.
|
||||
InstanceId *string
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeEffectiveInstanceAssociationsOutput struct {
|
||||
|
||||
// The associations for the requested managed node.
|
||||
Associations []types.InstanceAssociation
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeEffectiveInstanceAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeEffectiveInstanceAssociations{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeEffectiveInstanceAssociations"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeEffectiveInstanceAssociationsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEffectiveInstanceAssociations(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeEffectiveInstanceAssociationsAPIClient is a client that implements the
|
||||
// DescribeEffectiveInstanceAssociations operation.
|
||||
type DescribeEffectiveInstanceAssociationsAPIClient interface {
|
||||
DescribeEffectiveInstanceAssociations(context.Context, *DescribeEffectiveInstanceAssociationsInput, ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeEffectiveInstanceAssociationsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeEffectiveInstanceAssociationsPaginatorOptions is the paginator options
|
||||
// for DescribeEffectiveInstanceAssociations
|
||||
type DescribeEffectiveInstanceAssociationsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeEffectiveInstanceAssociationsPaginator is a paginator for
|
||||
// DescribeEffectiveInstanceAssociations
|
||||
type DescribeEffectiveInstanceAssociationsPaginator struct {
|
||||
options DescribeEffectiveInstanceAssociationsPaginatorOptions
|
||||
client DescribeEffectiveInstanceAssociationsAPIClient
|
||||
params *DescribeEffectiveInstanceAssociationsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeEffectiveInstanceAssociationsPaginator returns a new
|
||||
// DescribeEffectiveInstanceAssociationsPaginator
|
||||
func NewDescribeEffectiveInstanceAssociationsPaginator(client DescribeEffectiveInstanceAssociationsAPIClient, params *DescribeEffectiveInstanceAssociationsInput, optFns ...func(*DescribeEffectiveInstanceAssociationsPaginatorOptions)) *DescribeEffectiveInstanceAssociationsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeEffectiveInstanceAssociationsInput{}
|
||||
}
|
||||
|
||||
options := DescribeEffectiveInstanceAssociationsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeEffectiveInstanceAssociationsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeEffectiveInstanceAssociationsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeEffectiveInstanceAssociations page.
|
||||
func (p *DescribeEffectiveInstanceAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeEffectiveInstanceAssociations(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeEffectiveInstanceAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeEffectiveInstanceAssociations",
|
||||
}
|
||||
}
|
||||
242
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go
generated
vendored
Normal file
242
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go
generated
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the current effective patches (the patch and the approval state) for
|
||||
// the specified patch baseline. Applies to patch baselines for Windows only.
|
||||
func (c *Client) DescribeEffectivePatchesForPatchBaseline(ctx context.Context, params *DescribeEffectivePatchesForPatchBaselineInput, optFns ...func(*Options)) (*DescribeEffectivePatchesForPatchBaselineOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeEffectivePatchesForPatchBaselineInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeEffectivePatchesForPatchBaseline", params, optFns, c.addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeEffectivePatchesForPatchBaselineOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeEffectivePatchesForPatchBaselineInput struct {
|
||||
|
||||
// The ID of the patch baseline to retrieve the effective patches for.
|
||||
//
|
||||
// This member is required.
|
||||
BaselineId *string
|
||||
|
||||
// The maximum number of patches to return (per page).
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeEffectivePatchesForPatchBaselineOutput struct {
|
||||
|
||||
// An array of patches and patch status.
|
||||
EffectivePatches []types.EffectivePatch
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeEffectivePatchesForPatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeEffectivePatchesForPatchBaseline"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeEffectivePatchesForPatchBaselineValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEffectivePatchesForPatchBaseline(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeEffectivePatchesForPatchBaselineAPIClient is a client that implements
|
||||
// the DescribeEffectivePatchesForPatchBaseline operation.
|
||||
type DescribeEffectivePatchesForPatchBaselineAPIClient interface {
|
||||
DescribeEffectivePatchesForPatchBaseline(context.Context, *DescribeEffectivePatchesForPatchBaselineInput, ...func(*Options)) (*DescribeEffectivePatchesForPatchBaselineOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeEffectivePatchesForPatchBaselineAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeEffectivePatchesForPatchBaselinePaginatorOptions is the paginator
|
||||
// options for DescribeEffectivePatchesForPatchBaseline
|
||||
type DescribeEffectivePatchesForPatchBaselinePaginatorOptions struct {
|
||||
// The maximum number of patches to return (per page).
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeEffectivePatchesForPatchBaselinePaginator is a paginator for
|
||||
// DescribeEffectivePatchesForPatchBaseline
|
||||
type DescribeEffectivePatchesForPatchBaselinePaginator struct {
|
||||
options DescribeEffectivePatchesForPatchBaselinePaginatorOptions
|
||||
client DescribeEffectivePatchesForPatchBaselineAPIClient
|
||||
params *DescribeEffectivePatchesForPatchBaselineInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeEffectivePatchesForPatchBaselinePaginator returns a new
|
||||
// DescribeEffectivePatchesForPatchBaselinePaginator
|
||||
func NewDescribeEffectivePatchesForPatchBaselinePaginator(client DescribeEffectivePatchesForPatchBaselineAPIClient, params *DescribeEffectivePatchesForPatchBaselineInput, optFns ...func(*DescribeEffectivePatchesForPatchBaselinePaginatorOptions)) *DescribeEffectivePatchesForPatchBaselinePaginator {
|
||||
if params == nil {
|
||||
params = &DescribeEffectivePatchesForPatchBaselineInput{}
|
||||
}
|
||||
|
||||
options := DescribeEffectivePatchesForPatchBaselinePaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeEffectivePatchesForPatchBaselinePaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeEffectivePatchesForPatchBaselinePaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeEffectivePatchesForPatchBaseline page.
|
||||
func (p *DescribeEffectivePatchesForPatchBaselinePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEffectivePatchesForPatchBaselineOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeEffectivePatchesForPatchBaseline(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeEffectivePatchesForPatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeEffectivePatchesForPatchBaseline",
|
||||
}
|
||||
}
|
||||
243
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go
generated
vendored
Normal file
243
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go
generated
vendored
Normal file
@@ -0,0 +1,243 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// The status of the associations for the managed node(s).
|
||||
func (c *Client) DescribeInstanceAssociationsStatus(ctx context.Context, params *DescribeInstanceAssociationsStatusInput, optFns ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeInstanceAssociationsStatusInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceAssociationsStatus", params, optFns, c.addOperationDescribeInstanceAssociationsStatusMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeInstanceAssociationsStatusOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeInstanceAssociationsStatusInput struct {
|
||||
|
||||
// The managed node IDs for which you want association status information.
|
||||
//
|
||||
// This member is required.
|
||||
InstanceId *string
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeInstanceAssociationsStatusOutput struct {
|
||||
|
||||
// Status information about the association.
|
||||
InstanceAssociationStatusInfos []types.InstanceAssociationStatusInfo
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeInstanceAssociationsStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstanceAssociationsStatus{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceAssociationsStatus"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeInstanceAssociationsStatusValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceAssociationsStatus(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeInstanceAssociationsStatusAPIClient is a client that implements the
|
||||
// DescribeInstanceAssociationsStatus operation.
|
||||
type DescribeInstanceAssociationsStatusAPIClient interface {
|
||||
DescribeInstanceAssociationsStatus(context.Context, *DescribeInstanceAssociationsStatusInput, ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeInstanceAssociationsStatusAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeInstanceAssociationsStatusPaginatorOptions is the paginator options for
|
||||
// DescribeInstanceAssociationsStatus
|
||||
type DescribeInstanceAssociationsStatusPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeInstanceAssociationsStatusPaginator is a paginator for
|
||||
// DescribeInstanceAssociationsStatus
|
||||
type DescribeInstanceAssociationsStatusPaginator struct {
|
||||
options DescribeInstanceAssociationsStatusPaginatorOptions
|
||||
client DescribeInstanceAssociationsStatusAPIClient
|
||||
params *DescribeInstanceAssociationsStatusInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeInstanceAssociationsStatusPaginator returns a new
|
||||
// DescribeInstanceAssociationsStatusPaginator
|
||||
func NewDescribeInstanceAssociationsStatusPaginator(client DescribeInstanceAssociationsStatusAPIClient, params *DescribeInstanceAssociationsStatusInput, optFns ...func(*DescribeInstanceAssociationsStatusPaginatorOptions)) *DescribeInstanceAssociationsStatusPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeInstanceAssociationsStatusInput{}
|
||||
}
|
||||
|
||||
options := DescribeInstanceAssociationsStatusPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeInstanceAssociationsStatusPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeInstanceAssociationsStatusPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeInstanceAssociationsStatus page.
|
||||
func (p *DescribeInstanceAssociationsStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeInstanceAssociationsStatus(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeInstanceAssociationsStatus(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeInstanceAssociationsStatus",
|
||||
}
|
||||
}
|
||||
261
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go
generated
vendored
Normal file
261
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go
generated
vendored
Normal file
@@ -0,0 +1,261 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Provides information about one or more of your managed nodes, including the
|
||||
// operating system platform, SSM Agent version, association status, and IP
|
||||
// address. This operation does not return information for nodes that are either
|
||||
// Stopped or Terminated. If you specify one or more node IDs, the operation
|
||||
// returns information for those managed nodes. If you don't specify node IDs, it
|
||||
// returns information for all your managed nodes. If you specify a node ID that
|
||||
// isn't valid or a node that you don't own, you receive an error. The IamRole
|
||||
// field returned for this API operation is the Identity and Access Management
|
||||
// (IAM) role assigned to on-premises managed nodes. This operation does not return
|
||||
// the IAM role for EC2 instances.
|
||||
func (c *Client) DescribeInstanceInformation(ctx context.Context, params *DescribeInstanceInformationInput, optFns ...func(*Options)) (*DescribeInstanceInformationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeInstanceInformationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceInformation", params, optFns, c.addOperationDescribeInstanceInformationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeInstanceInformationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeInstanceInformationInput struct {
|
||||
|
||||
// One or more filters. Use a filter to return a more specific list of managed
|
||||
// nodes. You can filter based on tags applied to your managed nodes. Tag filters
|
||||
// can't be combined with other filter types. Use this Filters data type instead
|
||||
// of InstanceInformationFilterList , which is deprecated.
|
||||
Filters []types.InstanceInformationStringFilter
|
||||
|
||||
// This is a legacy method. We recommend that you don't use this method. Instead,
|
||||
// use the Filters data type. Filters enables you to return node information by
|
||||
// filtering based on tags applied to managed nodes. Attempting to use
|
||||
// InstanceInformationFilterList and Filters leads to an exception error.
|
||||
InstanceInformationFilterList []types.InstanceInformationFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
// The default value is 10 items.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeInstanceInformationOutput struct {
|
||||
|
||||
// The managed node information list.
|
||||
InstanceInformationList []types.InstanceInformation
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeInstanceInformationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstanceInformation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstanceInformation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceInformation"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeInstanceInformationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceInformation(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeInstanceInformationAPIClient is a client that implements the
|
||||
// DescribeInstanceInformation operation.
|
||||
type DescribeInstanceInformationAPIClient interface {
|
||||
DescribeInstanceInformation(context.Context, *DescribeInstanceInformationInput, ...func(*Options)) (*DescribeInstanceInformationOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeInstanceInformationAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeInstanceInformationPaginatorOptions is the paginator options for
|
||||
// DescribeInstanceInformation
|
||||
type DescribeInstanceInformationPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
// The default value is 10 items.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeInstanceInformationPaginator is a paginator for
|
||||
// DescribeInstanceInformation
|
||||
type DescribeInstanceInformationPaginator struct {
|
||||
options DescribeInstanceInformationPaginatorOptions
|
||||
client DescribeInstanceInformationAPIClient
|
||||
params *DescribeInstanceInformationInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeInstanceInformationPaginator returns a new
|
||||
// DescribeInstanceInformationPaginator
|
||||
func NewDescribeInstanceInformationPaginator(client DescribeInstanceInformationAPIClient, params *DescribeInstanceInformationInput, optFns ...func(*DescribeInstanceInformationPaginatorOptions)) *DescribeInstanceInformationPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeInstanceInformationInput{}
|
||||
}
|
||||
|
||||
options := DescribeInstanceInformationPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeInstanceInformationPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeInstanceInformationPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeInstanceInformation page.
|
||||
func (p *DescribeInstanceInformationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceInformationOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeInstanceInformation(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeInstanceInformation(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeInstanceInformation",
|
||||
}
|
||||
}
|
||||
242
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go
generated
vendored
Normal file
242
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go
generated
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the high-level patch state of one or more managed nodes.
|
||||
func (c *Client) DescribeInstancePatchStates(ctx context.Context, params *DescribeInstancePatchStatesInput, optFns ...func(*Options)) (*DescribeInstancePatchStatesOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeInstancePatchStatesInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeInstancePatchStates", params, optFns, c.addOperationDescribeInstancePatchStatesMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeInstancePatchStatesOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeInstancePatchStatesInput struct {
|
||||
|
||||
// The ID of the managed node for which patch state information should be
|
||||
// retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
InstanceIds []string
|
||||
|
||||
// The maximum number of managed nodes to return (per page).
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeInstancePatchStatesOutput struct {
|
||||
|
||||
// The high-level patch state for the requested managed nodes.
|
||||
InstancePatchStates []types.InstancePatchState
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeInstancePatchStatesMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstancePatchStates{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstancePatchStates{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstancePatchStates"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeInstancePatchStatesValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstancePatchStates(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeInstancePatchStatesAPIClient is a client that implements the
|
||||
// DescribeInstancePatchStates operation.
|
||||
type DescribeInstancePatchStatesAPIClient interface {
|
||||
DescribeInstancePatchStates(context.Context, *DescribeInstancePatchStatesInput, ...func(*Options)) (*DescribeInstancePatchStatesOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeInstancePatchStatesAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeInstancePatchStatesPaginatorOptions is the paginator options for
|
||||
// DescribeInstancePatchStates
|
||||
type DescribeInstancePatchStatesPaginatorOptions struct {
|
||||
// The maximum number of managed nodes to return (per page).
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeInstancePatchStatesPaginator is a paginator for
|
||||
// DescribeInstancePatchStates
|
||||
type DescribeInstancePatchStatesPaginator struct {
|
||||
options DescribeInstancePatchStatesPaginatorOptions
|
||||
client DescribeInstancePatchStatesAPIClient
|
||||
params *DescribeInstancePatchStatesInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeInstancePatchStatesPaginator returns a new
|
||||
// DescribeInstancePatchStatesPaginator
|
||||
func NewDescribeInstancePatchStatesPaginator(client DescribeInstancePatchStatesAPIClient, params *DescribeInstancePatchStatesInput, optFns ...func(*DescribeInstancePatchStatesPaginatorOptions)) *DescribeInstancePatchStatesPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeInstancePatchStatesInput{}
|
||||
}
|
||||
|
||||
options := DescribeInstancePatchStatesPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeInstancePatchStatesPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeInstancePatchStatesPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeInstancePatchStates page.
|
||||
func (p *DescribeInstancePatchStatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancePatchStatesOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeInstancePatchStates(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeInstancePatchStates(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeInstancePatchStates",
|
||||
}
|
||||
}
|
||||
249
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go
generated
vendored
Normal file
249
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go
generated
vendored
Normal file
@@ -0,0 +1,249 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the high-level patch state for the managed nodes in the specified
|
||||
// patch group.
|
||||
func (c *Client) DescribeInstancePatchStatesForPatchGroup(ctx context.Context, params *DescribeInstancePatchStatesForPatchGroupInput, optFns ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeInstancePatchStatesForPatchGroupInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeInstancePatchStatesForPatchGroup", params, optFns, c.addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeInstancePatchStatesForPatchGroupOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeInstancePatchStatesForPatchGroupInput struct {
|
||||
|
||||
// The name of the patch group for which the patch state information should be
|
||||
// retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
PatchGroup *string
|
||||
|
||||
// Each entry in the array is a structure containing:
|
||||
// - Key (string between 1 and 200 characters)
|
||||
// - Values (array containing a single string)
|
||||
// - Type (string "Equal", "NotEqual", "LessThan", "GreaterThan")
|
||||
Filters []types.InstancePatchStateFilter
|
||||
|
||||
// The maximum number of patches to return (per page).
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeInstancePatchStatesForPatchGroupOutput struct {
|
||||
|
||||
// The high-level patch state for the requested managed nodes.
|
||||
InstancePatchStates []types.InstancePatchState
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstancePatchStatesForPatchGroup{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstancePatchStatesForPatchGroup"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeInstancePatchStatesForPatchGroupValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstancePatchStatesForPatchGroup(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeInstancePatchStatesForPatchGroupAPIClient is a client that implements
|
||||
// the DescribeInstancePatchStatesForPatchGroup operation.
|
||||
type DescribeInstancePatchStatesForPatchGroupAPIClient interface {
|
||||
DescribeInstancePatchStatesForPatchGroup(context.Context, *DescribeInstancePatchStatesForPatchGroupInput, ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeInstancePatchStatesForPatchGroupAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeInstancePatchStatesForPatchGroupPaginatorOptions is the paginator
|
||||
// options for DescribeInstancePatchStatesForPatchGroup
|
||||
type DescribeInstancePatchStatesForPatchGroupPaginatorOptions struct {
|
||||
// The maximum number of patches to return (per page).
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeInstancePatchStatesForPatchGroupPaginator is a paginator for
|
||||
// DescribeInstancePatchStatesForPatchGroup
|
||||
type DescribeInstancePatchStatesForPatchGroupPaginator struct {
|
||||
options DescribeInstancePatchStatesForPatchGroupPaginatorOptions
|
||||
client DescribeInstancePatchStatesForPatchGroupAPIClient
|
||||
params *DescribeInstancePatchStatesForPatchGroupInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeInstancePatchStatesForPatchGroupPaginator returns a new
|
||||
// DescribeInstancePatchStatesForPatchGroupPaginator
|
||||
func NewDescribeInstancePatchStatesForPatchGroupPaginator(client DescribeInstancePatchStatesForPatchGroupAPIClient, params *DescribeInstancePatchStatesForPatchGroupInput, optFns ...func(*DescribeInstancePatchStatesForPatchGroupPaginatorOptions)) *DescribeInstancePatchStatesForPatchGroupPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeInstancePatchStatesForPatchGroupInput{}
|
||||
}
|
||||
|
||||
options := DescribeInstancePatchStatesForPatchGroupPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeInstancePatchStatesForPatchGroupPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeInstancePatchStatesForPatchGroupPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeInstancePatchStatesForPatchGroup page.
|
||||
func (p *DescribeInstancePatchStatesForPatchGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeInstancePatchStatesForPatchGroup(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeInstancePatchStatesForPatchGroup(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeInstancePatchStatesForPatchGroup",
|
||||
}
|
||||
}
|
||||
258
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go
generated
vendored
Normal file
258
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go
generated
vendored
Normal file
@@ -0,0 +1,258 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves information about the patches on the specified managed node and their
|
||||
// state relative to the patch baseline being used for the node.
|
||||
func (c *Client) DescribeInstancePatches(ctx context.Context, params *DescribeInstancePatchesInput, optFns ...func(*Options)) (*DescribeInstancePatchesOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeInstancePatchesInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeInstancePatches", params, optFns, c.addOperationDescribeInstancePatchesMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeInstancePatchesOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeInstancePatchesInput struct {
|
||||
|
||||
// The ID of the managed node whose patch state information should be retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
InstanceId *string
|
||||
|
||||
// Each element in the array is a structure containing a key-value pair. Supported
|
||||
// keys for DescribeInstancePatches include the following:
|
||||
// - Classification Sample values: Security | SecurityUpdates
|
||||
// - KBId Sample values: KB4480056 | java-1.7.0-openjdk.x86_64
|
||||
// - Severity Sample values: Important | Medium | Low
|
||||
// - State Sample values: Installed | InstalledOther | InstalledPendingReboot For
|
||||
// lists of all State values, see Understanding patch compliance state values (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
Filters []types.PatchOrchestratorFilter
|
||||
|
||||
// The maximum number of patches to return (per page).
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeInstancePatchesOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Each entry in the array is a structure containing:
|
||||
// - Title (string)
|
||||
// - KBId (string)
|
||||
// - Classification (string)
|
||||
// - Severity (string)
|
||||
// - State (string, such as "INSTALLED" or "FAILED")
|
||||
// - InstalledTime (DateTime)
|
||||
// - InstalledBy (string)
|
||||
Patches []types.PatchComplianceData
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeInstancePatchesMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstancePatches{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstancePatches{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstancePatches"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeInstancePatchesValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstancePatches(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeInstancePatchesAPIClient is a client that implements the
|
||||
// DescribeInstancePatches operation.
|
||||
type DescribeInstancePatchesAPIClient interface {
|
||||
DescribeInstancePatches(context.Context, *DescribeInstancePatchesInput, ...func(*Options)) (*DescribeInstancePatchesOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeInstancePatchesAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeInstancePatchesPaginatorOptions is the paginator options for
|
||||
// DescribeInstancePatches
|
||||
type DescribeInstancePatchesPaginatorOptions struct {
|
||||
// The maximum number of patches to return (per page).
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeInstancePatchesPaginator is a paginator for DescribeInstancePatches
|
||||
type DescribeInstancePatchesPaginator struct {
|
||||
options DescribeInstancePatchesPaginatorOptions
|
||||
client DescribeInstancePatchesAPIClient
|
||||
params *DescribeInstancePatchesInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeInstancePatchesPaginator returns a new
|
||||
// DescribeInstancePatchesPaginator
|
||||
func NewDescribeInstancePatchesPaginator(client DescribeInstancePatchesAPIClient, params *DescribeInstancePatchesInput, optFns ...func(*DescribeInstancePatchesPaginatorOptions)) *DescribeInstancePatchesPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeInstancePatchesInput{}
|
||||
}
|
||||
|
||||
options := DescribeInstancePatchesPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeInstancePatchesPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeInstancePatchesPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeInstancePatches page.
|
||||
func (p *DescribeInstancePatchesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancePatchesOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeInstancePatches(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeInstancePatches(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeInstancePatches",
|
||||
}
|
||||
}
|
||||
238
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go
generated
vendored
Normal file
238
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go
generated
vendored
Normal file
@@ -0,0 +1,238 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Describes a specific delete inventory operation.
|
||||
func (c *Client) DescribeInventoryDeletions(ctx context.Context, params *DescribeInventoryDeletionsInput, optFns ...func(*Options)) (*DescribeInventoryDeletionsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeInventoryDeletionsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeInventoryDeletions", params, optFns, c.addOperationDescribeInventoryDeletionsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeInventoryDeletionsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeInventoryDeletionsInput struct {
|
||||
|
||||
// Specify the delete inventory ID for which you want information. This ID was
|
||||
// returned by the DeleteInventory operation.
|
||||
DeletionId *string
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeInventoryDeletionsOutput struct {
|
||||
|
||||
// A list of status items for deleted inventory.
|
||||
InventoryDeletions []types.InventoryDeletionStatusItem
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeInventoryDeletionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInventoryDeletions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInventoryDeletions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInventoryDeletions"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInventoryDeletions(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeInventoryDeletionsAPIClient is a client that implements the
|
||||
// DescribeInventoryDeletions operation.
|
||||
type DescribeInventoryDeletionsAPIClient interface {
|
||||
DescribeInventoryDeletions(context.Context, *DescribeInventoryDeletionsInput, ...func(*Options)) (*DescribeInventoryDeletionsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeInventoryDeletionsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeInventoryDeletionsPaginatorOptions is the paginator options for
|
||||
// DescribeInventoryDeletions
|
||||
type DescribeInventoryDeletionsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeInventoryDeletionsPaginator is a paginator for
|
||||
// DescribeInventoryDeletions
|
||||
type DescribeInventoryDeletionsPaginator struct {
|
||||
options DescribeInventoryDeletionsPaginatorOptions
|
||||
client DescribeInventoryDeletionsAPIClient
|
||||
params *DescribeInventoryDeletionsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeInventoryDeletionsPaginator returns a new
|
||||
// DescribeInventoryDeletionsPaginator
|
||||
func NewDescribeInventoryDeletionsPaginator(client DescribeInventoryDeletionsAPIClient, params *DescribeInventoryDeletionsInput, optFns ...func(*DescribeInventoryDeletionsPaginatorOptions)) *DescribeInventoryDeletionsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeInventoryDeletionsInput{}
|
||||
}
|
||||
|
||||
options := DescribeInventoryDeletionsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeInventoryDeletionsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeInventoryDeletionsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeInventoryDeletions page.
|
||||
func (p *DescribeInventoryDeletionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInventoryDeletionsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeInventoryDeletions(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeInventoryDeletions(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeInventoryDeletions",
|
||||
}
|
||||
}
|
||||
256
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go
generated
vendored
Normal file
256
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go
generated
vendored
Normal file
@@ -0,0 +1,256 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the individual task executions (one per target) for a particular task
|
||||
// run as part of a maintenance window execution.
|
||||
func (c *Client) DescribeMaintenanceWindowExecutionTaskInvocations(ctx context.Context, params *DescribeMaintenanceWindowExecutionTaskInvocationsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowExecutionTaskInvocationsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowExecutionTaskInvocations", params, optFns, c.addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeMaintenanceWindowExecutionTaskInvocationsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowExecutionTaskInvocationsInput struct {
|
||||
|
||||
// The ID of the specific task in the maintenance window task that should be
|
||||
// retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
TaskId *string
|
||||
|
||||
// The ID of the maintenance window execution the task is part of.
|
||||
//
|
||||
// This member is required.
|
||||
WindowExecutionId *string
|
||||
|
||||
// Optional filters used to scope down the returned task invocations. The
|
||||
// supported filter key is STATUS with the corresponding values PENDING ,
|
||||
// IN_PROGRESS , SUCCESS , FAILED , TIMED_OUT , CANCELLING , and CANCELLED .
|
||||
Filters []types.MaintenanceWindowFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowExecutionTaskInvocationsOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Information about the task invocation results per invocation.
|
||||
WindowExecutionTaskInvocationIdentities []types.MaintenanceWindowExecutionTaskInvocationIdentity
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowExecutionTaskInvocations"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeMaintenanceWindowExecutionTaskInvocationsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTaskInvocations(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient is a client that
|
||||
// implements the DescribeMaintenanceWindowExecutionTaskInvocations operation.
|
||||
type DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient interface {
|
||||
DescribeMaintenanceWindowExecutionTaskInvocations(context.Context, *DescribeMaintenanceWindowExecutionTaskInvocationsInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions is the
|
||||
// paginator options for DescribeMaintenanceWindowExecutionTaskInvocations
|
||||
type DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowExecutionTaskInvocationsPaginator is a paginator for
|
||||
// DescribeMaintenanceWindowExecutionTaskInvocations
|
||||
type DescribeMaintenanceWindowExecutionTaskInvocationsPaginator struct {
|
||||
options DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions
|
||||
client DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient
|
||||
params *DescribeMaintenanceWindowExecutionTaskInvocationsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeMaintenanceWindowExecutionTaskInvocationsPaginator returns a new
|
||||
// DescribeMaintenanceWindowExecutionTaskInvocationsPaginator
|
||||
func NewDescribeMaintenanceWindowExecutionTaskInvocationsPaginator(client DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient, params *DescribeMaintenanceWindowExecutionTaskInvocationsInput, optFns ...func(*DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions)) *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowExecutionTaskInvocationsInput{}
|
||||
}
|
||||
|
||||
options := DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeMaintenanceWindowExecutionTaskInvocationsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeMaintenanceWindowExecutionTaskInvocations
|
||||
// page.
|
||||
func (p *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeMaintenanceWindowExecutionTaskInvocations(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTaskInvocations(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeMaintenanceWindowExecutionTaskInvocations",
|
||||
}
|
||||
}
|
||||
249
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go
generated
vendored
Normal file
249
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go
generated
vendored
Normal file
@@ -0,0 +1,249 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// For a given maintenance window execution, lists the tasks that were run.
|
||||
func (c *Client) DescribeMaintenanceWindowExecutionTasks(ctx context.Context, params *DescribeMaintenanceWindowExecutionTasksInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionTasksOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowExecutionTasksInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowExecutionTasks", params, optFns, c.addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeMaintenanceWindowExecutionTasksOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowExecutionTasksInput struct {
|
||||
|
||||
// The ID of the maintenance window execution whose task executions should be
|
||||
// retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
WindowExecutionId *string
|
||||
|
||||
// Optional filters used to scope down the returned tasks. The supported filter
|
||||
// key is STATUS with the corresponding values PENDING , IN_PROGRESS , SUCCESS ,
|
||||
// FAILED , TIMED_OUT , CANCELLING , and CANCELLED .
|
||||
Filters []types.MaintenanceWindowFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowExecutionTasksOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Information about the task executions.
|
||||
WindowExecutionTaskIdentities []types.MaintenanceWindowExecutionTaskIdentity
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowExecutionTasks"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeMaintenanceWindowExecutionTasksValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTasks(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowExecutionTasksAPIClient is a client that implements
|
||||
// the DescribeMaintenanceWindowExecutionTasks operation.
|
||||
type DescribeMaintenanceWindowExecutionTasksAPIClient interface {
|
||||
DescribeMaintenanceWindowExecutionTasks(context.Context, *DescribeMaintenanceWindowExecutionTasksInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionTasksOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeMaintenanceWindowExecutionTasksAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeMaintenanceWindowExecutionTasksPaginatorOptions is the paginator
|
||||
// options for DescribeMaintenanceWindowExecutionTasks
|
||||
type DescribeMaintenanceWindowExecutionTasksPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowExecutionTasksPaginator is a paginator for
|
||||
// DescribeMaintenanceWindowExecutionTasks
|
||||
type DescribeMaintenanceWindowExecutionTasksPaginator struct {
|
||||
options DescribeMaintenanceWindowExecutionTasksPaginatorOptions
|
||||
client DescribeMaintenanceWindowExecutionTasksAPIClient
|
||||
params *DescribeMaintenanceWindowExecutionTasksInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeMaintenanceWindowExecutionTasksPaginator returns a new
|
||||
// DescribeMaintenanceWindowExecutionTasksPaginator
|
||||
func NewDescribeMaintenanceWindowExecutionTasksPaginator(client DescribeMaintenanceWindowExecutionTasksAPIClient, params *DescribeMaintenanceWindowExecutionTasksInput, optFns ...func(*DescribeMaintenanceWindowExecutionTasksPaginatorOptions)) *DescribeMaintenanceWindowExecutionTasksPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowExecutionTasksInput{}
|
||||
}
|
||||
|
||||
options := DescribeMaintenanceWindowExecutionTasksPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeMaintenanceWindowExecutionTasksPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeMaintenanceWindowExecutionTasksPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeMaintenanceWindowExecutionTasks page.
|
||||
func (p *DescribeMaintenanceWindowExecutionTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionTasksOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeMaintenanceWindowExecutionTasks(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTasks(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeMaintenanceWindowExecutionTasks",
|
||||
}
|
||||
}
|
||||
253
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go
generated
vendored
Normal file
253
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go
generated
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists the executions of a maintenance window. This includes information about
|
||||
// when the maintenance window was scheduled to be active, and information about
|
||||
// tasks registered and run with the maintenance window.
|
||||
func (c *Client) DescribeMaintenanceWindowExecutions(ctx context.Context, params *DescribeMaintenanceWindowExecutionsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowExecutionsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowExecutions", params, optFns, c.addOperationDescribeMaintenanceWindowExecutionsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeMaintenanceWindowExecutionsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowExecutionsInput struct {
|
||||
|
||||
// The ID of the maintenance window whose executions should be retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
WindowId *string
|
||||
|
||||
// Each entry in the array is a structure containing:
|
||||
// - Key. A string between 1 and 128 characters. Supported keys include
|
||||
// ExecutedBefore and ExecutedAfter .
|
||||
// - Values. An array of strings, each between 1 and 256 characters. Supported
|
||||
// values are date/time strings in a valid ISO 8601 date/time format, such as
|
||||
// 2021-11-04T05:00:00Z .
|
||||
Filters []types.MaintenanceWindowFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowExecutionsOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Information about the maintenance window executions.
|
||||
WindowExecutions []types.MaintenanceWindowExecution
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeMaintenanceWindowExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowExecutions"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeMaintenanceWindowExecutionsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutions(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowExecutionsAPIClient is a client that implements the
|
||||
// DescribeMaintenanceWindowExecutions operation.
|
||||
type DescribeMaintenanceWindowExecutionsAPIClient interface {
|
||||
DescribeMaintenanceWindowExecutions(context.Context, *DescribeMaintenanceWindowExecutionsInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeMaintenanceWindowExecutionsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeMaintenanceWindowExecutionsPaginatorOptions is the paginator options
|
||||
// for DescribeMaintenanceWindowExecutions
|
||||
type DescribeMaintenanceWindowExecutionsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowExecutionsPaginator is a paginator for
|
||||
// DescribeMaintenanceWindowExecutions
|
||||
type DescribeMaintenanceWindowExecutionsPaginator struct {
|
||||
options DescribeMaintenanceWindowExecutionsPaginatorOptions
|
||||
client DescribeMaintenanceWindowExecutionsAPIClient
|
||||
params *DescribeMaintenanceWindowExecutionsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeMaintenanceWindowExecutionsPaginator returns a new
|
||||
// DescribeMaintenanceWindowExecutionsPaginator
|
||||
func NewDescribeMaintenanceWindowExecutionsPaginator(client DescribeMaintenanceWindowExecutionsAPIClient, params *DescribeMaintenanceWindowExecutionsInput, optFns ...func(*DescribeMaintenanceWindowExecutionsPaginatorOptions)) *DescribeMaintenanceWindowExecutionsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowExecutionsInput{}
|
||||
}
|
||||
|
||||
options := DescribeMaintenanceWindowExecutionsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeMaintenanceWindowExecutionsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeMaintenanceWindowExecutionsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeMaintenanceWindowExecutions page.
|
||||
func (p *DescribeMaintenanceWindowExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeMaintenanceWindowExecutions(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutions(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeMaintenanceWindowExecutions",
|
||||
}
|
||||
}
|
||||
251
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go
generated
vendored
Normal file
251
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go
generated
vendored
Normal file
@@ -0,0 +1,251 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves information about upcoming executions of a maintenance window.
|
||||
func (c *Client) DescribeMaintenanceWindowSchedule(ctx context.Context, params *DescribeMaintenanceWindowScheduleInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowScheduleOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowScheduleInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowSchedule", params, optFns, c.addOperationDescribeMaintenanceWindowScheduleMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeMaintenanceWindowScheduleOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowScheduleInput struct {
|
||||
|
||||
// Filters used to limit the range of results. For example, you can limit
|
||||
// maintenance window executions to only those scheduled before or after a certain
|
||||
// date and time.
|
||||
Filters []types.PatchOrchestratorFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
// The type of resource you want to retrieve information about. For example,
|
||||
// INSTANCE .
|
||||
ResourceType types.MaintenanceWindowResourceType
|
||||
|
||||
// The managed node ID or key-value pair to retrieve information about.
|
||||
Targets []types.Target
|
||||
|
||||
// The ID of the maintenance window to retrieve information about.
|
||||
WindowId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowScheduleOutput struct {
|
||||
|
||||
// The token for the next set of items to return. (You use this token in the next
|
||||
// call.)
|
||||
NextToken *string
|
||||
|
||||
// Information about maintenance window executions scheduled for the specified
|
||||
// time range.
|
||||
ScheduledWindowExecutions []types.ScheduledWindowExecution
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeMaintenanceWindowScheduleMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowSchedule"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowSchedule(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowScheduleAPIClient is a client that implements the
|
||||
// DescribeMaintenanceWindowSchedule operation.
|
||||
type DescribeMaintenanceWindowScheduleAPIClient interface {
|
||||
DescribeMaintenanceWindowSchedule(context.Context, *DescribeMaintenanceWindowScheduleInput, ...func(*Options)) (*DescribeMaintenanceWindowScheduleOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeMaintenanceWindowScheduleAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeMaintenanceWindowSchedulePaginatorOptions is the paginator options for
|
||||
// DescribeMaintenanceWindowSchedule
|
||||
type DescribeMaintenanceWindowSchedulePaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowSchedulePaginator is a paginator for
|
||||
// DescribeMaintenanceWindowSchedule
|
||||
type DescribeMaintenanceWindowSchedulePaginator struct {
|
||||
options DescribeMaintenanceWindowSchedulePaginatorOptions
|
||||
client DescribeMaintenanceWindowScheduleAPIClient
|
||||
params *DescribeMaintenanceWindowScheduleInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeMaintenanceWindowSchedulePaginator returns a new
|
||||
// DescribeMaintenanceWindowSchedulePaginator
|
||||
func NewDescribeMaintenanceWindowSchedulePaginator(client DescribeMaintenanceWindowScheduleAPIClient, params *DescribeMaintenanceWindowScheduleInput, optFns ...func(*DescribeMaintenanceWindowSchedulePaginatorOptions)) *DescribeMaintenanceWindowSchedulePaginator {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowScheduleInput{}
|
||||
}
|
||||
|
||||
options := DescribeMaintenanceWindowSchedulePaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeMaintenanceWindowSchedulePaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeMaintenanceWindowSchedulePaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeMaintenanceWindowSchedule page.
|
||||
func (p *DescribeMaintenanceWindowSchedulePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowScheduleOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeMaintenanceWindowSchedule(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeMaintenanceWindowSchedule(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeMaintenanceWindowSchedule",
|
||||
}
|
||||
}
|
||||
248
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go
generated
vendored
Normal file
248
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go
generated
vendored
Normal file
@@ -0,0 +1,248 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists the targets registered with the maintenance window.
|
||||
func (c *Client) DescribeMaintenanceWindowTargets(ctx context.Context, params *DescribeMaintenanceWindowTargetsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowTargetsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowTargetsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowTargets", params, optFns, c.addOperationDescribeMaintenanceWindowTargetsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeMaintenanceWindowTargetsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowTargetsInput struct {
|
||||
|
||||
// The ID of the maintenance window whose targets should be retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
WindowId *string
|
||||
|
||||
// Optional filters that can be used to narrow down the scope of the returned
|
||||
// window targets. The supported filter keys are Type , WindowTargetId , and
|
||||
// OwnerInformation .
|
||||
Filters []types.MaintenanceWindowFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowTargetsOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Information about the targets in the maintenance window.
|
||||
Targets []types.MaintenanceWindowTarget
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeMaintenanceWindowTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowTargets"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeMaintenanceWindowTargetsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowTargets(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowTargetsAPIClient is a client that implements the
|
||||
// DescribeMaintenanceWindowTargets operation.
|
||||
type DescribeMaintenanceWindowTargetsAPIClient interface {
|
||||
DescribeMaintenanceWindowTargets(context.Context, *DescribeMaintenanceWindowTargetsInput, ...func(*Options)) (*DescribeMaintenanceWindowTargetsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeMaintenanceWindowTargetsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeMaintenanceWindowTargetsPaginatorOptions is the paginator options for
|
||||
// DescribeMaintenanceWindowTargets
|
||||
type DescribeMaintenanceWindowTargetsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowTargetsPaginator is a paginator for
|
||||
// DescribeMaintenanceWindowTargets
|
||||
type DescribeMaintenanceWindowTargetsPaginator struct {
|
||||
options DescribeMaintenanceWindowTargetsPaginatorOptions
|
||||
client DescribeMaintenanceWindowTargetsAPIClient
|
||||
params *DescribeMaintenanceWindowTargetsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeMaintenanceWindowTargetsPaginator returns a new
|
||||
// DescribeMaintenanceWindowTargetsPaginator
|
||||
func NewDescribeMaintenanceWindowTargetsPaginator(client DescribeMaintenanceWindowTargetsAPIClient, params *DescribeMaintenanceWindowTargetsInput, optFns ...func(*DescribeMaintenanceWindowTargetsPaginatorOptions)) *DescribeMaintenanceWindowTargetsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowTargetsInput{}
|
||||
}
|
||||
|
||||
options := DescribeMaintenanceWindowTargetsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeMaintenanceWindowTargetsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeMaintenanceWindowTargetsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeMaintenanceWindowTargets page.
|
||||
func (p *DescribeMaintenanceWindowTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowTargetsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeMaintenanceWindowTargets(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeMaintenanceWindowTargets(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeMaintenanceWindowTargets",
|
||||
}
|
||||
}
|
||||
251
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go
generated
vendored
Normal file
251
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go
generated
vendored
Normal file
@@ -0,0 +1,251 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists the tasks in a maintenance window. For maintenance window tasks without a
|
||||
// specified target, you can't supply values for --max-errors and --max-concurrency
|
||||
// . Instead, the system inserts a placeholder value of 1 , which may be reported
|
||||
// in the response to this command. These values don't affect the running of your
|
||||
// task and can be ignored.
|
||||
func (c *Client) DescribeMaintenanceWindowTasks(ctx context.Context, params *DescribeMaintenanceWindowTasksInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowTasksOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowTasksInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowTasks", params, optFns, c.addOperationDescribeMaintenanceWindowTasksMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeMaintenanceWindowTasksOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowTasksInput struct {
|
||||
|
||||
// The ID of the maintenance window whose tasks should be retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
WindowId *string
|
||||
|
||||
// Optional filters used to narrow down the scope of the returned tasks. The
|
||||
// supported filter keys are WindowTaskId , TaskArn , Priority , and TaskType .
|
||||
Filters []types.MaintenanceWindowFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowTasksOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Information about the tasks in the maintenance window.
|
||||
Tasks []types.MaintenanceWindowTask
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeMaintenanceWindowTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowTasks"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeMaintenanceWindowTasksValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowTasks(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowTasksAPIClient is a client that implements the
|
||||
// DescribeMaintenanceWindowTasks operation.
|
||||
type DescribeMaintenanceWindowTasksAPIClient interface {
|
||||
DescribeMaintenanceWindowTasks(context.Context, *DescribeMaintenanceWindowTasksInput, ...func(*Options)) (*DescribeMaintenanceWindowTasksOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeMaintenanceWindowTasksAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeMaintenanceWindowTasksPaginatorOptions is the paginator options for
|
||||
// DescribeMaintenanceWindowTasks
|
||||
type DescribeMaintenanceWindowTasksPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowTasksPaginator is a paginator for
|
||||
// DescribeMaintenanceWindowTasks
|
||||
type DescribeMaintenanceWindowTasksPaginator struct {
|
||||
options DescribeMaintenanceWindowTasksPaginatorOptions
|
||||
client DescribeMaintenanceWindowTasksAPIClient
|
||||
params *DescribeMaintenanceWindowTasksInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeMaintenanceWindowTasksPaginator returns a new
|
||||
// DescribeMaintenanceWindowTasksPaginator
|
||||
func NewDescribeMaintenanceWindowTasksPaginator(client DescribeMaintenanceWindowTasksAPIClient, params *DescribeMaintenanceWindowTasksInput, optFns ...func(*DescribeMaintenanceWindowTasksPaginatorOptions)) *DescribeMaintenanceWindowTasksPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowTasksInput{}
|
||||
}
|
||||
|
||||
options := DescribeMaintenanceWindowTasksPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeMaintenanceWindowTasksPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeMaintenanceWindowTasksPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeMaintenanceWindowTasks page.
|
||||
func (p *DescribeMaintenanceWindowTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowTasksOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeMaintenanceWindowTasks(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeMaintenanceWindowTasks(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeMaintenanceWindowTasks",
|
||||
}
|
||||
}
|
||||
240
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go
generated
vendored
Normal file
240
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go
generated
vendored
Normal file
@@ -0,0 +1,240 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the maintenance windows in an Amazon Web Services account.
|
||||
func (c *Client) DescribeMaintenanceWindows(ctx context.Context, params *DescribeMaintenanceWindowsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindows", params, optFns, c.addOperationDescribeMaintenanceWindowsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeMaintenanceWindowsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowsInput struct {
|
||||
|
||||
// Optional filters used to narrow down the scope of the returned maintenance
|
||||
// windows. Supported filter keys are Name and Enabled . For example,
|
||||
// Name=MyMaintenanceWindow and Enabled=True .
|
||||
Filters []types.MaintenanceWindowFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowsOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Information about the maintenance windows.
|
||||
WindowIdentities []types.MaintenanceWindowIdentity
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeMaintenanceWindowsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindows{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindows{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindows"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindows(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowsAPIClient is a client that implements the
|
||||
// DescribeMaintenanceWindows operation.
|
||||
type DescribeMaintenanceWindowsAPIClient interface {
|
||||
DescribeMaintenanceWindows(context.Context, *DescribeMaintenanceWindowsInput, ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeMaintenanceWindowsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeMaintenanceWindowsPaginatorOptions is the paginator options for
|
||||
// DescribeMaintenanceWindows
|
||||
type DescribeMaintenanceWindowsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowsPaginator is a paginator for
|
||||
// DescribeMaintenanceWindows
|
||||
type DescribeMaintenanceWindowsPaginator struct {
|
||||
options DescribeMaintenanceWindowsPaginatorOptions
|
||||
client DescribeMaintenanceWindowsAPIClient
|
||||
params *DescribeMaintenanceWindowsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeMaintenanceWindowsPaginator returns a new
|
||||
// DescribeMaintenanceWindowsPaginator
|
||||
func NewDescribeMaintenanceWindowsPaginator(client DescribeMaintenanceWindowsAPIClient, params *DescribeMaintenanceWindowsInput, optFns ...func(*DescribeMaintenanceWindowsPaginatorOptions)) *DescribeMaintenanceWindowsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowsInput{}
|
||||
}
|
||||
|
||||
options := DescribeMaintenanceWindowsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeMaintenanceWindowsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeMaintenanceWindowsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeMaintenanceWindows page.
|
||||
func (p *DescribeMaintenanceWindowsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeMaintenanceWindows(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeMaintenanceWindows(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeMaintenanceWindows",
|
||||
}
|
||||
}
|
||||
251
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go
generated
vendored
Normal file
251
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go
generated
vendored
Normal file
@@ -0,0 +1,251 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves information about the maintenance window targets or tasks that a
|
||||
// managed node is associated with.
|
||||
func (c *Client) DescribeMaintenanceWindowsForTarget(ctx context.Context, params *DescribeMaintenanceWindowsForTargetInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowsForTargetInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowsForTarget", params, optFns, c.addOperationDescribeMaintenanceWindowsForTargetMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeMaintenanceWindowsForTargetOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowsForTargetInput struct {
|
||||
|
||||
// The type of resource you want to retrieve information about. For example,
|
||||
// INSTANCE .
|
||||
//
|
||||
// This member is required.
|
||||
ResourceType types.MaintenanceWindowResourceType
|
||||
|
||||
// The managed node ID or key-value pair to retrieve information about.
|
||||
//
|
||||
// This member is required.
|
||||
Targets []types.Target
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeMaintenanceWindowsForTargetOutput struct {
|
||||
|
||||
// The token for the next set of items to return. (You use this token in the next
|
||||
// call.)
|
||||
NextToken *string
|
||||
|
||||
// Information about the maintenance window targets and tasks a managed node is
|
||||
// associated with.
|
||||
WindowIdentities []types.MaintenanceWindowIdentityForTarget
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeMaintenanceWindowsForTargetMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowsForTarget"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeMaintenanceWindowsForTargetValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowsForTarget(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowsForTargetAPIClient is a client that implements the
|
||||
// DescribeMaintenanceWindowsForTarget operation.
|
||||
type DescribeMaintenanceWindowsForTargetAPIClient interface {
|
||||
DescribeMaintenanceWindowsForTarget(context.Context, *DescribeMaintenanceWindowsForTargetInput, ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeMaintenanceWindowsForTargetAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeMaintenanceWindowsForTargetPaginatorOptions is the paginator options
|
||||
// for DescribeMaintenanceWindowsForTarget
|
||||
type DescribeMaintenanceWindowsForTargetPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeMaintenanceWindowsForTargetPaginator is a paginator for
|
||||
// DescribeMaintenanceWindowsForTarget
|
||||
type DescribeMaintenanceWindowsForTargetPaginator struct {
|
||||
options DescribeMaintenanceWindowsForTargetPaginatorOptions
|
||||
client DescribeMaintenanceWindowsForTargetAPIClient
|
||||
params *DescribeMaintenanceWindowsForTargetInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeMaintenanceWindowsForTargetPaginator returns a new
|
||||
// DescribeMaintenanceWindowsForTargetPaginator
|
||||
func NewDescribeMaintenanceWindowsForTargetPaginator(client DescribeMaintenanceWindowsForTargetAPIClient, params *DescribeMaintenanceWindowsForTargetInput, optFns ...func(*DescribeMaintenanceWindowsForTargetPaginatorOptions)) *DescribeMaintenanceWindowsForTargetPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeMaintenanceWindowsForTargetInput{}
|
||||
}
|
||||
|
||||
options := DescribeMaintenanceWindowsForTargetPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeMaintenanceWindowsForTargetPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeMaintenanceWindowsForTargetPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeMaintenanceWindowsForTarget page.
|
||||
func (p *DescribeMaintenanceWindowsForTargetPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeMaintenanceWindowsForTarget(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeMaintenanceWindowsForTarget(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeMaintenanceWindowsForTarget",
|
||||
}
|
||||
}
|
||||
264
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go
generated
vendored
Normal file
264
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go
generated
vendored
Normal file
@@ -0,0 +1,264 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Query a set of OpsItems. You must have permission in Identity and Access
|
||||
// Management (IAM) to query a list of OpsItems. For more information, see Set up
|
||||
// OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. Operations engineers and
|
||||
// IT professionals use Amazon Web Services Systems Manager OpsCenter to view,
|
||||
// investigate, and remediate operational issues impacting the performance and
|
||||
// health of their Amazon Web Services resources. For more information, see
|
||||
// OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
func (c *Client) DescribeOpsItems(ctx context.Context, params *DescribeOpsItemsInput, optFns ...func(*Options)) (*DescribeOpsItemsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeOpsItemsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeOpsItems", params, optFns, c.addOperationDescribeOpsItemsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeOpsItemsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeOpsItemsInput struct {
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
// One or more filters to limit the response.
|
||||
// - Key: CreatedTime Operations: GreaterThan, LessThan
|
||||
// - Key: LastModifiedBy Operations: Contains, Equals
|
||||
// - Key: LastModifiedTime Operations: GreaterThan, LessThan
|
||||
// - Key: Priority Operations: Equals
|
||||
// - Key: Source Operations: Contains, Equals
|
||||
// - Key: Status Operations: Equals
|
||||
// - Key: Title* Operations: Equals,Contains
|
||||
// - Key: OperationalData** Operations: Equals
|
||||
// - Key: OperationalDataKey Operations: Equals
|
||||
// - Key: OperationalDataValue Operations: Equals, Contains
|
||||
// - Key: OpsItemId Operations: Equals
|
||||
// - Key: ResourceId Operations: Contains
|
||||
// - Key: AutomationId Operations: Equals
|
||||
// - Key: AccountId Operations: Equals
|
||||
// *The Equals operator for Title matches the first 100 characters. If you specify
|
||||
// more than 100 characters, they system returns an error that the filter value
|
||||
// exceeds the length limit. **If you filter the response by using the
|
||||
// OperationalData operator, specify a key-value pair by using the following JSON
|
||||
// format: {"key":"key_name","value":"a_value"}
|
||||
OpsItemFilters []types.OpsItemFilter
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeOpsItemsOutput struct {
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// A list of OpsItems.
|
||||
OpsItemSummaries []types.OpsItemSummary
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeOpsItemsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeOpsItems{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeOpsItems{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeOpsItems"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeOpsItemsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOpsItems(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeOpsItemsAPIClient is a client that implements the DescribeOpsItems
|
||||
// operation.
|
||||
type DescribeOpsItemsAPIClient interface {
|
||||
DescribeOpsItems(context.Context, *DescribeOpsItemsInput, ...func(*Options)) (*DescribeOpsItemsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeOpsItemsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeOpsItemsPaginatorOptions is the paginator options for DescribeOpsItems
|
||||
type DescribeOpsItemsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeOpsItemsPaginator is a paginator for DescribeOpsItems
|
||||
type DescribeOpsItemsPaginator struct {
|
||||
options DescribeOpsItemsPaginatorOptions
|
||||
client DescribeOpsItemsAPIClient
|
||||
params *DescribeOpsItemsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeOpsItemsPaginator returns a new DescribeOpsItemsPaginator
|
||||
func NewDescribeOpsItemsPaginator(client DescribeOpsItemsAPIClient, params *DescribeOpsItemsInput, optFns ...func(*DescribeOpsItemsPaginatorOptions)) *DescribeOpsItemsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeOpsItemsInput{}
|
||||
}
|
||||
|
||||
options := DescribeOpsItemsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeOpsItemsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeOpsItemsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeOpsItems page.
|
||||
func (p *DescribeOpsItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOpsItemsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeOpsItems(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeOpsItems(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeOpsItems",
|
||||
}
|
||||
}
|
||||
251
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go
generated
vendored
Normal file
251
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go
generated
vendored
Normal file
@@ -0,0 +1,251 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Get information about a parameter. Request results are returned on a
|
||||
// best-effort basis. If you specify MaxResults in the request, the response
|
||||
// includes information up to the limit specified. The number of items returned,
|
||||
// however, can be between zero and the value of MaxResults . If the service
|
||||
// reaches an internal limit while processing the results, it stops the operation
|
||||
// and returns the matching values up to that point and a NextToken . You can
|
||||
// specify the NextToken in a subsequent call to get the next set of results. If
|
||||
// you change the KMS key alias for the KMS key used to encrypt a parameter, then
|
||||
// you must also update the key alias the parameter uses to reference KMS.
|
||||
// Otherwise, DescribeParameters retrieves whatever the original key alias was
|
||||
// referencing.
|
||||
func (c *Client) DescribeParameters(ctx context.Context, params *DescribeParametersInput, optFns ...func(*Options)) (*DescribeParametersOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeParametersInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeParameters", params, optFns, c.addOperationDescribeParametersMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeParametersOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeParametersInput struct {
|
||||
|
||||
// This data type is deprecated. Instead, use ParameterFilters .
|
||||
Filters []types.ParametersFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
// Filters to limit the request results.
|
||||
ParameterFilters []types.ParameterStringFilter
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeParametersOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items.
|
||||
NextToken *string
|
||||
|
||||
// Parameters returned by the request.
|
||||
Parameters []types.ParameterMetadata
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeParameters{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeParameters{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeParameters"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeParametersValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeParameters(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeParametersAPIClient is a client that implements the DescribeParameters
|
||||
// operation.
|
||||
type DescribeParametersAPIClient interface {
|
||||
DescribeParameters(context.Context, *DescribeParametersInput, ...func(*Options)) (*DescribeParametersOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeParametersAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeParametersPaginatorOptions is the paginator options for
|
||||
// DescribeParameters
|
||||
type DescribeParametersPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeParametersPaginator is a paginator for DescribeParameters
|
||||
type DescribeParametersPaginator struct {
|
||||
options DescribeParametersPaginatorOptions
|
||||
client DescribeParametersAPIClient
|
||||
params *DescribeParametersInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeParametersPaginator returns a new DescribeParametersPaginator
|
||||
func NewDescribeParametersPaginator(client DescribeParametersAPIClient, params *DescribeParametersInput, optFns ...func(*DescribeParametersPaginatorOptions)) *DescribeParametersPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeParametersInput{}
|
||||
}
|
||||
|
||||
options := DescribeParametersPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeParametersPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeParametersPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeParameters page.
|
||||
func (p *DescribeParametersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeParametersOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeParameters(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeParameters(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeParameters",
|
||||
}
|
||||
}
|
||||
238
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go
generated
vendored
Normal file
238
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go
generated
vendored
Normal file
@@ -0,0 +1,238 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists the patch baselines in your Amazon Web Services account.
|
||||
func (c *Client) DescribePatchBaselines(ctx context.Context, params *DescribePatchBaselinesInput, optFns ...func(*Options)) (*DescribePatchBaselinesOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribePatchBaselinesInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribePatchBaselines", params, optFns, c.addOperationDescribePatchBaselinesMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribePatchBaselinesOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribePatchBaselinesInput struct {
|
||||
|
||||
// Each element in the array is a structure containing a key-value pair. Supported
|
||||
// keys for DescribePatchBaselines include the following:
|
||||
// - NAME_PREFIX Sample values: AWS- | My-
|
||||
// - OWNER Sample values: AWS | Self
|
||||
// - OPERATING_SYSTEM Sample values: AMAZON_LINUX | SUSE | WINDOWS
|
||||
Filters []types.PatchOrchestratorFilter
|
||||
|
||||
// The maximum number of patch baselines to return (per page).
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribePatchBaselinesOutput struct {
|
||||
|
||||
// An array of PatchBaselineIdentity elements.
|
||||
BaselineIdentities []types.PatchBaselineIdentity
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribePatchBaselinesMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePatchBaselines{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePatchBaselines{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePatchBaselines"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchBaselines(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribePatchBaselinesAPIClient is a client that implements the
|
||||
// DescribePatchBaselines operation.
|
||||
type DescribePatchBaselinesAPIClient interface {
|
||||
DescribePatchBaselines(context.Context, *DescribePatchBaselinesInput, ...func(*Options)) (*DescribePatchBaselinesOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribePatchBaselinesAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribePatchBaselinesPaginatorOptions is the paginator options for
|
||||
// DescribePatchBaselines
|
||||
type DescribePatchBaselinesPaginatorOptions struct {
|
||||
// The maximum number of patch baselines to return (per page).
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribePatchBaselinesPaginator is a paginator for DescribePatchBaselines
|
||||
type DescribePatchBaselinesPaginator struct {
|
||||
options DescribePatchBaselinesPaginatorOptions
|
||||
client DescribePatchBaselinesAPIClient
|
||||
params *DescribePatchBaselinesInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribePatchBaselinesPaginator returns a new DescribePatchBaselinesPaginator
|
||||
func NewDescribePatchBaselinesPaginator(client DescribePatchBaselinesAPIClient, params *DescribePatchBaselinesInput, optFns ...func(*DescribePatchBaselinesPaginatorOptions)) *DescribePatchBaselinesPaginator {
|
||||
if params == nil {
|
||||
params = &DescribePatchBaselinesInput{}
|
||||
}
|
||||
|
||||
options := DescribePatchBaselinesPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribePatchBaselinesPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribePatchBaselinesPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribePatchBaselines page.
|
||||
func (p *DescribePatchBaselinesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePatchBaselinesOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribePatchBaselines(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribePatchBaselines(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribePatchBaselines",
|
||||
}
|
||||
}
|
||||
189
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go
generated
vendored
Normal file
189
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go
generated
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns high-level aggregated patch compliance state information for a patch
|
||||
// group.
|
||||
func (c *Client) DescribePatchGroupState(ctx context.Context, params *DescribePatchGroupStateInput, optFns ...func(*Options)) (*DescribePatchGroupStateOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribePatchGroupStateInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribePatchGroupState", params, optFns, c.addOperationDescribePatchGroupStateMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribePatchGroupStateOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribePatchGroupStateInput struct {
|
||||
|
||||
// The name of the patch group whose patch snapshot should be retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
PatchGroup *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribePatchGroupStateOutput struct {
|
||||
|
||||
// The number of managed nodes in the patch group.
|
||||
Instances int32
|
||||
|
||||
// The number of managed nodes where patches that are specified as Critical for
|
||||
// compliance reporting in the patch baseline aren't installed. These patches might
|
||||
// be missing, have failed installation, were rejected, or were installed but
|
||||
// awaiting a required managed node reboot. The status of these managed nodes is
|
||||
// NON_COMPLIANT .
|
||||
InstancesWithCriticalNonCompliantPatches *int32
|
||||
|
||||
// The number of managed nodes with patches from the patch baseline that failed to
|
||||
// install.
|
||||
InstancesWithFailedPatches int32
|
||||
|
||||
// The number of managed nodes with patches installed that aren't defined in the
|
||||
// patch baseline.
|
||||
InstancesWithInstalledOtherPatches int32
|
||||
|
||||
// The number of managed nodes with installed patches.
|
||||
InstancesWithInstalledPatches int32
|
||||
|
||||
// The number of managed nodes with patches installed by Patch Manager that
|
||||
// haven't been rebooted after the patch installation. The status of these managed
|
||||
// nodes is NON_COMPLIANT .
|
||||
InstancesWithInstalledPendingRebootPatches *int32
|
||||
|
||||
// The number of managed nodes with patches installed that are specified in a
|
||||
// RejectedPatches list. Patches with a status of INSTALLED_REJECTED were
|
||||
// typically installed before they were added to a RejectedPatches list. If
|
||||
// ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction , the
|
||||
// value of InstancesWithInstalledRejectedPatches will always be 0 (zero).
|
||||
InstancesWithInstalledRejectedPatches *int32
|
||||
|
||||
// The number of managed nodes with missing patches from the patch baseline.
|
||||
InstancesWithMissingPatches int32
|
||||
|
||||
// The number of managed nodes with patches that aren't applicable.
|
||||
InstancesWithNotApplicablePatches int32
|
||||
|
||||
// The number of managed nodes with patches installed that are specified as other
|
||||
// than Critical or Security but aren't compliant with the patch baseline. The
|
||||
// status of these managed nodes is NON_COMPLIANT .
|
||||
InstancesWithOtherNonCompliantPatches *int32
|
||||
|
||||
// The number of managed nodes where patches that are specified as Security in a
|
||||
// patch advisory aren't installed. These patches might be missing, have failed
|
||||
// installation, were rejected, or were installed but awaiting a required managed
|
||||
// node reboot. The status of these managed nodes is NON_COMPLIANT .
|
||||
InstancesWithSecurityNonCompliantPatches *int32
|
||||
|
||||
// The number of managed nodes with NotApplicable patches beyond the supported
|
||||
// limit, which aren't reported by name to Inventory. Inventory is a capability of
|
||||
// Amazon Web Services Systems Manager.
|
||||
InstancesWithUnreportedNotApplicablePatches *int32
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribePatchGroupStateMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePatchGroupState{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePatchGroupState{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePatchGroupState"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribePatchGroupStateValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchGroupState(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribePatchGroupState(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribePatchGroupState",
|
||||
}
|
||||
}
|
||||
240
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go
generated
vendored
Normal file
240
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go
generated
vendored
Normal file
@@ -0,0 +1,240 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists all patch groups that have been registered with patch baselines.
|
||||
func (c *Client) DescribePatchGroups(ctx context.Context, params *DescribePatchGroupsInput, optFns ...func(*Options)) (*DescribePatchGroupsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribePatchGroupsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribePatchGroups", params, optFns, c.addOperationDescribePatchGroupsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribePatchGroupsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribePatchGroupsInput struct {
|
||||
|
||||
// Each element in the array is a structure containing a key-value pair. Supported
|
||||
// keys for DescribePatchGroups include the following:
|
||||
// - NAME_PREFIX Sample values: AWS- | My- .
|
||||
// - OPERATING_SYSTEM Sample values: AMAZON_LINUX | SUSE | WINDOWS
|
||||
Filters []types.PatchOrchestratorFilter
|
||||
|
||||
// The maximum number of patch groups to return (per page).
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribePatchGroupsOutput struct {
|
||||
|
||||
// Each entry in the array contains:
|
||||
// - PatchGroup : string (between 1 and 256 characters. Regex:
|
||||
// ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$)
|
||||
// - PatchBaselineIdentity : A PatchBaselineIdentity element.
|
||||
Mappings []types.PatchGroupPatchBaselineMapping
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribePatchGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePatchGroups{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePatchGroups{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePatchGroups"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchGroups(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribePatchGroupsAPIClient is a client that implements the
|
||||
// DescribePatchGroups operation.
|
||||
type DescribePatchGroupsAPIClient interface {
|
||||
DescribePatchGroups(context.Context, *DescribePatchGroupsInput, ...func(*Options)) (*DescribePatchGroupsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribePatchGroupsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribePatchGroupsPaginatorOptions is the paginator options for
|
||||
// DescribePatchGroups
|
||||
type DescribePatchGroupsPaginatorOptions struct {
|
||||
// The maximum number of patch groups to return (per page).
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribePatchGroupsPaginator is a paginator for DescribePatchGroups
|
||||
type DescribePatchGroupsPaginator struct {
|
||||
options DescribePatchGroupsPaginatorOptions
|
||||
client DescribePatchGroupsAPIClient
|
||||
params *DescribePatchGroupsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribePatchGroupsPaginator returns a new DescribePatchGroupsPaginator
|
||||
func NewDescribePatchGroupsPaginator(client DescribePatchGroupsAPIClient, params *DescribePatchGroupsInput, optFns ...func(*DescribePatchGroupsPaginatorOptions)) *DescribePatchGroupsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribePatchGroupsInput{}
|
||||
}
|
||||
|
||||
options := DescribePatchGroupsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribePatchGroupsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribePatchGroupsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribePatchGroups page.
|
||||
func (p *DescribePatchGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePatchGroupsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribePatchGroups(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribePatchGroups(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribePatchGroups",
|
||||
}
|
||||
}
|
||||
265
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go
generated
vendored
Normal file
265
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go
generated
vendored
Normal file
@@ -0,0 +1,265 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Lists the properties of available patches organized by product, product family,
|
||||
// classification, severity, and other properties of available patches. You can use
|
||||
// the reported properties in the filters you specify in requests for operations
|
||||
// such as CreatePatchBaseline , UpdatePatchBaseline , DescribeAvailablePatches ,
|
||||
// and DescribePatchBaselines . The following section lists the properties that can
|
||||
// be used in filters for each major operating system type: AMAZON_LINUX Valid
|
||||
// properties: PRODUCT | CLASSIFICATION | SEVERITY AMAZON_LINUX_2 Valid
|
||||
// properties: PRODUCT | CLASSIFICATION | SEVERITY CENTOS Valid properties: PRODUCT
|
||||
// | CLASSIFICATION | SEVERITY DEBIAN Valid properties: PRODUCT | PRIORITY MACOS
|
||||
// Valid properties: PRODUCT | CLASSIFICATION ORACLE_LINUX Valid properties:
|
||||
// PRODUCT | CLASSIFICATION | SEVERITY REDHAT_ENTERPRISE_LINUX Valid properties:
|
||||
// PRODUCT | CLASSIFICATION | SEVERITY SUSE Valid properties: PRODUCT |
|
||||
// CLASSIFICATION | SEVERITY UBUNTU Valid properties: PRODUCT | PRIORITY WINDOWS
|
||||
// Valid properties: PRODUCT | PRODUCT_FAMILY | CLASSIFICATION | MSRC_SEVERITY
|
||||
func (c *Client) DescribePatchProperties(ctx context.Context, params *DescribePatchPropertiesInput, optFns ...func(*Options)) (*DescribePatchPropertiesOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribePatchPropertiesInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribePatchProperties", params, optFns, c.addOperationDescribePatchPropertiesMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribePatchPropertiesOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribePatchPropertiesInput struct {
|
||||
|
||||
// The operating system type for which to list patches.
|
||||
//
|
||||
// This member is required.
|
||||
OperatingSystem types.OperatingSystem
|
||||
|
||||
// The patch property for which you want to view patch details.
|
||||
//
|
||||
// This member is required.
|
||||
Property types.PatchProperty
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
// Indicates whether to list patches for the Windows operating system or for
|
||||
// applications released by Microsoft. Not applicable for the Linux or macOS
|
||||
// operating systems.
|
||||
PatchSet types.PatchSet
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribePatchPropertiesOutput struct {
|
||||
|
||||
// The token for the next set of items to return. (You use this token in the next
|
||||
// call.)
|
||||
NextToken *string
|
||||
|
||||
// A list of the properties for patches matching the filter request parameters.
|
||||
Properties []map[string]string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribePatchPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePatchProperties{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePatchProperties{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePatchProperties"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribePatchPropertiesValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchProperties(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribePatchPropertiesAPIClient is a client that implements the
|
||||
// DescribePatchProperties operation.
|
||||
type DescribePatchPropertiesAPIClient interface {
|
||||
DescribePatchProperties(context.Context, *DescribePatchPropertiesInput, ...func(*Options)) (*DescribePatchPropertiesOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribePatchPropertiesAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribePatchPropertiesPaginatorOptions is the paginator options for
|
||||
// DescribePatchProperties
|
||||
type DescribePatchPropertiesPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribePatchPropertiesPaginator is a paginator for DescribePatchProperties
|
||||
type DescribePatchPropertiesPaginator struct {
|
||||
options DescribePatchPropertiesPaginatorOptions
|
||||
client DescribePatchPropertiesAPIClient
|
||||
params *DescribePatchPropertiesInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribePatchPropertiesPaginator returns a new
|
||||
// DescribePatchPropertiesPaginator
|
||||
func NewDescribePatchPropertiesPaginator(client DescribePatchPropertiesAPIClient, params *DescribePatchPropertiesInput, optFns ...func(*DescribePatchPropertiesPaginatorOptions)) *DescribePatchPropertiesPaginator {
|
||||
if params == nil {
|
||||
params = &DescribePatchPropertiesInput{}
|
||||
}
|
||||
|
||||
options := DescribePatchPropertiesPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribePatchPropertiesPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribePatchPropertiesPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribePatchProperties page.
|
||||
func (p *DescribePatchPropertiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePatchPropertiesOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribePatchProperties(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribePatchProperties(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribePatchProperties",
|
||||
}
|
||||
}
|
||||
244
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go
generated
vendored
Normal file
244
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go
generated
vendored
Normal file
@@ -0,0 +1,244 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves a list of all active sessions (both connected and disconnected) or
|
||||
// terminated sessions from the past 30 days.
|
||||
func (c *Client) DescribeSessions(ctx context.Context, params *DescribeSessionsInput, optFns ...func(*Options)) (*DescribeSessionsOutput, error) {
|
||||
if params == nil {
|
||||
params = &DescribeSessionsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DescribeSessions", params, optFns, c.addOperationDescribeSessionsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DescribeSessionsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DescribeSessionsInput struct {
|
||||
|
||||
// The session status to retrieve a list of sessions for. For example, "Active".
|
||||
//
|
||||
// This member is required.
|
||||
State types.SessionState
|
||||
|
||||
// One or more filters to limit the type of sessions returned by the request.
|
||||
Filters []types.SessionFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DescribeSessionsOutput struct {
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
// A list of sessions meeting the request parameters.
|
||||
Sessions []types.Session
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeSessions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeSessions{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSessions"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDescribeSessionsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSessions(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DescribeSessionsAPIClient is a client that implements the DescribeSessions
|
||||
// operation.
|
||||
type DescribeSessionsAPIClient interface {
|
||||
DescribeSessions(context.Context, *DescribeSessionsInput, ...func(*Options)) (*DescribeSessionsOutput, error)
|
||||
}
|
||||
|
||||
var _ DescribeSessionsAPIClient = (*Client)(nil)
|
||||
|
||||
// DescribeSessionsPaginatorOptions is the paginator options for DescribeSessions
|
||||
type DescribeSessionsPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// DescribeSessionsPaginator is a paginator for DescribeSessions
|
||||
type DescribeSessionsPaginator struct {
|
||||
options DescribeSessionsPaginatorOptions
|
||||
client DescribeSessionsAPIClient
|
||||
params *DescribeSessionsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewDescribeSessionsPaginator returns a new DescribeSessionsPaginator
|
||||
func NewDescribeSessionsPaginator(client DescribeSessionsAPIClient, params *DescribeSessionsInput, optFns ...func(*DescribeSessionsPaginatorOptions)) *DescribeSessionsPaginator {
|
||||
if params == nil {
|
||||
params = &DescribeSessionsInput{}
|
||||
}
|
||||
|
||||
options := DescribeSessionsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &DescribeSessionsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *DescribeSessionsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next DescribeSessions page.
|
||||
func (p *DescribeSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSessionsOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.DescribeSessions(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDescribeSessions(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DescribeSessions",
|
||||
}
|
||||
}
|
||||
141
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go
generated
vendored
Normal file
141
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go
generated
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Deletes the association between an OpsItem and a related item. For example,
|
||||
// this API operation can delete an Incident Manager incident from an OpsItem.
|
||||
// Incident Manager is a capability of Amazon Web Services Systems Manager.
|
||||
func (c *Client) DisassociateOpsItemRelatedItem(ctx context.Context, params *DisassociateOpsItemRelatedItemInput, optFns ...func(*Options)) (*DisassociateOpsItemRelatedItemOutput, error) {
|
||||
if params == nil {
|
||||
params = &DisassociateOpsItemRelatedItemInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DisassociateOpsItemRelatedItem", params, optFns, c.addOperationDisassociateOpsItemRelatedItemMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DisassociateOpsItemRelatedItemOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DisassociateOpsItemRelatedItemInput struct {
|
||||
|
||||
// The ID of the association for which you want to delete an association between
|
||||
// the OpsItem and a related item.
|
||||
//
|
||||
// This member is required.
|
||||
AssociationId *string
|
||||
|
||||
// The ID of the OpsItem for which you want to delete an association between the
|
||||
// OpsItem and a related item.
|
||||
//
|
||||
// This member is required.
|
||||
OpsItemId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type DisassociateOpsItemRelatedItemOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDisassociateOpsItemRelatedItemMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateOpsItemRelatedItem"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDisassociateOpsItemRelatedItemValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateOpsItemRelatedItem(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDisassociateOpsItemRelatedItem(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DisassociateOpsItemRelatedItem",
|
||||
}
|
||||
}
|
||||
139
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go
generated
vendored
Normal file
139
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go
generated
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Get detailed information about a particular Automation execution.
|
||||
func (c *Client) GetAutomationExecution(ctx context.Context, params *GetAutomationExecutionInput, optFns ...func(*Options)) (*GetAutomationExecutionOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetAutomationExecutionInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetAutomationExecution", params, optFns, c.addOperationGetAutomationExecutionMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetAutomationExecutionOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetAutomationExecutionInput struct {
|
||||
|
||||
// The unique identifier for an existing automation execution to examine. The
|
||||
// execution ID is returned by StartAutomationExecution when the execution of an
|
||||
// Automation runbook is initiated.
|
||||
//
|
||||
// This member is required.
|
||||
AutomationExecutionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetAutomationExecutionOutput struct {
|
||||
|
||||
// Detailed information about the current state of an automation execution.
|
||||
AutomationExecution *types.AutomationExecution
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetAutomationExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetAutomationExecution{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetAutomationExecution{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetAutomationExecution"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetAutomationExecutionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAutomationExecution(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetAutomationExecution(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetAutomationExecution",
|
||||
}
|
||||
}
|
||||
168
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go
generated
vendored
Normal file
168
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go
generated
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Gets the state of a Amazon Web Services Systems Manager change calendar at the
|
||||
// current time or a specified time. If you specify a time, GetCalendarState
|
||||
// returns the state of the calendar at that specific time, and returns the next
|
||||
// time that the change calendar state will transition. If you don't specify a
|
||||
// time, GetCalendarState uses the current time. Change Calendar entries have two
|
||||
// possible states: OPEN or CLOSED . If you specify more than one calendar in a
|
||||
// request, the command returns the status of OPEN only if all calendars in the
|
||||
// request are open. If one or more calendars in the request are closed, the status
|
||||
// returned is CLOSED . For more information about Change Calendar, a capability of
|
||||
// Amazon Web Services Systems Manager, see Amazon Web Services Systems Manager
|
||||
// Change Calendar (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
func (c *Client) GetCalendarState(ctx context.Context, params *GetCalendarStateInput, optFns ...func(*Options)) (*GetCalendarStateOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetCalendarStateInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetCalendarState", params, optFns, c.addOperationGetCalendarStateMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetCalendarStateOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetCalendarStateInput struct {
|
||||
|
||||
// The names or Amazon Resource Names (ARNs) of the Systems Manager documents (SSM
|
||||
// documents) that represent the calendar entries for which you want to get the
|
||||
// state.
|
||||
//
|
||||
// This member is required.
|
||||
CalendarNames []string
|
||||
|
||||
// (Optional) The specific time for which you want to get calendar state
|
||||
// information, in ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) format. If
|
||||
// you don't specify a value or AtTime , the current time is used.
|
||||
AtTime *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetCalendarStateOutput struct {
|
||||
|
||||
// The time, as an ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) string, that
|
||||
// you specified in your command. If you don't specify a time, GetCalendarState
|
||||
// uses the current time.
|
||||
AtTime *string
|
||||
|
||||
// The time, as an ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) string, that
|
||||
// the calendar state will change. If the current calendar state is OPEN ,
|
||||
// NextTransitionTime indicates when the calendar state changes to CLOSED , and
|
||||
// vice-versa.
|
||||
NextTransitionTime *string
|
||||
|
||||
// The state of the calendar. An OPEN calendar indicates that actions are allowed
|
||||
// to proceed, and a CLOSED calendar indicates that actions aren't allowed to
|
||||
// proceed.
|
||||
State types.CalendarState
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetCalendarStateMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetCalendarState{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetCalendarState{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetCalendarState"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetCalendarStateValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCalendarState(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetCalendarState(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetCalendarState",
|
||||
}
|
||||
}
|
||||
565
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go
generated
vendored
Normal file
565
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go
generated
vendored
Normal file
@@ -0,0 +1,565 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithytime "github.com/aws/smithy-go/time"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
smithywaiter "github.com/aws/smithy-go/waiter"
|
||||
"github.com/jmespath/go-jmespath"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Returns detailed information about command execution for an invocation or
|
||||
// plugin. GetCommandInvocation only gives the execution status of a plugin in a
|
||||
// document. To get the command execution status on a specific managed node, use
|
||||
// ListCommandInvocations . To get the command execution status across managed
|
||||
// nodes, use ListCommands .
|
||||
func (c *Client) GetCommandInvocation(ctx context.Context, params *GetCommandInvocationInput, optFns ...func(*Options)) (*GetCommandInvocationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetCommandInvocationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetCommandInvocation", params, optFns, c.addOperationGetCommandInvocationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetCommandInvocationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetCommandInvocationInput struct {
|
||||
|
||||
// (Required) The parent command ID of the invocation plugin.
|
||||
//
|
||||
// This member is required.
|
||||
CommandId *string
|
||||
|
||||
// (Required) The ID of the managed node targeted by the command. A managed node
|
||||
// can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and
|
||||
// on-premises server or VM in your hybrid environment that is configured for
|
||||
// Amazon Web Services Systems Manager.
|
||||
//
|
||||
// This member is required.
|
||||
InstanceId *string
|
||||
|
||||
// The name of the step for which you want detailed results. If the document
|
||||
// contains only one step, you can omit the name and details for that step. If the
|
||||
// document contains more than one step, you must specify the name of the step for
|
||||
// which you want to view details. Be sure to specify the name of the step, not the
|
||||
// name of a plugin like aws:RunShellScript . To find the PluginName , check the
|
||||
// document content and find the name of the step you want details for.
|
||||
// Alternatively, use ListCommandInvocations with the CommandId and Details
|
||||
// parameters. The PluginName is the Name attribute of the CommandPlugin object in
|
||||
// the CommandPlugins list.
|
||||
PluginName *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetCommandInvocationOutput struct {
|
||||
|
||||
// Amazon CloudWatch Logs information where Systems Manager sent the command
|
||||
// output.
|
||||
CloudWatchOutputConfig *types.CloudWatchOutputConfig
|
||||
|
||||
// The parent command ID of the invocation plugin.
|
||||
CommandId *string
|
||||
|
||||
// The comment text for the command.
|
||||
Comment *string
|
||||
|
||||
// The name of the document that was run. For example, AWS-RunShellScript .
|
||||
DocumentName *string
|
||||
|
||||
// The Systems Manager document (SSM document) version used in the request.
|
||||
DocumentVersion *string
|
||||
|
||||
// Duration since ExecutionStartDateTime .
|
||||
ExecutionElapsedTime *string
|
||||
|
||||
// The date and time the plugin finished running. Date and time are written in ISO
|
||||
// 8601 format. For example, June 7, 2017 is represented as 2017-06-7. The
|
||||
// following sample Amazon Web Services CLI command uses the InvokedAfter filter.
|
||||
// aws ssm list-commands --filters key=InvokedAfter,value=2017-06-07T00:00:00Z If
|
||||
// the plugin hasn't started to run, the string is empty.
|
||||
ExecutionEndDateTime *string
|
||||
|
||||
// The date and time the plugin started running. Date and time are written in ISO
|
||||
// 8601 format. For example, June 7, 2017 is represented as 2017-06-7. The
|
||||
// following sample Amazon Web Services CLI command uses the InvokedBefore filter.
|
||||
// aws ssm list-commands --filters key=InvokedBefore,value=2017-06-07T00:00:00Z If
|
||||
// the plugin hasn't started to run, the string is empty.
|
||||
ExecutionStartDateTime *string
|
||||
|
||||
// The ID of the managed node targeted by the command. A managed node can be an
|
||||
// Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, or on-premises
|
||||
// server or VM in your hybrid environment that is configured for Amazon Web
|
||||
// Services Systems Manager.
|
||||
InstanceId *string
|
||||
|
||||
// The name of the plugin, or step name, for which details are reported. For
|
||||
// example, aws:RunShellScript is a plugin.
|
||||
PluginName *string
|
||||
|
||||
// The error level response code for the plugin script. If the response code is -1
|
||||
// , then the command hasn't started running on the managed node, or it wasn't
|
||||
// received by the node.
|
||||
ResponseCode int32
|
||||
|
||||
// The first 8,000 characters written by the plugin to stderr . If the command
|
||||
// hasn't finished running, then this string is empty.
|
||||
StandardErrorContent *string
|
||||
|
||||
// The URL for the complete text written by the plugin to stderr . If the command
|
||||
// hasn't finished running, then this string is empty.
|
||||
StandardErrorUrl *string
|
||||
|
||||
// The first 24,000 characters written by the plugin to stdout . If the command
|
||||
// hasn't finished running, if ExecutionStatus is neither Succeeded nor Failed,
|
||||
// then this string is empty.
|
||||
StandardOutputContent *string
|
||||
|
||||
// The URL for the complete text written by the plugin to stdout in Amazon Simple
|
||||
// Storage Service (Amazon S3). If an S3 bucket wasn't specified, then this string
|
||||
// is empty.
|
||||
StandardOutputUrl *string
|
||||
|
||||
// The status of this invocation plugin. This status can be different than
|
||||
// StatusDetails .
|
||||
Status types.CommandInvocationStatus
|
||||
|
||||
// A detailed status of the command execution for an invocation. StatusDetails
|
||||
// includes more information than Status because it includes states resulting from
|
||||
// error and concurrency control parameters. StatusDetails can show different
|
||||
// results than Status . For more information about these statuses, see
|
||||
// Understanding command statuses (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one
|
||||
// of the following values:
|
||||
// - Pending: The command hasn't been sent to the managed node.
|
||||
// - In Progress: The command has been sent to the managed node but hasn't
|
||||
// reached a terminal state.
|
||||
// - Delayed: The system attempted to send the command to the target, but the
|
||||
// target wasn't available. The managed node might not be available because of
|
||||
// network issues, because the node was stopped, or for similar reasons. The system
|
||||
// will try to send the command again.
|
||||
// - Success: The command or plugin ran successfully. This is a terminal state.
|
||||
// - Delivery Timed Out: The command wasn't delivered to the managed node before
|
||||
// the delivery timeout expired. Delivery timeouts don't count against the parent
|
||||
// command's MaxErrors limit, but they do contribute to whether the parent
|
||||
// command status is Success or Incomplete. This is a terminal state.
|
||||
// - Execution Timed Out: The command started to run on the managed node, but
|
||||
// the execution wasn't complete before the timeout expired. Execution timeouts
|
||||
// count against the MaxErrors limit of the parent command. This is a terminal
|
||||
// state.
|
||||
// - Failed: The command wasn't run successfully on the managed node. For a
|
||||
// plugin, this indicates that the result code wasn't zero. For a command
|
||||
// invocation, this indicates that the result code for one or more plugins wasn't
|
||||
// zero. Invocation failures count against the MaxErrors limit of the parent
|
||||
// command. This is a terminal state.
|
||||
// - Cancelled: The command was terminated before it was completed. This is a
|
||||
// terminal state.
|
||||
// - Undeliverable: The command can't be delivered to the managed node. The node
|
||||
// might not exist or might not be responding. Undeliverable invocations don't
|
||||
// count against the parent command's MaxErrors limit and don't contribute to
|
||||
// whether the parent command status is Success or Incomplete. This is a terminal
|
||||
// state.
|
||||
// - Terminated: The parent command exceeded its MaxErrors limit and subsequent
|
||||
// command invocations were canceled by the system. This is a terminal state.
|
||||
StatusDetails *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetCommandInvocationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetCommandInvocation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetCommandInvocation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetCommandInvocation"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetCommandInvocationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCommandInvocation(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetCommandInvocationAPIClient is a client that implements the
|
||||
// GetCommandInvocation operation.
|
||||
type GetCommandInvocationAPIClient interface {
|
||||
GetCommandInvocation(context.Context, *GetCommandInvocationInput, ...func(*Options)) (*GetCommandInvocationOutput, error)
|
||||
}
|
||||
|
||||
var _ GetCommandInvocationAPIClient = (*Client)(nil)
|
||||
|
||||
// CommandExecutedWaiterOptions are waiter options for CommandExecutedWaiter
|
||||
type CommandExecutedWaiterOptions struct {
|
||||
|
||||
// Set of options to modify how an operation is invoked. These apply to all
|
||||
// operations invoked for this client. Use functional options on operation call to
|
||||
// modify this list for per operation behavior.
|
||||
APIOptions []func(*middleware.Stack) error
|
||||
|
||||
// MinDelay is the minimum amount of time to delay between retries. If unset,
|
||||
// CommandExecutedWaiter will use default minimum delay of 5 seconds. Note that
|
||||
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
|
||||
MinDelay time.Duration
|
||||
|
||||
// MaxDelay is the maximum amount of time to delay between retries. If unset or
|
||||
// set to zero, CommandExecutedWaiter will use default max delay of 120 seconds.
|
||||
// Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
|
||||
MaxDelay time.Duration
|
||||
|
||||
// LogWaitAttempts is used to enable logging for waiter retry attempts
|
||||
LogWaitAttempts bool
|
||||
|
||||
// Retryable is function that can be used to override the service defined
|
||||
// waiter-behavior based on operation output, or returned error. This function is
|
||||
// used by the waiter to decide if a state is retryable or a terminal state. By
|
||||
// default service-modeled logic will populate this option. This option can thus be
|
||||
// used to define a custom waiter state with fall-back to service-modeled waiter
|
||||
// state mutators.The function returns an error in case of a failure state. In case
|
||||
// of retry state, this function returns a bool value of true and nil error, while
|
||||
// in case of success it returns a bool value of false and nil error.
|
||||
Retryable func(context.Context, *GetCommandInvocationInput, *GetCommandInvocationOutput, error) (bool, error)
|
||||
}
|
||||
|
||||
// CommandExecutedWaiter defines the waiters for CommandExecuted
|
||||
type CommandExecutedWaiter struct {
|
||||
client GetCommandInvocationAPIClient
|
||||
|
||||
options CommandExecutedWaiterOptions
|
||||
}
|
||||
|
||||
// NewCommandExecutedWaiter constructs a CommandExecutedWaiter.
|
||||
func NewCommandExecutedWaiter(client GetCommandInvocationAPIClient, optFns ...func(*CommandExecutedWaiterOptions)) *CommandExecutedWaiter {
|
||||
options := CommandExecutedWaiterOptions{}
|
||||
options.MinDelay = 5 * time.Second
|
||||
options.MaxDelay = 120 * time.Second
|
||||
options.Retryable = commandExecutedStateRetryable
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
return &CommandExecutedWaiter{
|
||||
client: client,
|
||||
options: options,
|
||||
}
|
||||
}
|
||||
|
||||
// Wait calls the waiter function for CommandExecuted waiter. The maxWaitDur is
|
||||
// the maximum wait duration the waiter will wait. The maxWaitDur is required and
|
||||
// must be greater than zero.
|
||||
func (w *CommandExecutedWaiter) Wait(ctx context.Context, params *GetCommandInvocationInput, maxWaitDur time.Duration, optFns ...func(*CommandExecutedWaiterOptions)) error {
|
||||
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
|
||||
return err
|
||||
}
|
||||
|
||||
// WaitForOutput calls the waiter function for CommandExecuted waiter and returns
|
||||
// the output of the successful operation. The maxWaitDur is the maximum wait
|
||||
// duration the waiter will wait. The maxWaitDur is required and must be greater
|
||||
// than zero.
|
||||
func (w *CommandExecutedWaiter) WaitForOutput(ctx context.Context, params *GetCommandInvocationInput, maxWaitDur time.Duration, optFns ...func(*CommandExecutedWaiterOptions)) (*GetCommandInvocationOutput, error) {
|
||||
if maxWaitDur <= 0 {
|
||||
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
|
||||
}
|
||||
|
||||
options := w.options
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
if options.MaxDelay <= 0 {
|
||||
options.MaxDelay = 120 * time.Second
|
||||
}
|
||||
|
||||
if options.MinDelay > options.MaxDelay {
|
||||
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
|
||||
}
|
||||
|
||||
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
|
||||
defer cancelFn()
|
||||
|
||||
logger := smithywaiter.Logger{}
|
||||
remainingTime := maxWaitDur
|
||||
|
||||
var attempt int64
|
||||
for {
|
||||
|
||||
attempt++
|
||||
apiOptions := options.APIOptions
|
||||
start := time.Now()
|
||||
|
||||
if options.LogWaitAttempts {
|
||||
logger.Attempt = attempt
|
||||
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
|
||||
apiOptions = append(apiOptions, logger.AddLogger)
|
||||
}
|
||||
|
||||
out, err := w.client.GetCommandInvocation(ctx, params, func(o *Options) {
|
||||
o.APIOptions = append(o.APIOptions, apiOptions...)
|
||||
})
|
||||
|
||||
retryable, err := options.Retryable(ctx, params, out, err)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !retryable {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
remainingTime -= time.Since(start)
|
||||
if remainingTime < options.MinDelay || remainingTime <= 0 {
|
||||
break
|
||||
}
|
||||
|
||||
// compute exponential backoff between waiter retries
|
||||
delay, err := smithywaiter.ComputeDelay(
|
||||
attempt, options.MinDelay, options.MaxDelay, remainingTime,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error computing waiter delay, %w", err)
|
||||
}
|
||||
|
||||
remainingTime -= delay
|
||||
// sleep for the delay amount before invoking a request
|
||||
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
|
||||
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("exceeded max wait time for CommandExecuted waiter")
|
||||
}
|
||||
|
||||
func commandExecutedStateRetryable(ctx context.Context, input *GetCommandInvocationInput, output *GetCommandInvocationOutput, err error) (bool, error) {
|
||||
|
||||
if err == nil {
|
||||
pathValue, err := jmespath.Search("Status", output)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("error evaluating waiter state: %w", err)
|
||||
}
|
||||
|
||||
expectedValue := "Pending"
|
||||
value, ok := pathValue.(types.CommandInvocationStatus)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("waiter comparator expected types.CommandInvocationStatus value, got %T", pathValue)
|
||||
}
|
||||
|
||||
if string(value) == expectedValue {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
pathValue, err := jmespath.Search("Status", output)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("error evaluating waiter state: %w", err)
|
||||
}
|
||||
|
||||
expectedValue := "InProgress"
|
||||
value, ok := pathValue.(types.CommandInvocationStatus)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("waiter comparator expected types.CommandInvocationStatus value, got %T", pathValue)
|
||||
}
|
||||
|
||||
if string(value) == expectedValue {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
pathValue, err := jmespath.Search("Status", output)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("error evaluating waiter state: %w", err)
|
||||
}
|
||||
|
||||
expectedValue := "Delayed"
|
||||
value, ok := pathValue.(types.CommandInvocationStatus)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("waiter comparator expected types.CommandInvocationStatus value, got %T", pathValue)
|
||||
}
|
||||
|
||||
if string(value) == expectedValue {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
pathValue, err := jmespath.Search("Status", output)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("error evaluating waiter state: %w", err)
|
||||
}
|
||||
|
||||
expectedValue := "Success"
|
||||
value, ok := pathValue.(types.CommandInvocationStatus)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("waiter comparator expected types.CommandInvocationStatus value, got %T", pathValue)
|
||||
}
|
||||
|
||||
if string(value) == expectedValue {
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
pathValue, err := jmespath.Search("Status", output)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("error evaluating waiter state: %w", err)
|
||||
}
|
||||
|
||||
expectedValue := "Cancelled"
|
||||
value, ok := pathValue.(types.CommandInvocationStatus)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("waiter comparator expected types.CommandInvocationStatus value, got %T", pathValue)
|
||||
}
|
||||
|
||||
if string(value) == expectedValue {
|
||||
return false, fmt.Errorf("waiter state transitioned to Failure")
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
pathValue, err := jmespath.Search("Status", output)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("error evaluating waiter state: %w", err)
|
||||
}
|
||||
|
||||
expectedValue := "TimedOut"
|
||||
value, ok := pathValue.(types.CommandInvocationStatus)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("waiter comparator expected types.CommandInvocationStatus value, got %T", pathValue)
|
||||
}
|
||||
|
||||
if string(value) == expectedValue {
|
||||
return false, fmt.Errorf("waiter state transitioned to Failure")
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
pathValue, err := jmespath.Search("Status", output)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("error evaluating waiter state: %w", err)
|
||||
}
|
||||
|
||||
expectedValue := "Failed"
|
||||
value, ok := pathValue.(types.CommandInvocationStatus)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("waiter comparator expected types.CommandInvocationStatus value, got %T", pathValue)
|
||||
}
|
||||
|
||||
if string(value) == expectedValue {
|
||||
return false, fmt.Errorf("waiter state transitioned to Failure")
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
pathValue, err := jmespath.Search("Status", output)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("error evaluating waiter state: %w", err)
|
||||
}
|
||||
|
||||
expectedValue := "Cancelling"
|
||||
value, ok := pathValue.(types.CommandInvocationStatus)
|
||||
if !ok {
|
||||
return false, fmt.Errorf("waiter comparator expected types.CommandInvocationStatus value, got %T", pathValue)
|
||||
}
|
||||
|
||||
if string(value) == expectedValue {
|
||||
return false, fmt.Errorf("waiter state transitioned to Failure")
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
var errorType *types.InvocationDoesNotExist
|
||||
if errors.As(err, &errorType) {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetCommandInvocation(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetCommandInvocation",
|
||||
}
|
||||
}
|
||||
142
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go
generated
vendored
Normal file
142
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the Session Manager connection status for a managed node to determine
|
||||
// whether it is running and ready to receive Session Manager connections.
|
||||
func (c *Client) GetConnectionStatus(ctx context.Context, params *GetConnectionStatusInput, optFns ...func(*Options)) (*GetConnectionStatusOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetConnectionStatusInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetConnectionStatus", params, optFns, c.addOperationGetConnectionStatusMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetConnectionStatusOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetConnectionStatusInput struct {
|
||||
|
||||
// The managed node ID.
|
||||
//
|
||||
// This member is required.
|
||||
Target *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetConnectionStatusOutput struct {
|
||||
|
||||
// The status of the connection to the managed node. For example, 'Connected' or
|
||||
// 'Not Connected'.
|
||||
Status types.ConnectionStatus
|
||||
|
||||
// The ID of the managed node to check connection status.
|
||||
Target *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetConnectionStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetConnectionStatus{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetConnectionStatus{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetConnectionStatus"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetConnectionStatusValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConnectionStatus(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetConnectionStatus(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetConnectionStatus",
|
||||
}
|
||||
}
|
||||
138
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go
generated
vendored
Normal file
138
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go
generated
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the default patch baseline. Amazon Web Services Systems Manager
|
||||
// supports creating multiple default patch baselines. For example, you can create
|
||||
// a default patch baseline for each operating system. If you don't specify an
|
||||
// operating system value, the default patch baseline for Windows is returned.
|
||||
func (c *Client) GetDefaultPatchBaseline(ctx context.Context, params *GetDefaultPatchBaselineInput, optFns ...func(*Options)) (*GetDefaultPatchBaselineOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetDefaultPatchBaselineInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetDefaultPatchBaseline", params, optFns, c.addOperationGetDefaultPatchBaselineMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetDefaultPatchBaselineOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetDefaultPatchBaselineInput struct {
|
||||
|
||||
// Returns the default patch baseline for the specified operating system.
|
||||
OperatingSystem types.OperatingSystem
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetDefaultPatchBaselineOutput struct {
|
||||
|
||||
// The ID of the default patch baseline.
|
||||
BaselineId *string
|
||||
|
||||
// The operating system for the returned patch baseline.
|
||||
OperatingSystem types.OperatingSystem
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetDefaultPatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDefaultPatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDefaultPatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetDefaultPatchBaseline"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDefaultPatchBaseline(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetDefaultPatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetDefaultPatchBaseline",
|
||||
}
|
||||
}
|
||||
165
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go
generated
vendored
Normal file
165
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go
generated
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the current snapshot for the patch baseline the managed node uses.
|
||||
// This API is primarily used by the AWS-RunPatchBaseline Systems Manager document
|
||||
// (SSM document). If you run the command locally, such as with the Command Line
|
||||
// Interface (CLI), the system attempts to use your local Amazon Web Services
|
||||
// credentials and the operation fails. To avoid this, you can run the command in
|
||||
// the Amazon Web Services Systems Manager console. Use Run Command, a capability
|
||||
// of Amazon Web Services Systems Manager, with an SSM document that enables you to
|
||||
// target a managed node with a script or command. For example, run the command
|
||||
// using the AWS-RunShellScript document or the AWS-RunPowerShellScript document.
|
||||
func (c *Client) GetDeployablePatchSnapshotForInstance(ctx context.Context, params *GetDeployablePatchSnapshotForInstanceInput, optFns ...func(*Options)) (*GetDeployablePatchSnapshotForInstanceOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetDeployablePatchSnapshotForInstanceInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetDeployablePatchSnapshotForInstance", params, optFns, c.addOperationGetDeployablePatchSnapshotForInstanceMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetDeployablePatchSnapshotForInstanceOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetDeployablePatchSnapshotForInstanceInput struct {
|
||||
|
||||
// The ID of the managed node for which the appropriate patch snapshot should be
|
||||
// retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
InstanceId *string
|
||||
|
||||
// The snapshot ID provided by the user when running AWS-RunPatchBaseline .
|
||||
//
|
||||
// This member is required.
|
||||
SnapshotId *string
|
||||
|
||||
// Defines the basic information about a patch baseline override.
|
||||
BaselineOverride *types.BaselineOverride
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetDeployablePatchSnapshotForInstanceOutput struct {
|
||||
|
||||
// The managed node ID.
|
||||
InstanceId *string
|
||||
|
||||
// Returns the specific operating system (for example Windows Server 2012 or
|
||||
// Amazon Linux 2015.09) on the managed node for the specified patch snapshot.
|
||||
Product *string
|
||||
|
||||
// A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to
|
||||
// download the patch snapshot.
|
||||
SnapshotDownloadUrl *string
|
||||
|
||||
// The user-defined snapshot ID.
|
||||
SnapshotId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetDeployablePatchSnapshotForInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetDeployablePatchSnapshotForInstance"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetDeployablePatchSnapshotForInstanceValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeployablePatchSnapshotForInstance(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetDeployablePatchSnapshotForInstance(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetDeployablePatchSnapshotForInstance",
|
||||
}
|
||||
}
|
||||
202
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go
generated
vendored
Normal file
202
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Gets the contents of the specified Amazon Web Services Systems Manager document
|
||||
// (SSM document).
|
||||
func (c *Client) GetDocument(ctx context.Context, params *GetDocumentInput, optFns ...func(*Options)) (*GetDocumentOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetDocumentInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetDocument", params, optFns, c.addOperationGetDocumentMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetDocumentOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetDocumentInput struct {
|
||||
|
||||
// The name of the SSM document.
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// Returns the document in the specified format. The document format can be either
|
||||
// JSON or YAML. JSON is the default format.
|
||||
DocumentFormat types.DocumentFormat
|
||||
|
||||
// The document version for which you want information.
|
||||
DocumentVersion *string
|
||||
|
||||
// An optional field specifying the version of the artifact associated with the
|
||||
// document. For example, "Release 12, Update 6". This value is unique across all
|
||||
// versions of a document and can't be changed.
|
||||
VersionName *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetDocumentOutput struct {
|
||||
|
||||
// A description of the document attachments, including names, locations, sizes,
|
||||
// and so on.
|
||||
AttachmentsContent []types.AttachmentContent
|
||||
|
||||
// The contents of the SSM document.
|
||||
Content *string
|
||||
|
||||
// The date the SSM document was created.
|
||||
CreatedDate *time.Time
|
||||
|
||||
// The friendly name of the SSM document. This value can differ for each version
|
||||
// of the document. If you want to update this value, see UpdateDocument .
|
||||
DisplayName *string
|
||||
|
||||
// The document format, either JSON or YAML.
|
||||
DocumentFormat types.DocumentFormat
|
||||
|
||||
// The document type.
|
||||
DocumentType types.DocumentType
|
||||
|
||||
// The document version.
|
||||
DocumentVersion *string
|
||||
|
||||
// The name of the SSM document.
|
||||
Name *string
|
||||
|
||||
// A list of SSM documents required by a document. For example, an
|
||||
// ApplicationConfiguration document requires an ApplicationConfigurationSchema
|
||||
// document.
|
||||
Requires []types.DocumentRequires
|
||||
|
||||
// The current review status of a new custom Systems Manager document (SSM
|
||||
// document) created by a member of your organization, or of the latest version of
|
||||
// an existing SSM document. Only one version of an SSM document can be in the
|
||||
// APPROVED state at a time. When a new version is approved, the status of the
|
||||
// previous version changes to REJECTED. Only one version of an SSM document can be
|
||||
// in review, or PENDING, at a time.
|
||||
ReviewStatus types.ReviewStatus
|
||||
|
||||
// The status of the SSM document, such as Creating , Active , Updating , Failed ,
|
||||
// and Deleting .
|
||||
Status types.DocumentStatus
|
||||
|
||||
// A message returned by Amazon Web Services Systems Manager that explains the
|
||||
// Status value. For example, a Failed status might be explained by the
|
||||
// StatusInformation message, "The specified S3 bucket doesn't exist. Verify that
|
||||
// the URL of the S3 bucket is correct."
|
||||
StatusInformation *string
|
||||
|
||||
// The version of the artifact associated with the document. For example, "Release
|
||||
// 12, Update 6". This value is unique across all versions of a document, and can't
|
||||
// be changed.
|
||||
VersionName *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDocument{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDocument{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetDocument"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetDocumentValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDocument(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetDocument(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetDocument",
|
||||
}
|
||||
}
|
||||
247
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go
generated
vendored
Normal file
247
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go
generated
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Query inventory information. This includes managed node status, such as Stopped
|
||||
// or Terminated .
|
||||
func (c *Client) GetInventory(ctx context.Context, params *GetInventoryInput, optFns ...func(*Options)) (*GetInventoryOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetInventoryInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetInventory", params, optFns, c.addOperationGetInventoryMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetInventoryOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetInventoryInput struct {
|
||||
|
||||
// Returns counts of inventory types based on one or more expressions. For
|
||||
// example, if you aggregate by using an expression that uses the
|
||||
// AWS:InstanceInformation.PlatformType type, you can see a count of how many
|
||||
// Windows and Linux managed nodes exist in your inventoried fleet.
|
||||
Aggregators []types.InventoryAggregator
|
||||
|
||||
// One or more filters. Use a filter to return a more specific list of results.
|
||||
Filters []types.InventoryFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
// The list of inventory item types to return.
|
||||
ResultAttributes []types.ResultAttribute
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetInventoryOutput struct {
|
||||
|
||||
// Collection of inventory entities such as a collection of managed node inventory.
|
||||
Entities []types.InventoryResultEntity
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetInventoryMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetInventory{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetInventory{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetInventory"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetInventoryValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInventory(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetInventoryAPIClient is a client that implements the GetInventory operation.
|
||||
type GetInventoryAPIClient interface {
|
||||
GetInventory(context.Context, *GetInventoryInput, ...func(*Options)) (*GetInventoryOutput, error)
|
||||
}
|
||||
|
||||
var _ GetInventoryAPIClient = (*Client)(nil)
|
||||
|
||||
// GetInventoryPaginatorOptions is the paginator options for GetInventory
|
||||
type GetInventoryPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// GetInventoryPaginator is a paginator for GetInventory
|
||||
type GetInventoryPaginator struct {
|
||||
options GetInventoryPaginatorOptions
|
||||
client GetInventoryAPIClient
|
||||
params *GetInventoryInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewGetInventoryPaginator returns a new GetInventoryPaginator
|
||||
func NewGetInventoryPaginator(client GetInventoryAPIClient, params *GetInventoryInput, optFns ...func(*GetInventoryPaginatorOptions)) *GetInventoryPaginator {
|
||||
if params == nil {
|
||||
params = &GetInventoryInput{}
|
||||
}
|
||||
|
||||
options := GetInventoryPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &GetInventoryPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *GetInventoryPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next GetInventory page.
|
||||
func (p *GetInventoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetInventoryOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.GetInventory(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetInventory(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetInventory",
|
||||
}
|
||||
}
|
||||
245
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go
generated
vendored
Normal file
245
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go
generated
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Return a list of inventory type names for the account, or return a list of
|
||||
// attribute names for a specific Inventory item type.
|
||||
func (c *Client) GetInventorySchema(ctx context.Context, params *GetInventorySchemaInput, optFns ...func(*Options)) (*GetInventorySchemaOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetInventorySchemaInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetInventorySchema", params, optFns, c.addOperationGetInventorySchemaMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetInventorySchemaOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetInventorySchemaInput struct {
|
||||
|
||||
// Returns inventory schemas that support aggregation. For example, this call
|
||||
// returns the AWS:InstanceInformation type, because it supports aggregation based
|
||||
// on the PlatformName , PlatformType , and PlatformVersion attributes.
|
||||
Aggregator bool
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
// Returns the sub-type schema for a specified inventory type.
|
||||
SubType *bool
|
||||
|
||||
// The type of inventory item to return.
|
||||
TypeName *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetInventorySchemaOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// Inventory schemas returned by the request.
|
||||
Schemas []types.InventoryItemSchema
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetInventorySchemaMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetInventorySchema{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetInventorySchema{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetInventorySchema"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInventorySchema(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetInventorySchemaAPIClient is a client that implements the GetInventorySchema
|
||||
// operation.
|
||||
type GetInventorySchemaAPIClient interface {
|
||||
GetInventorySchema(context.Context, *GetInventorySchemaInput, ...func(*Options)) (*GetInventorySchemaOutput, error)
|
||||
}
|
||||
|
||||
var _ GetInventorySchemaAPIClient = (*Client)(nil)
|
||||
|
||||
// GetInventorySchemaPaginatorOptions is the paginator options for
|
||||
// GetInventorySchema
|
||||
type GetInventorySchemaPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// GetInventorySchemaPaginator is a paginator for GetInventorySchema
|
||||
type GetInventorySchemaPaginator struct {
|
||||
options GetInventorySchemaPaginatorOptions
|
||||
client GetInventorySchemaAPIClient
|
||||
params *GetInventorySchemaInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewGetInventorySchemaPaginator returns a new GetInventorySchemaPaginator
|
||||
func NewGetInventorySchemaPaginator(client GetInventorySchemaAPIClient, params *GetInventorySchemaInput, optFns ...func(*GetInventorySchemaPaginatorOptions)) *GetInventorySchemaPaginator {
|
||||
if params == nil {
|
||||
params = &GetInventorySchemaInput{}
|
||||
}
|
||||
|
||||
options := GetInventorySchemaPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &GetInventorySchemaPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *GetInventorySchemaPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next GetInventorySchema page.
|
||||
func (p *GetInventorySchemaPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetInventorySchemaOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.GetInventorySchema(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetInventorySchema(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetInventorySchema",
|
||||
}
|
||||
}
|
||||
190
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go
generated
vendored
Normal file
190
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go
generated
vendored
Normal file
@@ -0,0 +1,190 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Retrieves a maintenance window.
|
||||
func (c *Client) GetMaintenanceWindow(ctx context.Context, params *GetMaintenanceWindowInput, optFns ...func(*Options)) (*GetMaintenanceWindowOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetMaintenanceWindowInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindow", params, optFns, c.addOperationGetMaintenanceWindowMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetMaintenanceWindowOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowInput struct {
|
||||
|
||||
// The ID of the maintenance window for which you want to retrieve information.
|
||||
//
|
||||
// This member is required.
|
||||
WindowId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowOutput struct {
|
||||
|
||||
// Whether targets must be registered with the maintenance window before tasks can
|
||||
// be defined for those targets.
|
||||
AllowUnassociatedTargets bool
|
||||
|
||||
// The date the maintenance window was created.
|
||||
CreatedDate *time.Time
|
||||
|
||||
// The number of hours before the end of the maintenance window that Amazon Web
|
||||
// Services Systems Manager stops scheduling new tasks for execution.
|
||||
Cutoff int32
|
||||
|
||||
// The description of the maintenance window.
|
||||
Description *string
|
||||
|
||||
// The duration of the maintenance window in hours.
|
||||
Duration *int32
|
||||
|
||||
// Indicates whether the maintenance window is enabled.
|
||||
Enabled bool
|
||||
|
||||
// The date and time, in ISO-8601 Extended format, for when the maintenance window
|
||||
// is scheduled to become inactive. The maintenance window won't run after this
|
||||
// specified time.
|
||||
EndDate *string
|
||||
|
||||
// The date the maintenance window was last modified.
|
||||
ModifiedDate *time.Time
|
||||
|
||||
// The name of the maintenance window.
|
||||
Name *string
|
||||
|
||||
// The next time the maintenance window will actually run, taking into account any
|
||||
// specified times for the maintenance window to become active or inactive.
|
||||
NextExecutionTime *string
|
||||
|
||||
// The schedule of the maintenance window in the form of a cron or rate expression.
|
||||
Schedule *string
|
||||
|
||||
// The number of days to wait to run a maintenance window after the scheduled cron
|
||||
// expression date and time.
|
||||
ScheduleOffset *int32
|
||||
|
||||
// The time zone that the scheduled maintenance window executions are based on, in
|
||||
// Internet Assigned Numbers Authority (IANA) format. For example:
|
||||
// "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the
|
||||
// Time Zone Database (https://www.iana.org/time-zones) on the IANA website.
|
||||
ScheduleTimezone *string
|
||||
|
||||
// The date and time, in ISO-8601 Extended format, for when the maintenance window
|
||||
// is scheduled to become active. The maintenance window won't run before this
|
||||
// specified time.
|
||||
StartDate *string
|
||||
|
||||
// The ID of the created maintenance window.
|
||||
WindowId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindow{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindow"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetMaintenanceWindowValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindow(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetMaintenanceWindow",
|
||||
}
|
||||
}
|
||||
153
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go
generated
vendored
Normal file
153
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Retrieves details about a specific a maintenance window execution.
|
||||
func (c *Client) GetMaintenanceWindowExecution(ctx context.Context, params *GetMaintenanceWindowExecutionInput, optFns ...func(*Options)) (*GetMaintenanceWindowExecutionOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetMaintenanceWindowExecutionInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindowExecution", params, optFns, c.addOperationGetMaintenanceWindowExecutionMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetMaintenanceWindowExecutionOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowExecutionInput struct {
|
||||
|
||||
// The ID of the maintenance window execution that includes the task.
|
||||
//
|
||||
// This member is required.
|
||||
WindowExecutionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowExecutionOutput struct {
|
||||
|
||||
// The time the maintenance window finished running.
|
||||
EndTime *time.Time
|
||||
|
||||
// The time the maintenance window started running.
|
||||
StartTime *time.Time
|
||||
|
||||
// The status of the maintenance window execution.
|
||||
Status types.MaintenanceWindowExecutionStatus
|
||||
|
||||
// The details explaining the status. Not available for all status values.
|
||||
StatusDetails *string
|
||||
|
||||
// The ID of the task executions from the maintenance window execution.
|
||||
TaskIds []string
|
||||
|
||||
// The ID of the maintenance window execution.
|
||||
WindowExecutionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetMaintenanceWindowExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindowExecution{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindowExecution{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindowExecution"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetMaintenanceWindowExecutionValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindowExecution(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetMaintenanceWindowExecution(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetMaintenanceWindowExecution",
|
||||
}
|
||||
}
|
||||
197
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go
generated
vendored
Normal file
197
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go
generated
vendored
Normal file
@@ -0,0 +1,197 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Retrieves the details about a specific task run as part of a maintenance window
|
||||
// execution.
|
||||
func (c *Client) GetMaintenanceWindowExecutionTask(ctx context.Context, params *GetMaintenanceWindowExecutionTaskInput, optFns ...func(*Options)) (*GetMaintenanceWindowExecutionTaskOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetMaintenanceWindowExecutionTaskInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindowExecutionTask", params, optFns, c.addOperationGetMaintenanceWindowExecutionTaskMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetMaintenanceWindowExecutionTaskOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowExecutionTaskInput struct {
|
||||
|
||||
// The ID of the specific task execution in the maintenance window task that
|
||||
// should be retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
TaskId *string
|
||||
|
||||
// The ID of the maintenance window execution that includes the task.
|
||||
//
|
||||
// This member is required.
|
||||
WindowExecutionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowExecutionTaskOutput struct {
|
||||
|
||||
// The details for the CloudWatch alarm you applied to your maintenance window
|
||||
// task.
|
||||
AlarmConfiguration *types.AlarmConfiguration
|
||||
|
||||
// The time the task execution completed.
|
||||
EndTime *time.Time
|
||||
|
||||
// The defined maximum number of task executions that could be run in parallel.
|
||||
MaxConcurrency *string
|
||||
|
||||
// The defined maximum number of task execution errors allowed before scheduling
|
||||
// of the task execution would have been stopped.
|
||||
MaxErrors *string
|
||||
|
||||
// The priority of the task.
|
||||
Priority int32
|
||||
|
||||
// The role that was assumed when running the task.
|
||||
ServiceRole *string
|
||||
|
||||
// The time the task execution started.
|
||||
StartTime *time.Time
|
||||
|
||||
// The status of the task.
|
||||
Status types.MaintenanceWindowExecutionStatus
|
||||
|
||||
// The details explaining the status. Not available for all status values.
|
||||
StatusDetails *string
|
||||
|
||||
// The Amazon Resource Name (ARN) of the task that ran.
|
||||
TaskArn *string
|
||||
|
||||
// The ID of the specific task execution in the maintenance window task that was
|
||||
// retrieved.
|
||||
TaskExecutionId *string
|
||||
|
||||
// The parameters passed to the task when it was run. TaskParameters has been
|
||||
// deprecated. To specify parameters to pass to a task when it runs, instead use
|
||||
// the Parameters option in the TaskInvocationParameters structure. For
|
||||
// information about how Systems Manager handles these options for the supported
|
||||
// maintenance window task types, see MaintenanceWindowTaskInvocationParameters .
|
||||
// The map has the following format:
|
||||
// - Key : string, between 1 and 255 characters
|
||||
// - Value : an array of strings, each between 1 and 255 characters
|
||||
TaskParameters []map[string]types.MaintenanceWindowTaskParameterValueExpression
|
||||
|
||||
// The CloudWatch alarms that were invoked by the maintenance window task.
|
||||
TriggeredAlarms []types.AlarmStateInformation
|
||||
|
||||
// The type of task that was run.
|
||||
Type types.MaintenanceWindowTaskType
|
||||
|
||||
// The ID of the maintenance window execution that includes the task.
|
||||
WindowExecutionId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetMaintenanceWindowExecutionTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindowExecutionTask"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetMaintenanceWindowExecutionTaskValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindowExecutionTask(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetMaintenanceWindowExecutionTask(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetMaintenanceWindowExecutionTask",
|
||||
}
|
||||
}
|
||||
185
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go
generated
vendored
Normal file
185
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go
generated
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Retrieves information about a specific task running on a specific target.
|
||||
func (c *Client) GetMaintenanceWindowExecutionTaskInvocation(ctx context.Context, params *GetMaintenanceWindowExecutionTaskInvocationInput, optFns ...func(*Options)) (*GetMaintenanceWindowExecutionTaskInvocationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetMaintenanceWindowExecutionTaskInvocationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindowExecutionTaskInvocation", params, optFns, c.addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetMaintenanceWindowExecutionTaskInvocationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowExecutionTaskInvocationInput struct {
|
||||
|
||||
// The invocation ID to retrieve.
|
||||
//
|
||||
// This member is required.
|
||||
InvocationId *string
|
||||
|
||||
// The ID of the specific task in the maintenance window task that should be
|
||||
// retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
TaskId *string
|
||||
|
||||
// The ID of the maintenance window execution for which the task is a part.
|
||||
//
|
||||
// This member is required.
|
||||
WindowExecutionId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowExecutionTaskInvocationOutput struct {
|
||||
|
||||
// The time that the task finished running on the target.
|
||||
EndTime *time.Time
|
||||
|
||||
// The execution ID.
|
||||
ExecutionId *string
|
||||
|
||||
// The invocation ID.
|
||||
InvocationId *string
|
||||
|
||||
// User-provided value to be included in any Amazon CloudWatch Events or Amazon
|
||||
// EventBridge events raised while running tasks for these targets in this
|
||||
// maintenance window.
|
||||
OwnerInformation *string
|
||||
|
||||
// The parameters used at the time that the task ran.
|
||||
Parameters *string
|
||||
|
||||
// The time that the task started running on the target.
|
||||
StartTime *time.Time
|
||||
|
||||
// The task status for an invocation.
|
||||
Status types.MaintenanceWindowExecutionStatus
|
||||
|
||||
// The details explaining the status. Details are only available for certain
|
||||
// status values.
|
||||
StatusDetails *string
|
||||
|
||||
// The task execution ID.
|
||||
TaskExecutionId *string
|
||||
|
||||
// Retrieves the task type for a maintenance window.
|
||||
TaskType types.MaintenanceWindowTaskType
|
||||
|
||||
// The maintenance window execution ID.
|
||||
WindowExecutionId *string
|
||||
|
||||
// The maintenance window target ID.
|
||||
WindowTargetId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindowExecutionTaskInvocation"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetMaintenanceWindowExecutionTaskInvocationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindowExecutionTaskInvocation(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetMaintenanceWindowExecutionTaskInvocation(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetMaintenanceWindowExecutionTaskInvocation",
|
||||
}
|
||||
}
|
||||
222
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go
generated
vendored
Normal file
222
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go
generated
vendored
Normal file
@@ -0,0 +1,222 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the details of a maintenance window task. For maintenance window
|
||||
// tasks without a specified target, you can't supply values for --max-errors and
|
||||
// --max-concurrency . Instead, the system inserts a placeholder value of 1 , which
|
||||
// may be reported in the response to this command. These values don't affect the
|
||||
// running of your task and can be ignored. To retrieve a list of tasks in a
|
||||
// maintenance window, instead use the DescribeMaintenanceWindowTasks command.
|
||||
func (c *Client) GetMaintenanceWindowTask(ctx context.Context, params *GetMaintenanceWindowTaskInput, optFns ...func(*Options)) (*GetMaintenanceWindowTaskOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetMaintenanceWindowTaskInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindowTask", params, optFns, c.addOperationGetMaintenanceWindowTaskMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetMaintenanceWindowTaskOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowTaskInput struct {
|
||||
|
||||
// The maintenance window ID that includes the task to retrieve.
|
||||
//
|
||||
// This member is required.
|
||||
WindowId *string
|
||||
|
||||
// The maintenance window task ID to retrieve.
|
||||
//
|
||||
// This member is required.
|
||||
WindowTaskId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetMaintenanceWindowTaskOutput struct {
|
||||
|
||||
// The details for the CloudWatch alarm you applied to your maintenance window
|
||||
// task.
|
||||
AlarmConfiguration *types.AlarmConfiguration
|
||||
|
||||
// The action to take on tasks when the maintenance window cutoff time is reached.
|
||||
// CONTINUE_TASK means that tasks continue to run. For Automation, Lambda, Step
|
||||
// Functions tasks, CANCEL_TASK means that currently running task invocations
|
||||
// continue, but no new task invocations are started. For Run Command tasks,
|
||||
// CANCEL_TASK means the system attempts to stop the task by sending a
|
||||
// CancelCommand operation.
|
||||
CutoffBehavior types.MaintenanceWindowTaskCutoffBehavior
|
||||
|
||||
// The retrieved task description.
|
||||
Description *string
|
||||
|
||||
// The location in Amazon Simple Storage Service (Amazon S3) where the task
|
||||
// results are logged. LoggingInfo has been deprecated. To specify an Amazon
|
||||
// Simple Storage Service (Amazon S3) bucket to contain logs, instead use the
|
||||
// OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters
|
||||
// structure. For information about how Amazon Web Services Systems Manager handles
|
||||
// these options for the supported maintenance window task types, see
|
||||
// MaintenanceWindowTaskInvocationParameters .
|
||||
LoggingInfo *types.LoggingInfo
|
||||
|
||||
// The maximum number of targets allowed to run this task in parallel. For
|
||||
// maintenance window tasks without a target specified, you can't supply a value
|
||||
// for this option. Instead, the system inserts a placeholder value of 1 , which
|
||||
// may be reported in the response to this command. This value doesn't affect the
|
||||
// running of your task and can be ignored.
|
||||
MaxConcurrency *string
|
||||
|
||||
// The maximum number of errors allowed before the task stops being scheduled. For
|
||||
// maintenance window tasks without a target specified, you can't supply a value
|
||||
// for this option. Instead, the system inserts a placeholder value of 1 , which
|
||||
// may be reported in the response to this command. This value doesn't affect the
|
||||
// running of your task and can be ignored.
|
||||
MaxErrors *string
|
||||
|
||||
// The retrieved task name.
|
||||
Name *string
|
||||
|
||||
// The priority of the task when it runs. The lower the number, the higher the
|
||||
// priority. Tasks that have the same priority are scheduled in parallel.
|
||||
Priority int32
|
||||
|
||||
// The Amazon Resource Name (ARN) of the Identity and Access Management (IAM)
|
||||
// service role to use to publish Amazon Simple Notification Service (Amazon SNS)
|
||||
// notifications for maintenance window Run Command tasks.
|
||||
ServiceRoleArn *string
|
||||
|
||||
// The targets where the task should run.
|
||||
Targets []types.Target
|
||||
|
||||
// The resource that the task used during execution. For RUN_COMMAND and AUTOMATION
|
||||
// task types, the value of TaskArn is the SSM document name/ARN. For LAMBDA
|
||||
// tasks, the value is the function name/ARN. For STEP_FUNCTIONS tasks, the value
|
||||
// is the state machine ARN.
|
||||
TaskArn *string
|
||||
|
||||
// The parameters to pass to the task when it runs.
|
||||
TaskInvocationParameters *types.MaintenanceWindowTaskInvocationParameters
|
||||
|
||||
// The parameters to pass to the task when it runs. TaskParameters has been
|
||||
// deprecated. To specify parameters to pass to a task when it runs, instead use
|
||||
// the Parameters option in the TaskInvocationParameters structure. For
|
||||
// information about how Systems Manager handles these options for the supported
|
||||
// maintenance window task types, see MaintenanceWindowTaskInvocationParameters .
|
||||
TaskParameters map[string]types.MaintenanceWindowTaskParameterValueExpression
|
||||
|
||||
// The type of task to run.
|
||||
TaskType types.MaintenanceWindowTaskType
|
||||
|
||||
// The retrieved maintenance window ID.
|
||||
WindowId *string
|
||||
|
||||
// The retrieved maintenance window task ID.
|
||||
WindowTaskId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetMaintenanceWindowTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindowTask{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindowTask{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindowTask"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetMaintenanceWindowTaskValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindowTask(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetMaintenanceWindowTask(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetMaintenanceWindowTask",
|
||||
}
|
||||
}
|
||||
148
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go
generated
vendored
Normal file
148
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Get information about an OpsItem by using the ID. You must have permission in
|
||||
// Identity and Access Management (IAM) to view information about an OpsItem. For
|
||||
// more information, see Set up OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide. Operations engineers and
|
||||
// IT professionals use Amazon Web Services Systems Manager OpsCenter to view,
|
||||
// investigate, and remediate operational issues impacting the performance and
|
||||
// health of their Amazon Web Services resources. For more information, see
|
||||
// OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html)
|
||||
// in the Amazon Web Services Systems Manager User Guide.
|
||||
func (c *Client) GetOpsItem(ctx context.Context, params *GetOpsItemInput, optFns ...func(*Options)) (*GetOpsItemOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetOpsItemInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetOpsItem", params, optFns, c.addOperationGetOpsItemMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetOpsItemOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetOpsItemInput struct {
|
||||
|
||||
// The ID of the OpsItem that you want to get.
|
||||
//
|
||||
// This member is required.
|
||||
OpsItemId *string
|
||||
|
||||
// The OpsItem Amazon Resource Name (ARN).
|
||||
OpsItemArn *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetOpsItemOutput struct {
|
||||
|
||||
// The OpsItem.
|
||||
OpsItem *types.OpsItem
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetOpsItemMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetOpsItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetOpsItem{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetOpsItem"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetOpsItemValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpsItem(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetOpsItem(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetOpsItem",
|
||||
}
|
||||
}
|
||||
151
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go
generated
vendored
Normal file
151
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go
generated
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// View operational metadata related to an application in Application Manager.
|
||||
func (c *Client) GetOpsMetadata(ctx context.Context, params *GetOpsMetadataInput, optFns ...func(*Options)) (*GetOpsMetadataOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetOpsMetadataInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetOpsMetadata", params, optFns, c.addOperationGetOpsMetadataMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetOpsMetadataOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetOpsMetadataInput struct {
|
||||
|
||||
// The Amazon Resource Name (ARN) of an OpsMetadata Object to view.
|
||||
//
|
||||
// This member is required.
|
||||
OpsMetadataArn *string
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetOpsMetadataOutput struct {
|
||||
|
||||
// OpsMetadata for an Application Manager application.
|
||||
Metadata map[string]types.MetadataValue
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// The resource ID of the Application Manager application.
|
||||
ResourceId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetOpsMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetOpsMetadata{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetOpsMetadata{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetOpsMetadata"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetOpsMetadataValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpsMetadata(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetOpsMetadata",
|
||||
}
|
||||
}
|
||||
250
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go
generated
vendored
Normal file
250
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go
generated
vendored
Normal file
@@ -0,0 +1,250 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// View a summary of operations metadata (OpsData) based on specified filters and
|
||||
// aggregators. OpsData can include information about Amazon Web Services Systems
|
||||
// Manager OpsCenter operational workitems (OpsItems) as well as information about
|
||||
// any Amazon Web Services resource or service configured to report OpsData to
|
||||
// Amazon Web Services Systems Manager Explorer.
|
||||
func (c *Client) GetOpsSummary(ctx context.Context, params *GetOpsSummaryInput, optFns ...func(*Options)) (*GetOpsSummaryOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetOpsSummaryInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetOpsSummary", params, optFns, c.addOperationGetOpsSummaryMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetOpsSummaryOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetOpsSummaryInput struct {
|
||||
|
||||
// Optional aggregators that return counts of OpsData based on one or more
|
||||
// expressions.
|
||||
Aggregators []types.OpsAggregator
|
||||
|
||||
// Optional filters used to scope down the returned OpsData.
|
||||
Filters []types.OpsFilter
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
// The OpsData data type to return.
|
||||
ResultAttributes []types.OpsResultAttribute
|
||||
|
||||
// Specify the name of a resource data sync to get.
|
||||
SyncName *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetOpsSummaryOutput struct {
|
||||
|
||||
// The list of aggregated details and filtered OpsData.
|
||||
Entities []types.OpsEntity
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetOpsSummaryMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetOpsSummary{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetOpsSummary{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetOpsSummary"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetOpsSummaryValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpsSummary(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetOpsSummaryAPIClient is a client that implements the GetOpsSummary operation.
|
||||
type GetOpsSummaryAPIClient interface {
|
||||
GetOpsSummary(context.Context, *GetOpsSummaryInput, ...func(*Options)) (*GetOpsSummaryOutput, error)
|
||||
}
|
||||
|
||||
var _ GetOpsSummaryAPIClient = (*Client)(nil)
|
||||
|
||||
// GetOpsSummaryPaginatorOptions is the paginator options for GetOpsSummary
|
||||
type GetOpsSummaryPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// GetOpsSummaryPaginator is a paginator for GetOpsSummary
|
||||
type GetOpsSummaryPaginator struct {
|
||||
options GetOpsSummaryPaginatorOptions
|
||||
client GetOpsSummaryAPIClient
|
||||
params *GetOpsSummaryInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewGetOpsSummaryPaginator returns a new GetOpsSummaryPaginator
|
||||
func NewGetOpsSummaryPaginator(client GetOpsSummaryAPIClient, params *GetOpsSummaryInput, optFns ...func(*GetOpsSummaryPaginatorOptions)) *GetOpsSummaryPaginator {
|
||||
if params == nil {
|
||||
params = &GetOpsSummaryInput{}
|
||||
}
|
||||
|
||||
options := GetOpsSummaryPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &GetOpsSummaryPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *GetOpsSummaryPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next GetOpsSummary page.
|
||||
func (p *GetOpsSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetOpsSummaryOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.GetOpsSummary(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetOpsSummary(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetOpsSummary",
|
||||
}
|
||||
}
|
||||
145
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go
generated
vendored
Normal file
145
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go
generated
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Get information about a single parameter by specifying the parameter name. To
|
||||
// get information about more than one parameter at a time, use the GetParameters
|
||||
// operation.
|
||||
func (c *Client) GetParameter(ctx context.Context, params *GetParameterInput, optFns ...func(*Options)) (*GetParameterOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetParameterInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetParameter", params, optFns, c.addOperationGetParameterMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetParameterOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetParameterInput struct {
|
||||
|
||||
// The name of the parameter you want to query. To query by parameter label, use
|
||||
// "Name": "name:label" . To query by parameter version, use "Name": "name:version"
|
||||
// .
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// Return decrypted values for secure string parameters. This flag is ignored for
|
||||
// String and StringList parameter types.
|
||||
WithDecryption *bool
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetParameterOutput struct {
|
||||
|
||||
// Information about a parameter.
|
||||
Parameter *types.Parameter
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetParameterMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParameter{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParameter{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetParameter"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetParameterValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParameter(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetParameter(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetParameter",
|
||||
}
|
||||
}
|
||||
248
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go
generated
vendored
Normal file
248
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go
generated
vendored
Normal file
@@ -0,0 +1,248 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the history of all changes to a parameter. If you change the KMS key
|
||||
// alias for the KMS key used to encrypt a parameter, then you must also update the
|
||||
// key alias the parameter uses to reference KMS. Otherwise, GetParameterHistory
|
||||
// retrieves whatever the original key alias was referencing.
|
||||
func (c *Client) GetParameterHistory(ctx context.Context, params *GetParameterHistoryInput, optFns ...func(*Options)) (*GetParameterHistoryOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetParameterHistoryInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetParameterHistory", params, optFns, c.addOperationGetParameterHistoryMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetParameterHistoryOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetParameterHistoryInput struct {
|
||||
|
||||
// The name of the parameter for which you want to review history.
|
||||
//
|
||||
// This member is required.
|
||||
Name *string
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// The token for the next set of items to return. (You received this token from a
|
||||
// previous call.)
|
||||
NextToken *string
|
||||
|
||||
// Return decrypted values for secure string parameters. This flag is ignored for
|
||||
// String and StringList parameter types.
|
||||
WithDecryption *bool
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetParameterHistoryOutput struct {
|
||||
|
||||
// The token to use when requesting the next set of items. If there are no
|
||||
// additional items to return, the string is empty.
|
||||
NextToken *string
|
||||
|
||||
// A list of parameters returned by the request.
|
||||
Parameters []types.ParameterHistory
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetParameterHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParameterHistory{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParameterHistory{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetParameterHistory"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetParameterHistoryValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParameterHistory(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetParameterHistoryAPIClient is a client that implements the
|
||||
// GetParameterHistory operation.
|
||||
type GetParameterHistoryAPIClient interface {
|
||||
GetParameterHistory(context.Context, *GetParameterHistoryInput, ...func(*Options)) (*GetParameterHistoryOutput, error)
|
||||
}
|
||||
|
||||
var _ GetParameterHistoryAPIClient = (*Client)(nil)
|
||||
|
||||
// GetParameterHistoryPaginatorOptions is the paginator options for
|
||||
// GetParameterHistory
|
||||
type GetParameterHistoryPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// GetParameterHistoryPaginator is a paginator for GetParameterHistory
|
||||
type GetParameterHistoryPaginator struct {
|
||||
options GetParameterHistoryPaginatorOptions
|
||||
client GetParameterHistoryAPIClient
|
||||
params *GetParameterHistoryInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewGetParameterHistoryPaginator returns a new GetParameterHistoryPaginator
|
||||
func NewGetParameterHistoryPaginator(client GetParameterHistoryAPIClient, params *GetParameterHistoryInput, optFns ...func(*GetParameterHistoryPaginatorOptions)) *GetParameterHistoryPaginator {
|
||||
if params == nil {
|
||||
params = &GetParameterHistoryInput{}
|
||||
}
|
||||
|
||||
options := GetParameterHistoryPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &GetParameterHistoryPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *GetParameterHistoryPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next GetParameterHistory page.
|
||||
func (p *GetParameterHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetParameterHistoryOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.GetParameterHistory(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetParameterHistory(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetParameterHistory",
|
||||
}
|
||||
}
|
||||
149
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go
generated
vendored
Normal file
149
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Get information about one or more parameters by specifying multiple parameter
|
||||
// names. To get information about a single parameter, you can use the GetParameter
|
||||
// operation instead.
|
||||
func (c *Client) GetParameters(ctx context.Context, params *GetParametersInput, optFns ...func(*Options)) (*GetParametersOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetParametersInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetParameters", params, optFns, c.addOperationGetParametersMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetParametersOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetParametersInput struct {
|
||||
|
||||
// Names of the parameters for which you want to query information. To query by
|
||||
// parameter label, use "Name": "name:label" . To query by parameter version, use
|
||||
// "Name": "name:version" .
|
||||
//
|
||||
// This member is required.
|
||||
Names []string
|
||||
|
||||
// Return decrypted secure string value. Return decrypted values for secure string
|
||||
// parameters. This flag is ignored for String and StringList parameter types.
|
||||
WithDecryption *bool
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetParametersOutput struct {
|
||||
|
||||
// A list of parameters that aren't formatted correctly or don't run during an
|
||||
// execution.
|
||||
InvalidParameters []string
|
||||
|
||||
// A list of details for a parameter.
|
||||
Parameters []types.Parameter
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetParametersMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParameters{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParameters{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetParameters"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetParametersValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParameters(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetParameters(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetParameters",
|
||||
}
|
||||
}
|
||||
268
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go
generated
vendored
Normal file
268
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go
generated
vendored
Normal file
@@ -0,0 +1,268 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieve information about one or more parameters in a specific hierarchy.
|
||||
// Request results are returned on a best-effort basis. If you specify MaxResults
|
||||
// in the request, the response includes information up to the limit specified. The
|
||||
// number of items returned, however, can be between zero and the value of
|
||||
// MaxResults . If the service reaches an internal limit while processing the
|
||||
// results, it stops the operation and returns the matching values up to that point
|
||||
// and a NextToken . You can specify the NextToken in a subsequent call to get the
|
||||
// next set of results.
|
||||
func (c *Client) GetParametersByPath(ctx context.Context, params *GetParametersByPathInput, optFns ...func(*Options)) (*GetParametersByPathOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetParametersByPathInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetParametersByPath", params, optFns, c.addOperationGetParametersByPathMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetParametersByPathOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetParametersByPathInput struct {
|
||||
|
||||
// The hierarchy for the parameter. Hierarchies start with a forward slash (/).
|
||||
// The hierarchy is the parameter name except the last part of the parameter. For
|
||||
// the API call to succeed, the last part of the parameter name can't be in the
|
||||
// path. A parameter name hierarchy can have a maximum of 15 levels. Here is an
|
||||
// example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33
|
||||
//
|
||||
// This member is required.
|
||||
Path *string
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
// Filters to limit the request results. The following Key values are supported
|
||||
// for GetParametersByPath : Type , KeyId , and Label . The following Key values
|
||||
// aren't supported for GetParametersByPath : tag , DataType , Name , Path , and
|
||||
// Tier .
|
||||
ParameterFilters []types.ParameterStringFilter
|
||||
|
||||
// Retrieve all parameters within a hierarchy. If a user has access to a path,
|
||||
// then the user can access all levels of that path. For example, if a user has
|
||||
// permission to access path /a , then the user can also access /a/b . Even if a
|
||||
// user has explicitly been denied access in IAM for parameter /a/b , they can
|
||||
// still call the GetParametersByPath API operation recursively for /a and view
|
||||
// /a/b .
|
||||
Recursive *bool
|
||||
|
||||
// Retrieve all parameters in a hierarchy with their value decrypted.
|
||||
WithDecryption *bool
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetParametersByPathOutput struct {
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// A list of parameters found in the specified hierarchy.
|
||||
Parameters []types.Parameter
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetParametersByPathMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParametersByPath{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParametersByPath{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetParametersByPath"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetParametersByPathValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParametersByPath(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetParametersByPathAPIClient is a client that implements the
|
||||
// GetParametersByPath operation.
|
||||
type GetParametersByPathAPIClient interface {
|
||||
GetParametersByPath(context.Context, *GetParametersByPathInput, ...func(*Options)) (*GetParametersByPathOutput, error)
|
||||
}
|
||||
|
||||
var _ GetParametersByPathAPIClient = (*Client)(nil)
|
||||
|
||||
// GetParametersByPathPaginatorOptions is the paginator options for
|
||||
// GetParametersByPath
|
||||
type GetParametersByPathPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// GetParametersByPathPaginator is a paginator for GetParametersByPath
|
||||
type GetParametersByPathPaginator struct {
|
||||
options GetParametersByPathPaginatorOptions
|
||||
client GetParametersByPathAPIClient
|
||||
params *GetParametersByPathInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewGetParametersByPathPaginator returns a new GetParametersByPathPaginator
|
||||
func NewGetParametersByPathPaginator(client GetParametersByPathAPIClient, params *GetParametersByPathInput, optFns ...func(*GetParametersByPathPaginatorOptions)) *GetParametersByPathPaginator {
|
||||
if params == nil {
|
||||
params = &GetParametersByPathInput{}
|
||||
}
|
||||
|
||||
options := GetParametersByPathPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &GetParametersByPathPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *GetParametersByPathPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next GetParametersByPath page.
|
||||
func (p *GetParametersByPathPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetParametersByPathOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.GetParametersByPath(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetParametersByPath(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetParametersByPath",
|
||||
}
|
||||
}
|
||||
192
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go
generated
vendored
Normal file
192
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go
generated
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Retrieves information about a patch baseline.
|
||||
func (c *Client) GetPatchBaseline(ctx context.Context, params *GetPatchBaselineInput, optFns ...func(*Options)) (*GetPatchBaselineOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetPatchBaselineInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetPatchBaseline", params, optFns, c.addOperationGetPatchBaselineMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetPatchBaselineOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetPatchBaselineInput struct {
|
||||
|
||||
// The ID of the patch baseline to retrieve. To retrieve information about an
|
||||
// Amazon Web Services managed patch baseline, specify the full Amazon Resource
|
||||
// Name (ARN) of the baseline. For example, for the baseline
|
||||
// AWS-AmazonLinuxDefaultPatchBaseline , specify
|
||||
// arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0e392de35e7c563b7 instead of
|
||||
// pb-0e392de35e7c563b7 .
|
||||
//
|
||||
// This member is required.
|
||||
BaselineId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetPatchBaselineOutput struct {
|
||||
|
||||
// A set of rules used to include patches in the baseline.
|
||||
ApprovalRules *types.PatchRuleGroup
|
||||
|
||||
// A list of explicitly approved patches for the baseline.
|
||||
ApprovedPatches []string
|
||||
|
||||
// Returns the specified compliance severity level for approved patches in the
|
||||
// patch baseline.
|
||||
ApprovedPatchesComplianceLevel types.PatchComplianceLevel
|
||||
|
||||
// Indicates whether the list of approved patches includes non-security updates
|
||||
// that should be applied to the managed nodes. The default value is false .
|
||||
// Applies to Linux managed nodes only.
|
||||
ApprovedPatchesEnableNonSecurity *bool
|
||||
|
||||
// The ID of the retrieved patch baseline.
|
||||
BaselineId *string
|
||||
|
||||
// The date the patch baseline was created.
|
||||
CreatedDate *time.Time
|
||||
|
||||
// A description of the patch baseline.
|
||||
Description *string
|
||||
|
||||
// A set of global filters used to exclude patches from the baseline.
|
||||
GlobalFilters *types.PatchFilterGroup
|
||||
|
||||
// The date the patch baseline was last modified.
|
||||
ModifiedDate *time.Time
|
||||
|
||||
// The name of the patch baseline.
|
||||
Name *string
|
||||
|
||||
// Returns the operating system specified for the patch baseline.
|
||||
OperatingSystem types.OperatingSystem
|
||||
|
||||
// Patch groups included in the patch baseline.
|
||||
PatchGroups []string
|
||||
|
||||
// A list of explicitly rejected patches for the baseline.
|
||||
RejectedPatches []string
|
||||
|
||||
// The action specified to take on patches included in the RejectedPatches list. A
|
||||
// patch can be allowed only if it is a dependency of another package, or blocked
|
||||
// entirely along with packages that include it as a dependency.
|
||||
RejectedPatchesAction types.PatchAction
|
||||
|
||||
// Information about the patches to use to update the managed nodes, including
|
||||
// target operating systems and source repositories. Applies to Linux managed nodes
|
||||
// only.
|
||||
Sources []types.PatchSource
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetPatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetPatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetPatchBaseline{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetPatchBaseline"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetPatchBaselineValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPatchBaseline(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetPatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetPatchBaseline",
|
||||
}
|
||||
}
|
||||
147
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go
generated
vendored
Normal file
147
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieves the patch baseline that should be used for the specified patch group.
|
||||
func (c *Client) GetPatchBaselineForPatchGroup(ctx context.Context, params *GetPatchBaselineForPatchGroupInput, optFns ...func(*Options)) (*GetPatchBaselineForPatchGroupOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetPatchBaselineForPatchGroupInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetPatchBaselineForPatchGroup", params, optFns, c.addOperationGetPatchBaselineForPatchGroupMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetPatchBaselineForPatchGroupOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetPatchBaselineForPatchGroupInput struct {
|
||||
|
||||
// The name of the patch group whose patch baseline should be retrieved.
|
||||
//
|
||||
// This member is required.
|
||||
PatchGroup *string
|
||||
|
||||
// Returns the operating system rule specified for patch groups using the patch
|
||||
// baseline.
|
||||
OperatingSystem types.OperatingSystem
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetPatchBaselineForPatchGroupOutput struct {
|
||||
|
||||
// The ID of the patch baseline that should be used for the patch group.
|
||||
BaselineId *string
|
||||
|
||||
// The operating system rule specified for patch groups using the patch baseline.
|
||||
OperatingSystem types.OperatingSystem
|
||||
|
||||
// The name of the patch group.
|
||||
PatchGroup *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetPatchBaselineForPatchGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetPatchBaselineForPatchGroup"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetPatchBaselineForPatchGroupValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPatchBaselineForPatchGroup(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetPatchBaselineForPatchGroup(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetPatchBaselineForPatchGroup",
|
||||
}
|
||||
}
|
||||
240
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go
generated
vendored
Normal file
240
vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go
generated
vendored
Normal file
@@ -0,0 +1,240 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssm/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Returns an array of the Policy object.
|
||||
func (c *Client) GetResourcePolicies(ctx context.Context, params *GetResourcePoliciesInput, optFns ...func(*Options)) (*GetResourcePoliciesOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetResourcePoliciesInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicies", params, optFns, c.addOperationGetResourcePoliciesMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetResourcePoliciesOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetResourcePoliciesInput struct {
|
||||
|
||||
// Amazon Resource Name (ARN) of the resource to which the policies are attached.
|
||||
//
|
||||
// This member is required.
|
||||
ResourceArn *string
|
||||
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
MaxResults *int32
|
||||
|
||||
// A token to start the list. Use this token to get the next set of results.
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetResourcePoliciesOutput struct {
|
||||
|
||||
// The token for the next set of items to return. Use this token to get the next
|
||||
// set of results.
|
||||
NextToken *string
|
||||
|
||||
// An array of the Policy object.
|
||||
Policies []types.GetResourcePoliciesResponseEntry
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetResourcePolicies{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetResourcePolicies{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourcePolicies"); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetResourcePoliciesValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicies(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResponseErrorMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestResponseLogging(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetResourcePoliciesAPIClient is a client that implements the
|
||||
// GetResourcePolicies operation.
|
||||
type GetResourcePoliciesAPIClient interface {
|
||||
GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error)
|
||||
}
|
||||
|
||||
var _ GetResourcePoliciesAPIClient = (*Client)(nil)
|
||||
|
||||
// GetResourcePoliciesPaginatorOptions is the paginator options for
|
||||
// GetResourcePolicies
|
||||
type GetResourcePoliciesPaginatorOptions struct {
|
||||
// The maximum number of items to return for this call. The call also returns a
|
||||
// token that you can specify in a subsequent call to get the next set of results.
|
||||
Limit int32
|
||||
|
||||
// Set to true if pagination should stop if the service returns a pagination token
|
||||
// that matches the most recent token provided to the service.
|
||||
StopOnDuplicateToken bool
|
||||
}
|
||||
|
||||
// GetResourcePoliciesPaginator is a paginator for GetResourcePolicies
|
||||
type GetResourcePoliciesPaginator struct {
|
||||
options GetResourcePoliciesPaginatorOptions
|
||||
client GetResourcePoliciesAPIClient
|
||||
params *GetResourcePoliciesInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewGetResourcePoliciesPaginator returns a new GetResourcePoliciesPaginator
|
||||
func NewGetResourcePoliciesPaginator(client GetResourcePoliciesAPIClient, params *GetResourcePoliciesInput, optFns ...func(*GetResourcePoliciesPaginatorOptions)) *GetResourcePoliciesPaginator {
|
||||
if params == nil {
|
||||
params = &GetResourcePoliciesInput{}
|
||||
}
|
||||
|
||||
options := GetResourcePoliciesPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &GetResourcePoliciesPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *GetResourcePoliciesPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next GetResourcePolicies page.
|
||||
func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetResourcePoliciesOutput, error) {
|
||||
if !p.HasMorePages() {
|
||||
return nil, fmt.Errorf("no more pages available")
|
||||
}
|
||||
|
||||
params := *p.params
|
||||
params.NextToken = p.nextToken
|
||||
|
||||
var limit *int32
|
||||
if p.options.Limit > 0 {
|
||||
limit = &p.options.Limit
|
||||
}
|
||||
params.MaxResults = limit
|
||||
|
||||
result, err := p.client.GetResourcePolicies(ctx, ¶ms, optFns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.firstPage = false
|
||||
|
||||
prevToken := p.nextToken
|
||||
p.nextToken = result.NextToken
|
||||
|
||||
if p.options.StopOnDuplicateToken &&
|
||||
prevToken != nil &&
|
||||
p.nextToken != nil &&
|
||||
*prevToken == *p.nextToken {
|
||||
p.nextToken = nil
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetResourcePolicies",
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user