vendor: update buildkit to v0.32.0-rc1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
+4
@@ -59,6 +59,10 @@ issues:
|
||||
text: "^directive `//nolint:errorlint` should provide explanation"
|
||||
source: '[=|!]= io.EOF'
|
||||
|
||||
- linters:
|
||||
- gosec
|
||||
text: "^G115: integer overflow conversion"
|
||||
|
||||
|
||||
linters-settings:
|
||||
exhaustive:
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package guid
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package guid
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
|
||||
+2
@@ -69,6 +69,8 @@ func (l *lineReader) Read(p []byte) (n int, err error) {
|
||||
if isPrefix {
|
||||
return 0, ArmorCorrupt
|
||||
}
|
||||
// Trim the line to remove any whitespace
|
||||
line = bytes.TrimSpace(line)
|
||||
|
||||
if bytes.HasPrefix(line, armorEnd) {
|
||||
l.eof = true
|
||||
|
||||
+8
-2
@@ -125,7 +125,10 @@ func (c *curve25519) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecr
|
||||
// "VB = convert point V to the octet string"
|
||||
// sharedPoint corresponds to `VB`.
|
||||
var sharedPoint x25519lib.Key
|
||||
x25519lib.Shared(&sharedPoint, &ephemeralPrivate, &pubKey)
|
||||
ok := x25519lib.Shared(&sharedPoint, &ephemeralPrivate, &pubKey)
|
||||
if !ok {
|
||||
return nil, nil, errors.KeyInvalidError("ecc: the public key is a low order point")
|
||||
}
|
||||
|
||||
return ephemeralPublic[:], sharedPoint[:], nil
|
||||
}
|
||||
@@ -146,7 +149,10 @@ func (c *curve25519) Decaps(vsG, secret []byte) (sharedSecret []byte, err error)
|
||||
// RFC6637 §8: "Note that the recipient obtains the shared secret by calculating
|
||||
// S = rV = rvG, where (r,R) is the recipient's key pair."
|
||||
// sharedPoint corresponds to `S`.
|
||||
x25519lib.Shared(&sharedPoint, &decodedPrivate, &ephemeralPublic)
|
||||
ok := x25519lib.Shared(&sharedPoint, &decodedPrivate, &ephemeralPublic)
|
||||
if !ok {
|
||||
return nil, errors.KeyInvalidError("ecc: the public key is a low order point")
|
||||
}
|
||||
|
||||
return sharedPoint[:], nil
|
||||
}
|
||||
|
||||
+4
-1
@@ -78,7 +78,7 @@ func (c *genericCurve) GenerateECDSA(rand io.Reader) (x, y, secret *big.Int, err
|
||||
func (c *genericCurve) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error) {
|
||||
xP, yP := elliptic.Unmarshal(c.Curve, point)
|
||||
if xP == nil {
|
||||
panic("invalid point")
|
||||
return nil, nil, errors.KeyInvalidError(fmt.Sprintf("ecc (%s): invalid point", c.Curve.Params().Name))
|
||||
}
|
||||
|
||||
d, x, y, err := elliptic.GenerateKey(c.Curve, rand)
|
||||
@@ -99,6 +99,9 @@ func (c *genericCurve) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSe
|
||||
|
||||
func (c *genericCurve) Decaps(ephemeral, secret []byte) (sharedSecret []byte, err error) {
|
||||
x, y := elliptic.Unmarshal(c.Curve, ephemeral)
|
||||
if x == nil {
|
||||
return nil, errors.KeyInvalidError(fmt.Sprintf("ecc (%s): invalid point", c.Curve.Params().Name))
|
||||
}
|
||||
zbBig, _ := c.Curve.ScalarMult(x, y, secret)
|
||||
byteLen := (c.Curve.Params().BitSize + 7) >> 3
|
||||
zb := make([]byte, byteLen)
|
||||
|
||||
+26
@@ -178,6 +178,18 @@ type Config struct {
|
||||
// When set to true, a key without flags is treated as if all flags are enabled.
|
||||
// This behavior is consistent with GPG.
|
||||
InsecureAllowAllKeyFlagsWhenMissing bool
|
||||
// InsecureGenerateNonCriticalKeyFlags causes the "Key Flags" signature subpacket
|
||||
// to be non-critical in newly generated signatures.
|
||||
// This may be needed for keys to be accepted by older clients who do not recognize
|
||||
// the subpacket.
|
||||
// For example, rpm 4.14.3-150400.59.3.1 in OpenSUSE Leap 15.4 does not recognize it.
|
||||
InsecureGenerateNonCriticalKeyFlags bool
|
||||
// InsecureGenerateNonCriticalSignatureCreationTime causes the "Signature Creation Time" signature subpacket
|
||||
// to be non-critical in newly generated signatures.
|
||||
// This may be needed for keys to be accepted by older clients who do not recognize
|
||||
// the subpacket.
|
||||
// For example, yum 3.4.3-168 in CentOS 7 and yum 3.4.3-158 in Amazon Linux 2 do not recognize it.
|
||||
InsecureGenerateNonCriticalSignatureCreationTime bool
|
||||
|
||||
// MaxDecompressedMessageSize specifies the maximum number of bytes that can be
|
||||
// read from a compressed packet. This serves as an upper limit to prevent
|
||||
@@ -420,6 +432,20 @@ func (c *Config) AllowAllKeyFlagsWhenMissing() bool {
|
||||
return c.InsecureAllowAllKeyFlagsWhenMissing
|
||||
}
|
||||
|
||||
func (c *Config) GenerateNonCriticalKeyFlags() bool {
|
||||
if c == nil {
|
||||
return false
|
||||
}
|
||||
return c.InsecureGenerateNonCriticalKeyFlags
|
||||
}
|
||||
|
||||
func (c *Config) GenerateNonCriticalSignatureCreationTime() bool {
|
||||
if c == nil {
|
||||
return false
|
||||
}
|
||||
return c.InsecureGenerateNonCriticalSignatureCreationTime
|
||||
}
|
||||
|
||||
func (c *Config) DecompressedMessageSizeLimit() *int64 {
|
||||
if c == nil {
|
||||
return nil
|
||||
|
||||
+4
-4
@@ -933,7 +933,7 @@ func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err e
|
||||
}
|
||||
sig.Notations = append(sig.Notations, ¬ation)
|
||||
}
|
||||
sig.outSubpackets, err = sig.buildSubpackets(priv.PublicKey)
|
||||
sig.outSubpackets, err = sig.buildSubpackets(priv.PublicKey, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -1254,11 +1254,11 @@ type outputSubpacket struct {
|
||||
contents []byte
|
||||
}
|
||||
|
||||
func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubpacket, err error) {
|
||||
func (sig *Signature) buildSubpackets(issuer PublicKey, config *Config) (subpackets []outputSubpacket, err error) {
|
||||
creationTime := make([]byte, 4)
|
||||
binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix()))
|
||||
// Signature Creation Time
|
||||
subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, true, creationTime})
|
||||
subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, !config.GenerateNonCriticalSignatureCreationTime(), creationTime})
|
||||
// Signature Expiration Time
|
||||
if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 {
|
||||
sigLifetime := make([]byte, 4)
|
||||
@@ -1357,7 +1357,7 @@ func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubp
|
||||
if sig.FlagGroupKey {
|
||||
flags |= KeyFlagGroupKey
|
||||
}
|
||||
subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, true, []byte{flags}})
|
||||
subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, !config.GenerateNonCriticalKeyFlags(), []byte{flags}})
|
||||
}
|
||||
// Signer's User ID
|
||||
if sig.SignerUserId != nil {
|
||||
|
||||
+8
@@ -164,6 +164,14 @@ type Config struct {
|
||||
// the shared config profile attribute request_min_compression_size_bytes
|
||||
RequestMinCompressSizeBytes int64
|
||||
|
||||
// DisableClockSkewCorrection turns off SDK clock skew correction. When set
|
||||
// the SDK will not adjust request signing timestamps to compensate for
|
||||
// drift between the client and service clocks. Set to false (enabled) by
|
||||
// default. This variable is sourced from the environment variable
|
||||
// AWS_DISABLE_CLOCK_SKEW_CORRECTION or the shared config profile attribute
|
||||
// disable_clock_skew_correction.
|
||||
DisableClockSkewCorrection bool
|
||||
|
||||
// Controls how a resolved AWS account ID is handled for endpoint routing.
|
||||
AccountIDEndpointMode AccountIDEndpointMode
|
||||
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package aws
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.42.0"
|
||||
const goModuleVersion = "1.43.0"
|
||||
|
||||
+43
-4
@@ -43,7 +43,12 @@ func (r ClientRequestID) HandleBuild(ctx context.Context, in middleware.BuildInp
|
||||
}
|
||||
|
||||
// RecordResponseTiming records the response timing for the SDK client requests.
|
||||
type RecordResponseTiming struct{}
|
||||
type RecordResponseTiming struct {
|
||||
// DisableClockSkewCorrection suppresses recording of clock skew observed
|
||||
// from the response, per the Clock Skew Correction SEP. Response timing is
|
||||
// still recorded.
|
||||
DisableClockSkewCorrection bool
|
||||
}
|
||||
|
||||
// ID is the middleware identifier
|
||||
func (a *RecordResponseTiming) ID() string {
|
||||
@@ -54,14 +59,17 @@ func (a *RecordResponseTiming) ID() string {
|
||||
func (a RecordResponseTiming) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
||||
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
requestAt := sdk.NowTime()
|
||||
out, metadata, err = next.HandleDeserialize(ctx, in)
|
||||
responseAt := sdk.NowTime()
|
||||
setResponseAt(&metadata, responseAt)
|
||||
|
||||
var serverTime time.Time
|
||||
var hasAgeHeader bool
|
||||
|
||||
switch resp := out.RawResponse.(type) {
|
||||
case *smithyhttp.Response:
|
||||
hasAgeHeader = len(resp.Header.Get("Age")) > 0
|
||||
respDateHeader := resp.Header.Get("Date")
|
||||
if len(respDateHeader) == 0 {
|
||||
break
|
||||
@@ -77,14 +85,45 @@ func (a RecordResponseTiming) HandleDeserialize(ctx context.Context, in middlewa
|
||||
setServerTime(&metadata, serverTime)
|
||||
}
|
||||
|
||||
if !serverTime.IsZero() {
|
||||
attemptSkew := serverTime.Sub(responseAt)
|
||||
setAttemptSkew(&metadata, attemptSkew)
|
||||
if !a.DisableClockSkewCorrection {
|
||||
if skew, ok := computeClockSkew(serverTime, requestAt, responseAt, hasAgeHeader); ok {
|
||||
setAttemptSkew(&metadata, skew)
|
||||
}
|
||||
}
|
||||
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
// maxTrustedRequestDuration bounds how long a request may take before the SDK
|
||||
// discards the skew measurement derived from its response. A slower round trip
|
||||
// could only produce a signing failure if it pushed the timestamp outside the
|
||||
// SigV4 validity window. See the Clock Skew Correction SEP.
|
||||
const maxTrustedRequestDuration = 15 * time.Minute
|
||||
|
||||
// computeClockSkew derives a clock skew candidate from a response per the Clock
|
||||
// Skew Correction SEP. It returns ok=false (no candidate) when the Date header
|
||||
// was absent/unparseable (serverTime zero), the round trip exceeded the maximum
|
||||
// trusted request duration, or the response was served from a cache (Age
|
||||
// header present). Otherwise the skew is the difference between the server's
|
||||
// Date and the midpoint of the request round trip.
|
||||
func computeClockSkew(serverTime, requestAt, responseAt time.Time, hasAgeHeader bool) (time.Duration, bool) {
|
||||
if serverTime.IsZero() {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
if hasAgeHeader {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
elapsed := responseAt.Sub(requestAt)
|
||||
if elapsed > maxTrustedRequestDuration {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
midpoint := requestAt.Add(elapsed / 2)
|
||||
return serverTime.Sub(midpoint), true
|
||||
}
|
||||
|
||||
type responseAtKey struct{}
|
||||
|
||||
// GetResponseAt returns the time response was received at.
|
||||
|
||||
+57
-19
@@ -48,6 +48,12 @@ type Attempt struct {
|
||||
// call.
|
||||
ClientSkew *atomic.Int64
|
||||
|
||||
// DisableClockSkewCorrection disables clock skew correction per the Clock
|
||||
// Skew Correction SEP: observed skew is not applied to the signing
|
||||
// timestamp, not recorded into ClientSkew, and clock skew error codes are
|
||||
// not treated as retry candidates.
|
||||
DisableClockSkewCorrection bool
|
||||
|
||||
retryer aws.RetryerV2
|
||||
requestCloner RequestCloner
|
||||
}
|
||||
@@ -88,7 +94,7 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn
|
||||
out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error,
|
||||
) {
|
||||
var attemptClockSkew time.Duration
|
||||
if r.ClientSkew != nil {
|
||||
if !r.DisableClockSkewCorrection && r.ClientSkew != nil {
|
||||
attemptClockSkew = time.Duration(r.ClientSkew.Load())
|
||||
}
|
||||
|
||||
@@ -159,7 +165,7 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn
|
||||
|
||||
// this guarantees we are staying on top of the persistent skew value
|
||||
// (either to apply it or to heal it back if the clocks realign)
|
||||
if r.ClientSkew != nil {
|
||||
if !r.DisableClockSkewCorrection && r.ClientSkew != nil {
|
||||
if resultSkew, ok := awsmiddle.GetAttemptSkew(metadata); ok {
|
||||
r.ClientSkew.Store(resultSkew.Nanoseconds())
|
||||
}
|
||||
@@ -245,7 +251,10 @@ func (r *Attempt) handleAttempt(
|
||||
return out, attemptResult, nopRelease, err
|
||||
}
|
||||
|
||||
err = wrapAsClockSkew(ctx, err)
|
||||
if !r.DisableClockSkewCorrection {
|
||||
candidateSkew, hasCandidateSkew := awsmiddle.GetAttemptSkew(metadata)
|
||||
err = wrapAsClockSkew(err, candidateSkew, hasCandidateSkew, retryMetadata.AttemptClockSkew)
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// Is Retryable and Should Retry
|
||||
@@ -316,37 +325,66 @@ func (r *Attempt) handleAttempt(
|
||||
return out, attemptResult, releaseRetryToken, err
|
||||
}
|
||||
|
||||
// errors that, if detected when we know there's a clock skew,
|
||||
// can be retried and have a high chance of success
|
||||
var possibleSkewCodes = map[string]struct{}{
|
||||
// clockSkewCodes are the error codes that may indicate a clock skew problem.
|
||||
// Per the Clock Skew Correction SEP these are retryable only when the absolute
|
||||
// skew observed from the response Date header exceeds the detection threshold.
|
||||
// The SEP does not distinguish "definite" from "possible" skew errors: modern
|
||||
// services overload a single code (e.g. InvalidSignatureException) for both
|
||||
// skewed and genuinely malformed signatures, so every code is gated on the
|
||||
// observed skew.
|
||||
var clockSkewCodes = map[string]struct{}{
|
||||
"InvalidSignatureException": {},
|
||||
"SignatureDoesNotMatch": {},
|
||||
"AuthFailure": {},
|
||||
"RequestTimeTooSkewed": {},
|
||||
"AccessDeniedException": {},
|
||||
}
|
||||
|
||||
var definiteSkewCodes = map[string]struct{}{
|
||||
"RequestExpired": {},
|
||||
"RequestInTheFuture": {},
|
||||
"RequestTimeTooSkewed": {},
|
||||
}
|
||||
|
||||
// wrapAsClockSkew checks if this error could be related to a clock skew
|
||||
// error and if so, wrap the error.
|
||||
func wrapAsClockSkew(ctx context.Context, err error) error {
|
||||
// wrapAsClockSkew classifies err as a retryable clock skew error when its code
|
||||
// is a known clock skew code and the signing time diverges from the server
|
||||
// time by more than the detection threshold.
|
||||
//
|
||||
// The signing time is now() + attemptSkew. The server time is now() +
|
||||
// candidateSkew (derived from the response Date header). The signing error is:
|
||||
//
|
||||
// |attemptSkew - candidateSkew| > skewThreshold
|
||||
//
|
||||
// This single check covers both fresh skew detection (attemptSkew is zero on
|
||||
// first attempt, so the error equals |candidateSkew|) and stale offset healing
|
||||
// (attemptSkew is large but the server and client clocks have realigned, so
|
||||
// candidateSkew is near zero).
|
||||
//
|
||||
// If no candidate was observed (the Date header was absent, unparseable, or
|
||||
// discarded as untrusted), the error is not treated as clock skew.
|
||||
func wrapAsClockSkew(err error, candidateSkew time.Duration, hasCandidateSkew bool, attemptSkew time.Duration) error {
|
||||
var v interface{ ErrorCode() string }
|
||||
if !errors.As(err, &v) {
|
||||
return err
|
||||
}
|
||||
if _, ok := definiteSkewCodes[v.ErrorCode()]; ok {
|
||||
return &retryableClockSkewError{Err: err}
|
||||
|
||||
if _, ok := clockSkewCodes[v.ErrorCode()]; !ok {
|
||||
return err
|
||||
}
|
||||
_, isPossibleSkewCode := possibleSkewCodes[v.ErrorCode()]
|
||||
if skew := internalcontext.GetAttemptSkewContext(ctx); skew > skewThreshold && isPossibleSkewCode {
|
||||
|
||||
if !hasCandidateSkew {
|
||||
return err
|
||||
}
|
||||
|
||||
if absDuration(attemptSkew-candidateSkew) > skewThreshold {
|
||||
return &retryableClockSkewError{Err: err}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func absDuration(d time.Duration) time.Duration {
|
||||
if d < 0 {
|
||||
return -d
|
||||
}
|
||||
|
||||
return d
|
||||
}
|
||||
|
||||
// MetricsHeader attaches SDK request metric header for retries to the transport
|
||||
type MetricsHeader struct{}
|
||||
|
||||
|
||||
+29
@@ -1,3 +1,32 @@
|
||||
# v1.32.31 (2026-07-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.32.30 (2026-07-13)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.32.29 (2026-07-08.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.32.28 (2026-07-06)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.32.27 (2026-07-01)
|
||||
|
||||
* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.32.26 (2026-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.32.25 (2026-06-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.32.24 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+2
@@ -77,6 +77,8 @@ var defaultAWSConfigResolvers = []awsConfigResolver{
|
||||
|
||||
// Sets the DisableRequestCompression if present in env var or shared config profile
|
||||
resolveDisableRequestCompression,
|
||||
// Sets the DisableClockSkewCorrection if present in env var or shared config profile
|
||||
resolveDisableClockSkewCorrection,
|
||||
|
||||
// Sets the RequestMinCompressSizeBytes if present in env var or shared config profile
|
||||
resolveRequestMinCompressSizeBytes,
|
||||
|
||||
+16
@@ -78,6 +78,8 @@ const (
|
||||
awsDisableRequestCompressionEnv = "AWS_DISABLE_REQUEST_COMPRESSION"
|
||||
awsRequestMinCompressionSizeBytesEnv = "AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES"
|
||||
|
||||
awsDisableClockSkewCorrectionEnv = "AWS_DISABLE_CLOCK_SKEW_CORRECTION"
|
||||
|
||||
awsS3DisableExpressSessionAuthEnv = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH"
|
||||
|
||||
awsAccountIDEnv = "AWS_ACCOUNT_ID"
|
||||
@@ -293,6 +295,10 @@ type EnvConfig struct {
|
||||
// retrieved from env var AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES
|
||||
RequestMinCompressSizeBytes *int64
|
||||
|
||||
// determine if clock skew correction is disabled, default to false
|
||||
// retrieved from env var AWS_DISABLE_CLOCK_SKEW_CORRECTION
|
||||
DisableClockSkewCorrection *bool
|
||||
|
||||
// Whether S3Express auth is disabled.
|
||||
//
|
||||
// This will NOT prevent requests from being made to S3Express buckets, it
|
||||
@@ -364,6 +370,9 @@ func NewEnvConfig() (EnvConfig, error) {
|
||||
if err := setInt64PtrFromEnvVal(&cfg.RequestMinCompressSizeBytes, []string{awsRequestMinCompressionSizeBytesEnv}, smithyrequestcompression.MaxRequestMinCompressSizeBytes); err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
if err := setBoolPtrFromEnvVal(&cfg.DisableClockSkewCorrection, []string{awsDisableClockSkewCorrectionEnv}); err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
if err := setEndpointDiscoveryTypeFromEnvVal(&cfg.EnableEndpointDiscovery, []string{awsEnableEndpointDiscoveryEnv}); err != nil {
|
||||
return cfg, err
|
||||
@@ -453,6 +462,13 @@ func (c EnvConfig) getDisableRequestCompression(context.Context) (bool, bool, er
|
||||
return *c.DisableRequestCompression, true, nil
|
||||
}
|
||||
|
||||
func (c EnvConfig) getDisableClockSkewCorrection(context.Context) (bool, bool, error) {
|
||||
if c.DisableClockSkewCorrection == nil {
|
||||
return false, false, nil
|
||||
}
|
||||
return *c.DisableClockSkewCorrection, true, nil
|
||||
}
|
||||
|
||||
func (c EnvConfig) getRequestMinCompressSizeBytes(context.Context) (int64, bool, error) {
|
||||
if c.RequestMinCompressSizeBytes == nil {
|
||||
return 0, false, nil
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package config
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.32.24"
|
||||
const goModuleVersion = "1.32.31"
|
||||
|
||||
+23
@@ -214,6 +214,9 @@ type LoadOptions struct {
|
||||
// The inclusive min bytes of a request body that could be compressed
|
||||
RequestMinCompressSizeBytes *int64
|
||||
|
||||
// Specifies whether SDK clock skew correction is disabled
|
||||
DisableClockSkewCorrection *bool
|
||||
|
||||
// Whether S3 Express auth is disabled.
|
||||
S3DisableExpressAuth *bool
|
||||
|
||||
@@ -299,6 +302,14 @@ func (o LoadOptions) getDisableRequestCompression(ctx context.Context) (bool, bo
|
||||
return *o.DisableRequestCompression, true, nil
|
||||
}
|
||||
|
||||
// getDisableClockSkewCorrection returns DisableClockSkewCorrection from config's LoadOptions
|
||||
func (o LoadOptions) getDisableClockSkewCorrection(ctx context.Context) (bool, bool, error) {
|
||||
if o.DisableClockSkewCorrection == nil {
|
||||
return false, false, nil
|
||||
}
|
||||
return *o.DisableClockSkewCorrection, true, nil
|
||||
}
|
||||
|
||||
// getRequestMinCompressSizeBytes returns RequestMinCompressSizeBytes from config's LoadOptions
|
||||
func (o LoadOptions) getRequestMinCompressSizeBytes(ctx context.Context) (int64, bool, error) {
|
||||
if o.RequestMinCompressSizeBytes == nil {
|
||||
@@ -369,6 +380,18 @@ func WithDisableRequestCompression(DisableRequestCompression *bool) LoadOptionsF
|
||||
}
|
||||
}
|
||||
|
||||
// WithDisableClockSkewCorrection is a helper function to construct functional
|
||||
// options that sets DisableClockSkewCorrection on config's LoadOptions.
|
||||
func WithDisableClockSkewCorrection(DisableClockSkewCorrection *bool) LoadOptionsFunc {
|
||||
return func(o *LoadOptions) error {
|
||||
if DisableClockSkewCorrection == nil {
|
||||
return nil
|
||||
}
|
||||
o.DisableClockSkewCorrection = DisableClockSkewCorrection
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithRequestMinCompressSizeBytes is a helper function to construct functional options
|
||||
// that sets RequestMinCompressSizeBytes on config's LoadOptions.
|
||||
func WithRequestMinCompressSizeBytes(RequestMinCompressSizeBytes *int64) LoadOptionsFunc {
|
||||
|
||||
+17
@@ -208,6 +208,23 @@ func getDisableRequestCompression(ctx context.Context, configs configs) (value b
|
||||
return
|
||||
}
|
||||
|
||||
// disableClockSkewCorrectionProvider provides access to the DisableClockSkewCorrection
|
||||
type disableClockSkewCorrectionProvider interface {
|
||||
getDisableClockSkewCorrection(context.Context) (bool, bool, error)
|
||||
}
|
||||
|
||||
func getDisableClockSkewCorrection(ctx context.Context, configs configs) (value bool, found bool, err error) {
|
||||
for _, cfg := range configs {
|
||||
if p, ok := cfg.(disableClockSkewCorrectionProvider); ok {
|
||||
value, found, err = p.getDisableClockSkewCorrection(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// requestMinCompressSizeBytesProvider provides access to the MinCompressSizeBytes
|
||||
type requestMinCompressSizeBytesProvider interface {
|
||||
getRequestMinCompressSizeBytes(context.Context) (int64, bool, error)
|
||||
|
||||
+12
@@ -151,6 +151,18 @@ func resolveDisableRequestCompression(ctx context.Context, cfg *aws.Config, conf
|
||||
return nil
|
||||
}
|
||||
|
||||
// resolveDisableClockSkewCorrection extracts the DisableClockSkewCorrection from
|
||||
// the configs slice's SharedConfig or EnvConfig
|
||||
func resolveDisableClockSkewCorrection(ctx context.Context, cfg *aws.Config, configs configs) error {
|
||||
disable, _, err := getDisableClockSkewCorrection(ctx, configs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cfg.DisableClockSkewCorrection = disable
|
||||
return nil
|
||||
}
|
||||
|
||||
// resolveRequestMinCompressSizeBytes extracts the RequestMinCompressSizeBytes from the configs slice's
|
||||
// SharedConfig or EnvConfig
|
||||
func resolveRequestMinCompressSizeBytes(ctx context.Context, cfg *aws.Config, configs configs) error {
|
||||
|
||||
+16
@@ -113,6 +113,8 @@ const (
|
||||
disableRequestCompression = "disable_request_compression"
|
||||
requestMinCompressionSizeBytes = "request_min_compression_size_bytes"
|
||||
|
||||
disableClockSkewCorrection = "disable_clock_skew_correction"
|
||||
|
||||
s3DisableExpressSessionAuthKey = "s3_disable_express_session_auth"
|
||||
|
||||
accountIDKey = "aws_account_id"
|
||||
@@ -346,6 +348,10 @@ type SharedConfig struct {
|
||||
// retrieved from config file's profile field request_min_compression_size_bytes
|
||||
RequestMinCompressSizeBytes *int64
|
||||
|
||||
// determine if clock skew correction is disabled, default to false
|
||||
// retrieved from config file's profile field disable_clock_skew_correction
|
||||
DisableClockSkewCorrection *bool
|
||||
|
||||
// Whether S3Express auth is disabled.
|
||||
//
|
||||
// This will NOT prevent requests from being made to S3Express buckets, it
|
||||
@@ -1149,6 +1155,9 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er
|
||||
if err := updateDisableRequestCompression(&c.DisableRequestCompression, section, disableRequestCompression); err != nil {
|
||||
return fmt.Errorf("failed to load %s from shared config, %w", disableRequestCompression, err)
|
||||
}
|
||||
if err := updateDisableRequestCompression(&c.DisableClockSkewCorrection, section, disableClockSkewCorrection); err != nil {
|
||||
return fmt.Errorf("failed to load %s from shared config, %w", disableClockSkewCorrection, err)
|
||||
}
|
||||
if err := updateRequestMinCompressSizeBytes(&c.RequestMinCompressSizeBytes, section, requestMinCompressionSizeBytes); err != nil {
|
||||
return fmt.Errorf("failed to load %s from shared config, %w", requestMinCompressionSizeBytes, err)
|
||||
}
|
||||
@@ -1292,6 +1301,13 @@ func (c SharedConfig) getDisableRequestCompression(ctx context.Context) (bool, b
|
||||
return *c.DisableRequestCompression, true, nil
|
||||
}
|
||||
|
||||
func (c SharedConfig) getDisableClockSkewCorrection(ctx context.Context) (bool, bool, error) {
|
||||
if c.DisableClockSkewCorrection == nil {
|
||||
return false, false, nil
|
||||
}
|
||||
return *c.DisableClockSkewCorrection, true, nil
|
||||
}
|
||||
|
||||
func (c SharedConfig) getAccountIDEndpointMode(ctx context.Context) (aws.AccountIDEndpointMode, bool, error) {
|
||||
return c.AccountIDEndpointMode, len(c.AccountIDEndpointMode) > 0, nil
|
||||
}
|
||||
|
||||
+29
@@ -1,3 +1,32 @@
|
||||
# v1.19.30 (2026-07-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.19.29 (2026-07-13)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.19.28 (2026-07-08.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.19.27 (2026-07-06)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.19.26 (2026-07-01)
|
||||
|
||||
* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.19.25 (2026-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.19.24 (2026-06-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.19.23 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package credentials
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.19.23"
|
||||
const goModuleVersion = "1.19.30"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.18.31 (2026-07-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.30 (2026-07-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.29 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package imds
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.18.29"
|
||||
const goModuleVersion = "1.18.31"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.4.31 (2026-07-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.4.30 (2026-07-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.4.29 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package configsources
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.4.29"
|
||||
const goModuleVersion = "1.4.31"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v2.7.31 (2026-07-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.7.30 (2026-07-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.7.29 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package endpoints
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "2.7.29"
|
||||
const goModuleVersion = "2.7.31"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.4.32 (2026-07-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.4.31 (2026-07-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.4.30 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package v4a
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.4.30"
|
||||
const goModuleVersion = "1.4.32"
|
||||
|
||||
Generated
Vendored
+4
@@ -1,3 +1,7 @@
|
||||
# v1.13.13 (2026-07-01)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.13.12 (2026-06-04)
|
||||
|
||||
* **Dependency Update**: Update to smithy-go v1.27.1 to fix several union-related deserialization bugs in schema-serde-enabled services.
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -3,4 +3,4 @@
|
||||
package acceptencoding
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.13.12"
|
||||
const goModuleVersion = "1.13.13"
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
# v1.13.31 (2026-07-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.30 (2026-07-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.29 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -3,4 +3,4 @@
|
||||
package presignedurl
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.13.29"
|
||||
const goModuleVersion = "1.13.31"
|
||||
|
||||
+30
@@ -1,3 +1,33 @@
|
||||
# v1.5.0 (2026-07-21)
|
||||
|
||||
* **Feature**: Add an option to clients to disable clock skew
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.4.1 (2026-07-13)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.4.0 (2026-07-08.2)
|
||||
|
||||
* **Feature**: Adds support for OAuth 2.0 token operations in AWS Sign-In, CreateOAuth2TokenWithIAM (client credentials flow), IntrospectOAuth2TokenWithIAM (token inspection), and RevokeOAuth2TokenWithIAM (token revocation).
|
||||
|
||||
# v1.3.0 (2026-07-06)
|
||||
|
||||
* **Feature**: Add request serialization snapshot tests.
|
||||
|
||||
# v1.2.2 (2026-07-01)
|
||||
|
||||
* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.1 (2026-06-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.2.0 (2026-06-10)
|
||||
|
||||
* **Feature**: AWS Sign-In now allows customers to control access to the AWS Management Console using resource-based policies. With this release customers can restrict console access based on network perimeters such as VPC IDs, VPC endpoints, and IP addresses.
|
||||
|
||||
# v1.1.5 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+88
-13
@@ -4,6 +4,7 @@ package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
cryptorand "crypto/rand"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
@@ -20,6 +21,7 @@ import (
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/metrics"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyrand "github.com/aws/smithy-go/rand"
|
||||
"github.com/aws/smithy-go/tracing"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"net"
|
||||
@@ -201,6 +203,8 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
|
||||
resolveIdempotencyTokenProvider(&options)
|
||||
|
||||
resolveEndpointResolverV2(&options)
|
||||
|
||||
resolveTracerProvider(&options)
|
||||
@@ -259,6 +263,10 @@ func (c *Client) invokeOperation(
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
if err := c.addCommonMiddlewares(stack, options, opID); err != nil {
|
||||
return nil, metadata, err
|
||||
}
|
||||
|
||||
for _, fn := range stackFns {
|
||||
if err := fn(stack, options); err != nil {
|
||||
return nil, metadata, err
|
||||
@@ -363,6 +371,49 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, operation string) error {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
if err := addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func resolveAuthSchemeResolver(options *Options) {
|
||||
if options.AuthSchemeResolver == nil {
|
||||
options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
|
||||
@@ -436,16 +487,17 @@ func setResolvedDefaultsMode(o *Options) {
|
||||
// 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,
|
||||
AuthSchemePreference: cfg.AuthSchemePreference,
|
||||
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,
|
||||
DisableClockSkewCorrection: cfg.DisableClockSkewCorrection,
|
||||
AuthSchemePreference: cfg.AuthSchemePreference,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
@@ -635,15 +687,17 @@ func addClientRequestID(stack *middleware.Stack) error {
|
||||
}
|
||||
|
||||
func addComputeContentLength(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
|
||||
return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After)
|
||||
}
|
||||
|
||||
func addRawResponseToMetadata(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
|
||||
}
|
||||
|
||||
func addRecordResponseTiming(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
|
||||
func addRecordResponseTiming(stack *middleware.Stack, options Options) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{
|
||||
DisableClockSkewCorrection: options.DisableClockSkewCorrection,
|
||||
}, middleware.After)
|
||||
}
|
||||
|
||||
func addSpanRetryLoop(stack *middleware.Stack, options Options) error {
|
||||
@@ -709,11 +763,19 @@ func addIsPaginatorUserAgent(o *Options) {
|
||||
})
|
||||
}
|
||||
|
||||
func resolveIdempotencyTokenProvider(o *Options) {
|
||||
if o.IdempotencyTokenProvider != nil {
|
||||
return
|
||||
}
|
||||
o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader)
|
||||
}
|
||||
|
||||
func addRetry(stack *middleware.Stack, o Options, c *Client) error {
|
||||
attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
|
||||
m.LogAttempts = o.ClientLogMode.IsRetries()
|
||||
m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/signin")
|
||||
m.ClientSkew = c.timeOffset
|
||||
m.DisableClockSkewCorrection = o.DisableClockSkewCorrection
|
||||
})
|
||||
if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
|
||||
return err
|
||||
@@ -816,6 +878,19 @@ func resolveMeterProvider(options *Options) {
|
||||
}
|
||||
}
|
||||
|
||||
// IdempotencyTokenProvider interface for providing idempotency token
|
||||
type IdempotencyTokenProvider interface {
|
||||
GetIdempotencyToken() (string, error)
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: operation,
|
||||
}
|
||||
}
|
||||
|
||||
func addRecursionDetection(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
|
||||
}
|
||||
|
||||
+8
-51
@@ -4,10 +4,9 @@ package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/signin/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
@@ -84,6 +83,11 @@ type CreateOAuth2TokenInput struct {
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *CreateOAuth2TokenInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsControlPlane = ptr.Bool(false)
|
||||
}
|
||||
|
||||
// Output structure for CreateOAuth2Token operation
|
||||
//
|
||||
// Contains flattened token operation outputs for both authorization code and
|
||||
@@ -104,9 +108,6 @@ type CreateOAuth2TokenOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateOAuth2Token{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -115,38 +116,17 @@ func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stac
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOAuth2Token"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -155,22 +135,13 @@ func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stac
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateOAuth2TokenValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOAuth2Token(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateOAuth2Token"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -185,22 +156,8 @@ func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stac
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateOAuth2Token(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateOAuth2Token",
|
||||
}
|
||||
}
|
||||
|
||||
Generated
Vendored
+134
@@ -0,0 +1,134 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Grants permission to exchange client credentials for an OAuth 2.0 access token
|
||||
// scoped to a resource that can be used to access AWS services from applications
|
||||
func (c *Client) CreateOAuth2TokenWithIAM(ctx context.Context, params *CreateOAuth2TokenWithIAMInput, optFns ...func(*Options)) (*CreateOAuth2TokenWithIAMOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateOAuth2TokenWithIAMInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateOAuth2TokenWithIAM", params, optFns, c.addOperationCreateOAuth2TokenWithIAMMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateOAuth2TokenWithIAMOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input structure for CreateOAuth2TokenWithIAM operation
|
||||
type CreateOAuth2TokenWithIAMInput struct {
|
||||
|
||||
// OAuth 2.0 grant type. Must be "client_credentials".
|
||||
//
|
||||
// This member is required.
|
||||
GrantType *string
|
||||
|
||||
// The OAuth resource for which the access token is requested. Example:
|
||||
// "aws-mcp.amazonaws.com".
|
||||
//
|
||||
// This member is required.
|
||||
Resource *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *CreateOAuth2TokenWithIAMInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsOAuthEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output structure for CreateOAuth2TokenWithIAM operation
|
||||
//
|
||||
// Contains the JWT access token, token type, and expiration per RFC 6749 §5.1.
|
||||
type CreateOAuth2TokenWithIAMOutput struct {
|
||||
|
||||
// JWT access token containing principal identity, resource scope, and session
|
||||
// metadata
|
||||
//
|
||||
// This member is required.
|
||||
AccessToken *string
|
||||
|
||||
// Token lifetime in seconds. Value is the minimum of session validity and 1 hour.
|
||||
//
|
||||
// This member is required.
|
||||
ExpiresIn *int32
|
||||
|
||||
// Always "Bearer" per OAuth 2.1 specification
|
||||
//
|
||||
// This member is required.
|
||||
TokenType *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateOAuth2TokenWithIAMMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateOAuth2TokenWithIAM{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateOAuth2TokenWithIAM{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateOAuth2TokenWithIAMValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateOAuth2TokenWithIAM"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go
Generated
Vendored
+119
@@ -0,0 +1,119 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Delete console authorization configuration with automatic scope detection
|
||||
func (c *Client) DeleteConsoleAuthorizationConfiguration(ctx context.Context, params *DeleteConsoleAuthorizationConfigurationInput, optFns ...func(*Options)) (*DeleteConsoleAuthorizationConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteConsoleAuthorizationConfigurationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteConsoleAuthorizationConfiguration", params, optFns, c.addOperationDeleteConsoleAuthorizationConfigurationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteConsoleAuthorizationConfigurationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input for DeleteConsoleAuthorizationConfiguration operation
|
||||
type DeleteConsoleAuthorizationConfigurationInput struct {
|
||||
|
||||
// Target account identifier
|
||||
TargetId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *DeleteConsoleAuthorizationConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsControlPlane = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output for DeleteConsoleAuthorizationConfiguration operation
|
||||
type DeleteConsoleAuthorizationConfigurationOutput struct {
|
||||
|
||||
// Whether console authorization is enabled
|
||||
//
|
||||
// This member is required.
|
||||
ConsoleAuthorizationEnabled *bool
|
||||
|
||||
// Authorization scope
|
||||
//
|
||||
// This member is required.
|
||||
Scope *string
|
||||
|
||||
// Target account identifier
|
||||
//
|
||||
// This member is required.
|
||||
TargetId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteConsoleAuthorizationConfiguration{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteConsoleAuthorizationConfiguration"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Generated
Vendored
+148
@@ -0,0 +1,148 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Remove a permission statement from the account's SignIn resource-based policy
|
||||
func (c *Client) DeleteResourcePermissionStatement(ctx context.Context, params *DeleteResourcePermissionStatementInput, optFns ...func(*Options)) (*DeleteResourcePermissionStatementOutput, error) {
|
||||
if params == nil {
|
||||
params = &DeleteResourcePermissionStatementInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePermissionStatement", params, optFns, c.addOperationDeleteResourcePermissionStatementMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*DeleteResourcePermissionStatementOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input for DeleteResourcePermissionStatement operation
|
||||
type DeleteResourcePermissionStatementInput struct {
|
||||
|
||||
// Unique identifier of the permission statement to delete
|
||||
//
|
||||
// This member is required.
|
||||
StatementId *string
|
||||
|
||||
// Idempotency token for the request
|
||||
ClientToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *DeleteResourcePermissionStatementInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsControlPlane = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output for DeleteResourcePermissionStatement operation
|
||||
type DeleteResourcePermissionStatementOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteResourcePermissionStatement{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteResourcePermissionStatement{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addIdempotencyToken_opDeleteResourcePermissionStatementMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDeleteResourcePermissionStatementValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteResourcePermissionStatement"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type idempotencyToken_initializeOpDeleteResourcePermissionStatement struct {
|
||||
tokenProvider IdempotencyTokenProvider
|
||||
}
|
||||
|
||||
func (*idempotencyToken_initializeOpDeleteResourcePermissionStatement) ID() string {
|
||||
return "OperationIdempotencyTokenAutoFill"
|
||||
}
|
||||
|
||||
func (m *idempotencyToken_initializeOpDeleteResourcePermissionStatement) 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.(*DeleteResourcePermissionStatementInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteResourcePermissionStatementInput ")
|
||||
}
|
||||
|
||||
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_opDeleteResourcePermissionStatementMiddleware(stack *middleware.Stack, cfg Options) error {
|
||||
return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteResourcePermissionStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
|
||||
}
|
||||
Generated
Vendored
+119
@@ -0,0 +1,119 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Get console authorization configuration with automatic scope detection
|
||||
func (c *Client) GetConsoleAuthorizationConfiguration(ctx context.Context, params *GetConsoleAuthorizationConfigurationInput, optFns ...func(*Options)) (*GetConsoleAuthorizationConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetConsoleAuthorizationConfigurationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetConsoleAuthorizationConfiguration", params, optFns, c.addOperationGetConsoleAuthorizationConfigurationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetConsoleAuthorizationConfigurationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input for GetConsoleAuthorizationConfiguration operation
|
||||
type GetConsoleAuthorizationConfigurationInput struct {
|
||||
|
||||
// Target account identifier
|
||||
TargetId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *GetConsoleAuthorizationConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsControlPlane = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output for GetConsoleAuthorizationConfiguration operation
|
||||
type GetConsoleAuthorizationConfigurationOutput struct {
|
||||
|
||||
// Whether console authorization is enabled
|
||||
//
|
||||
// This member is required.
|
||||
ConsoleAuthorizationEnabled *bool
|
||||
|
||||
// Authorization scope
|
||||
//
|
||||
// This member is required.
|
||||
Scope *string
|
||||
|
||||
// Target account identifier
|
||||
//
|
||||
// This member is required.
|
||||
TargetId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetConsoleAuthorizationConfiguration{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetConsoleAuthorizationConfiguration"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aws/aws-sdk-go-v2/service/signin/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieve the account's consolidated SignIn resource-based policy
|
||||
func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetResourcePolicyInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetResourcePolicyOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input for GetResourcePolicy operation
|
||||
type GetResourcePolicyInput struct {
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *GetResourcePolicyInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsControlPlane = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output for GetResourcePolicy operation
|
||||
type GetResourcePolicyOutput struct {
|
||||
|
||||
// The account's SignIn resource-based policy
|
||||
//
|
||||
// This member is required.
|
||||
SigninResourceBasedPolicy *types.SigninResourceBasedPolicy
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetResourcePolicy{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetResourcePolicy{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetResourcePolicy"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Generated
Vendored
+184
@@ -0,0 +1,184 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Grants permission to inspect the metadata and state of an OAuth 2.0 access
|
||||
// token or refresh token
|
||||
//
|
||||
// Implements RFC 7662 OAuth 2.0 Token Introspection over a SigV4-authenticated
|
||||
// endpoint. Inspects the metadata of an access_token or refresh_token issued by
|
||||
// AWS Sign-In and returns the claims associated with it.
|
||||
//
|
||||
// Inactive token semantics (RFC 7662 §2.2): when the supplied token is unknown,
|
||||
// expired, revoked, malformed, or owned by a different account, the response body
|
||||
// is exactly { "active": false } with all other claims omitted.
|
||||
func (c *Client) IntrospectOAuth2TokenWithIAM(ctx context.Context, params *IntrospectOAuth2TokenWithIAMInput, optFns ...func(*Options)) (*IntrospectOAuth2TokenWithIAMOutput, error) {
|
||||
if params == nil {
|
||||
params = &IntrospectOAuth2TokenWithIAMInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "IntrospectOAuth2TokenWithIAM", params, optFns, c.addOperationIntrospectOAuth2TokenWithIAMMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*IntrospectOAuth2TokenWithIAMOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input structure for IntrospectOAuth2TokenWithIAM operation
|
||||
//
|
||||
// RFC 7662 §2.1 introspection request. Contains the token to inspect and an
|
||||
// optional hint about the token's type.
|
||||
type IntrospectOAuth2TokenWithIAMInput struct {
|
||||
|
||||
// The string value of the token to introspect. May be either an access_token or a
|
||||
// refresh_token issued by AWS Sign-In.
|
||||
//
|
||||
// This member is required.
|
||||
Token *string
|
||||
|
||||
// Optional hint about the type of the token submitted for introspection. The
|
||||
// server uses this hint to optimize lookup, but still falls back to the other
|
||||
// token type on miss. Allowed values: access_token, refresh_token.
|
||||
TokenTypeHint *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *IntrospectOAuth2TokenWithIAMInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsOAuthEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output structure for IntrospectOAuth2TokenWithIAM operation
|
||||
//
|
||||
// RFC 7662 §2.2 introspection response. Only active is required; all other claims
|
||||
// are omitted when the token is inactive.
|
||||
type IntrospectOAuth2TokenWithIAMOutput struct {
|
||||
|
||||
// Indicates whether the token is currently active. true only when the token is
|
||||
// valid, has not expired, has not been revoked, and belongs to the caller's
|
||||
// account.
|
||||
//
|
||||
// This member is required.
|
||||
Active *bool
|
||||
|
||||
// 12-digit AWS account ID of the token's subject principal.
|
||||
AccountId *string
|
||||
|
||||
// Audience of the token: the OAuth resource the token is scoped to (for example,
|
||||
// "aws-mcp.amazonaws.com"). Omitted for refresh tokens.
|
||||
Aud *string
|
||||
|
||||
// Client identifier for the OAuth 2.0 client that requested the token.
|
||||
ClientId *string
|
||||
|
||||
// Token expiration time as a NumericDate (Unix epoch seconds).
|
||||
Exp *int64
|
||||
|
||||
// Token issuance time as a NumericDate (Unix epoch seconds).
|
||||
Iat *int64
|
||||
|
||||
// Issuer of the token. Always "signin.amazonaws.com" for AWS Sign-In.
|
||||
Iss *string
|
||||
|
||||
// Unique identifier for the token.
|
||||
Jti *string
|
||||
|
||||
// Token "not before" time as a NumericDate (Unix epoch seconds).
|
||||
Nbf *int64
|
||||
|
||||
// The OAuth resource the token is scoped to during Human OAuth flow. Only present
|
||||
// for refresh token introspection.
|
||||
Resource *string
|
||||
|
||||
// AWS Sign-In session ARN bound to the token, of the form
|
||||
// arn:aws:signin:{region}:{account}:session/{uuid}.
|
||||
SigninSession *string
|
||||
|
||||
// Subject of the token: the IAM principal ARN. For assumed-role sessions, this is
|
||||
// the session ARN (matches sts:GetCallerIdentity's Arn field), e.g.
|
||||
// arn:aws:sts::123456789012:assumed-role/MyRole/session-name.
|
||||
Sub *string
|
||||
|
||||
// Indicates which kind of token was introspected. One of "access_token" or
|
||||
// "refresh_token".
|
||||
TokenType *string
|
||||
|
||||
// User identifier matching sts:GetCallerIdentity's UserId field for the token's
|
||||
// subject principal (e.g. "AIDAEXAMPLE" for an IAM user, or
|
||||
// "AROAEXAMPLE:session-name" for an assumed role).
|
||||
UserId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationIntrospectOAuth2TokenWithIAMMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpIntrospectOAuth2TokenWithIAM{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpIntrospectOAuth2TokenWithIAM{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpIntrospectOAuth2TokenWithIAMValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "IntrospectOAuth2TokenWithIAM"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Generated
Vendored
+213
@@ -0,0 +1,213 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/service/signin/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Retrieve all permission statements in the account's SignIn resource-based policy
|
||||
func (c *Client) ListResourcePermissionStatements(ctx context.Context, params *ListResourcePermissionStatementsInput, optFns ...func(*Options)) (*ListResourcePermissionStatementsOutput, error) {
|
||||
if params == nil {
|
||||
params = &ListResourcePermissionStatementsInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "ListResourcePermissionStatements", params, optFns, c.addOperationListResourcePermissionStatementsMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*ListResourcePermissionStatementsOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input for ListResourcePermissionStatements operation
|
||||
type ListResourcePermissionStatementsInput struct {
|
||||
|
||||
// Maximum number of results to return
|
||||
MaxResults *int32
|
||||
|
||||
// Token for pagination
|
||||
NextToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *ListResourcePermissionStatementsInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsControlPlane = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output for ListResourcePermissionStatements operation
|
||||
type ListResourcePermissionStatementsOutput struct {
|
||||
|
||||
// List of permission statement summaries
|
||||
//
|
||||
// This member is required.
|
||||
PermissionStatements []types.PermissionStatementSummary
|
||||
|
||||
// Token for next page of results
|
||||
NextToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationListResourcePermissionStatementsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpListResourcePermissionStatements{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListResourcePermissionStatements{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListResourcePermissionStatements"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ListResourcePermissionStatementsPaginatorOptions is the paginator options for
|
||||
// ListResourcePermissionStatements
|
||||
type ListResourcePermissionStatementsPaginatorOptions struct {
|
||||
// Maximum number of results to return
|
||||
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
|
||||
}
|
||||
|
||||
// ListResourcePermissionStatementsPaginator is a paginator for
|
||||
// ListResourcePermissionStatements
|
||||
type ListResourcePermissionStatementsPaginator struct {
|
||||
options ListResourcePermissionStatementsPaginatorOptions
|
||||
client ListResourcePermissionStatementsAPIClient
|
||||
params *ListResourcePermissionStatementsInput
|
||||
nextToken *string
|
||||
firstPage bool
|
||||
}
|
||||
|
||||
// NewListResourcePermissionStatementsPaginator returns a new
|
||||
// ListResourcePermissionStatementsPaginator
|
||||
func NewListResourcePermissionStatementsPaginator(client ListResourcePermissionStatementsAPIClient, params *ListResourcePermissionStatementsInput, optFns ...func(*ListResourcePermissionStatementsPaginatorOptions)) *ListResourcePermissionStatementsPaginator {
|
||||
if params == nil {
|
||||
params = &ListResourcePermissionStatementsInput{}
|
||||
}
|
||||
|
||||
options := ListResourcePermissionStatementsPaginatorOptions{}
|
||||
if params.MaxResults != nil {
|
||||
options.Limit = *params.MaxResults
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &ListResourcePermissionStatementsPaginator{
|
||||
options: options,
|
||||
client: client,
|
||||
params: params,
|
||||
firstPage: true,
|
||||
nextToken: params.NextToken,
|
||||
}
|
||||
}
|
||||
|
||||
// HasMorePages returns a boolean indicating whether more pages are available
|
||||
func (p *ListResourcePermissionStatementsPaginator) HasMorePages() bool {
|
||||
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
|
||||
}
|
||||
|
||||
// NextPage retrieves the next ListResourcePermissionStatements page.
|
||||
func (p *ListResourcePermissionStatementsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourcePermissionStatementsOutput, 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
|
||||
|
||||
optFns = append([]func(*Options){
|
||||
addIsPaginatorUserAgent,
|
||||
}, optFns...)
|
||||
result, err := p.client.ListResourcePermissionStatements(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
|
||||
}
|
||||
|
||||
// ListResourcePermissionStatementsAPIClient is a client that implements the
|
||||
// ListResourcePermissionStatements operation.
|
||||
type ListResourcePermissionStatementsAPIClient interface {
|
||||
ListResourcePermissionStatements(context.Context, *ListResourcePermissionStatementsInput, ...func(*Options)) (*ListResourcePermissionStatementsOutput, error)
|
||||
}
|
||||
|
||||
var _ ListResourcePermissionStatementsAPIClient = (*Client)(nil)
|
||||
Generated
Vendored
+119
@@ -0,0 +1,119 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Enable console authorization configuration with automatic scope detection
|
||||
func (c *Client) PutConsoleAuthorizationConfiguration(ctx context.Context, params *PutConsoleAuthorizationConfigurationInput, optFns ...func(*Options)) (*PutConsoleAuthorizationConfigurationOutput, error) {
|
||||
if params == nil {
|
||||
params = &PutConsoleAuthorizationConfigurationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "PutConsoleAuthorizationConfiguration", params, optFns, c.addOperationPutConsoleAuthorizationConfigurationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*PutConsoleAuthorizationConfigurationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input for PutConsoleAuthorizationConfiguration operation
|
||||
type PutConsoleAuthorizationConfigurationInput struct {
|
||||
|
||||
// Target account identifier
|
||||
TargetId *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *PutConsoleAuthorizationConfigurationInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsControlPlane = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output for PutConsoleAuthorizationConfiguration operation
|
||||
type PutConsoleAuthorizationConfigurationOutput struct {
|
||||
|
||||
// Whether console authorization is enabled
|
||||
//
|
||||
// This member is required.
|
||||
ConsoleAuthorizationEnabled *bool
|
||||
|
||||
// Authorization scope
|
||||
//
|
||||
// This member is required.
|
||||
Scope *string
|
||||
|
||||
// Target account identifier
|
||||
//
|
||||
// This member is required.
|
||||
TargetId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationPutConsoleAuthorizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutConsoleAuthorizationConfiguration{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "PutConsoleAuthorizationConfiguration"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Generated
Vendored
+168
@@ -0,0 +1,168 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Create a permission statement in the account's SignIn resource-based policy
|
||||
func (c *Client) PutResourcePermissionStatement(ctx context.Context, params *PutResourcePermissionStatementInput, optFns ...func(*Options)) (*PutResourcePermissionStatementOutput, error) {
|
||||
if params == nil {
|
||||
params = &PutResourcePermissionStatementInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "PutResourcePermissionStatement", params, optFns, c.addOperationPutResourcePermissionStatementMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*PutResourcePermissionStatementOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input for PutResourcePermissionStatement operation
|
||||
type PutResourcePermissionStatementInput struct {
|
||||
|
||||
// Idempotency token for the request
|
||||
ClientToken *string
|
||||
|
||||
// Console VPC endpoint identifier
|
||||
ConsoleSourceVpce *string
|
||||
|
||||
// Principal to exclude from the permission statement
|
||||
ExcludedPrincipal *string
|
||||
|
||||
// AWS region where the VPC and VPC endpoint reside Required when sourceVpc or
|
||||
// signinSourceVpce/consoleSourceVpce is provided
|
||||
RequestedRegion *string
|
||||
|
||||
// SignIn VPC endpoint identifier
|
||||
SigninSourceVpce *string
|
||||
|
||||
// Source IP address
|
||||
SourceIp *string
|
||||
|
||||
// VPC identifier to restrict console access
|
||||
SourceVpc *string
|
||||
|
||||
// Source IP address within VPC
|
||||
VpcSourceIp *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *PutResourcePermissionStatementInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsControlPlane = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output for PutResourcePermissionStatement operation
|
||||
type PutResourcePermissionStatementOutput struct {
|
||||
|
||||
// Unique identifier for the created permission statement
|
||||
//
|
||||
// This member is required.
|
||||
StatementId *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationPutResourcePermissionStatementMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpPutResourcePermissionStatement{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutResourcePermissionStatement{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addIdempotencyToken_opPutResourcePermissionStatementMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "PutResourcePermissionStatement"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type idempotencyToken_initializeOpPutResourcePermissionStatement struct {
|
||||
tokenProvider IdempotencyTokenProvider
|
||||
}
|
||||
|
||||
func (*idempotencyToken_initializeOpPutResourcePermissionStatement) ID() string {
|
||||
return "OperationIdempotencyTokenAutoFill"
|
||||
}
|
||||
|
||||
func (m *idempotencyToken_initializeOpPutResourcePermissionStatement) 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.(*PutResourcePermissionStatementInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("expected middleware input to be of type *PutResourcePermissionStatementInput ")
|
||||
}
|
||||
|
||||
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_opPutResourcePermissionStatementMiddleware(stack *middleware.Stack, cfg Options) error {
|
||||
return stack.Initialize.Add(&idempotencyToken_initializeOpPutResourcePermissionStatement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
|
||||
}
|
||||
Generated
Vendored
+122
@@ -0,0 +1,122 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package signin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Grants permission to revoke an OAuth 2.0 refresh token and its associated
|
||||
// refresh tokens
|
||||
//
|
||||
// Revokes a refresh_token issued by AWS Sign-In, invalidating the entire token
|
||||
// chain so that the refresh_token can no longer be used to mint new access_tokens.
|
||||
//
|
||||
// Idempotency: revoking an already-revoked, expired, or otherwise invalid token
|
||||
// still returns 200 OK with an empty body. Only the refresh_token type is
|
||||
// accepted.
|
||||
func (c *Client) RevokeOAuth2TokenWithIAM(ctx context.Context, params *RevokeOAuth2TokenWithIAMInput, optFns ...func(*Options)) (*RevokeOAuth2TokenWithIAMOutput, error) {
|
||||
if params == nil {
|
||||
params = &RevokeOAuth2TokenWithIAMInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "RevokeOAuth2TokenWithIAM", params, optFns, c.addOperationRevokeOAuth2TokenWithIAMMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*RevokeOAuth2TokenWithIAMOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Input structure for RevokeOAuth2TokenWithIAM operation
|
||||
//
|
||||
// RFC 7009 §2.1 revocation request. Contains the refresh_token to revoke.
|
||||
type RevokeOAuth2TokenWithIAMInput struct {
|
||||
|
||||
// The refresh_token to revoke. Must be a refresh_token issued by AWS Sign-In
|
||||
// (prefix "ASOR"); access_tokens are not accepted for revocation.
|
||||
//
|
||||
// This member is required.
|
||||
Token *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (in *RevokeOAuth2TokenWithIAMInput) bindEndpointParams(p *EndpointParameters) {
|
||||
|
||||
p.IsOAuthEndpoint = ptr.Bool(true)
|
||||
}
|
||||
|
||||
// Output structure for RevokeOAuth2TokenWithIAM operation
|
||||
//
|
||||
// RFC 7009 §2.2 revocation response. The endpoint returns 200 OK with an empty
|
||||
// body on success; there are no response fields.
|
||||
type RevokeOAuth2TokenWithIAMOutput struct {
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationRevokeOAuth2TokenWithIAMMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpRevokeOAuth2TokenWithIAM{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRevokeOAuth2TokenWithIAM{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(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 = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpRevokeOAuth2TokenWithIAMValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RevokeOAuth2TokenWithIAM"), middleware.Before); 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
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
+2397
File diff suppressed because it is too large
Load Diff
+341
-44
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/internal/endpoints"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
|
||||
internalendpoints "github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints"
|
||||
smithy "github.com/aws/smithy-go"
|
||||
smithyauth "github.com/aws/smithy-go/auth"
|
||||
smithyendpoints "github.com/aws/smithy-go/endpoints"
|
||||
"github.com/aws/smithy-go/endpoints/private/bdd"
|
||||
@@ -269,6 +270,18 @@ type EndpointParameters struct {
|
||||
//
|
||||
// AWS::Region
|
||||
Region *string
|
||||
|
||||
// Indicates if the operation targets the control plane endpoint
|
||||
//
|
||||
// Parameter is
|
||||
// required.
|
||||
IsControlPlane *bool
|
||||
|
||||
// Indicates if the operation targets the OAuth token endpoint
|
||||
//
|
||||
// Parameter is
|
||||
// required.
|
||||
IsOAuthEndpoint *bool
|
||||
}
|
||||
|
||||
// ValidateRequired validates required parameters are set.
|
||||
@@ -299,8 +312,8 @@ func (p EndpointParameters) WithDefaults() EndpointParameters {
|
||||
|
||||
const bddRoot int32 = 2
|
||||
|
||||
var bddNodes = [48]int32{
|
||||
-1, 1, -1, 0, 15, 3, 1, 4, 100000014, 2, 5, 100000014, 3, 11, 6, 4, 10, 7, 7, 100000004, 8, 8, 100000005, 9, 9, 100000006, 100000013, 5, 100000011, 100000012, 4, 13, 12, 6, 100000009, 100000010, 5, 14, 100000008, 6, 100000007, 100000008, 3, 100000001, 16, 4, 100000002, 100000003}
|
||||
var bddNodes = [120]int32{
|
||||
-1, 1, -1, 0, 6, 3, 2, 36, 4, 4, 5, 100000027, 6, 100000004, 100000027, 1, 29, 7, 2, 36, 8, 3, 9, 31, 4, 22, 10, 5, 19, 11, 7, 21, 12, 8, 100000007, 13, 10, 100000008, 14, 12, 100000009, 15, 13, 100000010, 16, 14, 100000011, 17, 15, 100000012, 18, 16, 100000013, 100000016, 6, 100000005, 20, 7, 21, 100000006, 17, 100000024, 100000025, 6, 100000004, 23, 7, 27, 24, 9, 100000014, 25, 10, 100000015, 26, 11, 100000022, 100000023, 11, 28, 100000021, 17, 100000020, 100000021, 2, 35, 30, 3, 39, 31, 4, 32, 100000027, 6, 100000004, 33, 7, 100000027, 34, 9, 100000014, 100000027, 3, 39, 36, 4, 38, 37, 7, 100000018, 100000019, 6, 100000004, 100000017, 5, 100000001, 40, 8, 100000002, 100000003}
|
||||
|
||||
type conditionContext struct {
|
||||
PartitionResult *awsrulesfn.PartitionConfig
|
||||
@@ -309,29 +322,55 @@ type conditionContext struct {
|
||||
func evalCondition(idx int, params *EndpointParameters, c *conditionContext) bool {
|
||||
switch idx {
|
||||
case 0:
|
||||
return params.Endpoint != nil
|
||||
case 1:
|
||||
return params.Region != nil
|
||||
case 1:
|
||||
return func() bool {
|
||||
if v := params.IsControlPlane; v != nil {
|
||||
return *v
|
||||
}
|
||||
return false
|
||||
}() == true
|
||||
case 2:
|
||||
return params.Endpoint != nil
|
||||
case 3:
|
||||
if v := awsrulesfn.GetPartition(*params.Region); v != nil {
|
||||
c.PartitionResult = v
|
||||
return true
|
||||
}
|
||||
return false
|
||||
case 3:
|
||||
return *params.UseFIPS == true
|
||||
case 4:
|
||||
return *params.UseDualStack == true
|
||||
return *params.UseFIPS == true
|
||||
case 5:
|
||||
return c.PartitionResult.SupportsDualStack == true
|
||||
case 6:
|
||||
return c.PartitionResult.SupportsFIPS == true
|
||||
case 7:
|
||||
return c.PartitionResult.Name == "aws"
|
||||
case 6:
|
||||
return func() bool {
|
||||
if v := params.IsOAuthEndpoint; v != nil {
|
||||
return *v
|
||||
}
|
||||
return false
|
||||
}() == true
|
||||
case 7:
|
||||
return *params.UseDualStack == true
|
||||
case 8:
|
||||
return c.PartitionResult.Name == "aws-cn"
|
||||
case 9:
|
||||
return *params.Region == "us-gov-west-1"
|
||||
case 10:
|
||||
return c.PartitionResult.Name == "aws-us-gov"
|
||||
case 11:
|
||||
return c.PartitionResult.SupportsFIPS == true
|
||||
case 12:
|
||||
return c.PartitionResult.Name == "aws-iso"
|
||||
case 13:
|
||||
return c.PartitionResult.Name == "aws-iso-b"
|
||||
case 14:
|
||||
return c.PartitionResult.Name == "aws-iso-f"
|
||||
case 15:
|
||||
return c.PartitionResult.Name == "aws-iso-e"
|
||||
case 16:
|
||||
return c.PartitionResult.Name == "aws-eusc"
|
||||
case 17:
|
||||
return c.PartitionResult.SupportsDualStack == true
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -341,11 +380,13 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (
|
||||
case 0:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint resolution failed: no matching rule")
|
||||
case 1:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
|
||||
case 2:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
|
||||
case 3:
|
||||
uriString := *params.Endpoint
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin.")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".api.aws")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
@@ -353,8 +394,127 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
Properties: func() smithy.Properties {
|
||||
var out smithy.Properties
|
||||
smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
|
||||
{
|
||||
SchemeID: "sigv4",
|
||||
SignerProperties: func() smithy.Properties {
|
||||
var sp smithy.Properties
|
||||
smithyhttp.SetSigV4SigningName(&sp, "signin")
|
||||
smithyhttp.SetSigV4ASigningName(&sp, "signin")
|
||||
|
||||
smithyhttp.SetSigV4SigningRegion(&sp, *params.Region)
|
||||
return sp
|
||||
}(),
|
||||
},
|
||||
})
|
||||
return out
|
||||
}(),
|
||||
}, nil
|
||||
case 2:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin.")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".api.amazonwebservices.com.cn")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
Properties: func() smithy.Properties {
|
||||
var out smithy.Properties
|
||||
smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
|
||||
{
|
||||
SchemeID: "sigv4",
|
||||
SignerProperties: func() smithy.Properties {
|
||||
var sp smithy.Properties
|
||||
smithyhttp.SetSigV4SigningName(&sp, "signin")
|
||||
smithyhttp.SetSigV4ASigningName(&sp, "signin")
|
||||
|
||||
smithyhttp.SetSigV4SigningRegion(&sp, *params.Region)
|
||||
return sp
|
||||
}(),
|
||||
},
|
||||
})
|
||||
return out
|
||||
}(),
|
||||
}, nil
|
||||
case 3:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin.")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".")
|
||||
out.WriteString(c.PartitionResult.DualStackDnsSuffix)
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
Properties: func() smithy.Properties {
|
||||
var out smithy.Properties
|
||||
smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
|
||||
{
|
||||
SchemeID: "sigv4",
|
||||
SignerProperties: func() smithy.Properties {
|
||||
var sp smithy.Properties
|
||||
smithyhttp.SetSigV4SigningName(&sp, "signin")
|
||||
smithyhttp.SetSigV4ASigningName(&sp, "signin")
|
||||
|
||||
smithyhttp.SetSigV4SigningRegion(&sp, *params.Region)
|
||||
return sp
|
||||
}(),
|
||||
},
|
||||
})
|
||||
return out
|
||||
}(),
|
||||
}, nil
|
||||
case 4:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS endpoints are not supported for OAuth operations. Disable FIPS or use a non-OAuth operation.")
|
||||
case 5:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".oauth.signin.aws")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
Properties: func() smithy.Properties {
|
||||
var out smithy.Properties
|
||||
smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
|
||||
{
|
||||
SchemeID: "sigv4",
|
||||
SignerProperties: func() smithy.Properties {
|
||||
var sp smithy.Properties
|
||||
smithyhttp.SetSigV4SigningName(&sp, "signin")
|
||||
smithyhttp.SetSigV4ASigningName(&sp, "signin")
|
||||
|
||||
smithyhttp.SetSigV4SigningRegion(&sp, *params.Region)
|
||||
return sp
|
||||
}(),
|
||||
},
|
||||
})
|
||||
return out
|
||||
}(),
|
||||
}, nil
|
||||
case 6:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
@@ -370,7 +530,7 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 5:
|
||||
case 7:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
@@ -386,7 +546,7 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 6:
|
||||
case 8:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
@@ -402,32 +562,12 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 7:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin-fips.")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".")
|
||||
out.WriteString(c.PartitionResult.DualStackDnsSuffix)
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 8:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
|
||||
case 9:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin-fips.")
|
||||
out.WriteString("https://")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".")
|
||||
out.WriteString(c.PartitionResult.DnsSuffix)
|
||||
out.WriteString(".signin.c2shome.ic.gov")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
@@ -439,8 +579,165 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 10:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".signin.sc2shome.sgov.gov")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 11:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".signin.csphome.hci.ic.gov")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 12:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".signin.csphome.adc-e.uk")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 13:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".signin.amazonaws-eusc.eu")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 14:
|
||||
uriString := "https://signin-fips.amazonaws-us-gov.com"
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 15:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".signin-fips.amazonaws-us-gov.com")
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 16:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".signin.")
|
||||
out.WriteString(c.PartitionResult.DnsSuffix)
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 17:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
|
||||
case 18:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
|
||||
case 19:
|
||||
uriString := *params.Endpoint
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 20:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin-fips.")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".")
|
||||
out.WriteString(c.PartitionResult.DualStackDnsSuffix)
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 21:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
|
||||
case 22:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin-fips.")
|
||||
out.WriteString(*params.Region)
|
||||
out.WriteString(".")
|
||||
out.WriteString(c.PartitionResult.DnsSuffix)
|
||||
return out.String()
|
||||
}()
|
||||
uri, err := url.Parse(uriString)
|
||||
if err != nil {
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("Failed to parse uri: %s", uriString)
|
||||
}
|
||||
return smithyendpoints.Endpoint{
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 23:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
|
||||
case 24:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin.")
|
||||
@@ -457,9 +754,9 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 12:
|
||||
case 25:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
|
||||
case 13:
|
||||
case 26:
|
||||
uriString := func() string {
|
||||
var out strings.Builder
|
||||
out.WriteString("https://signin.")
|
||||
@@ -476,7 +773,7 @@ func resolveResult(idx int32, params *EndpointParameters, c *conditionContext) (
|
||||
URI: *uri,
|
||||
Headers: http.Header{},
|
||||
}, nil
|
||||
case 14:
|
||||
case 27:
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
|
||||
}
|
||||
return smithyendpoints.Endpoint{}, fmt.Errorf("endpoint rule error, invalid result index: %d", idx)
|
||||
|
||||
+12
@@ -9,6 +9,16 @@
|
||||
"api_client.go",
|
||||
"api_client_test.go",
|
||||
"api_op_CreateOAuth2Token.go",
|
||||
"api_op_CreateOAuth2TokenWithIAM.go",
|
||||
"api_op_DeleteConsoleAuthorizationConfiguration.go",
|
||||
"api_op_DeleteResourcePermissionStatement.go",
|
||||
"api_op_GetConsoleAuthorizationConfiguration.go",
|
||||
"api_op_GetResourcePolicy.go",
|
||||
"api_op_IntrospectOAuth2TokenWithIAM.go",
|
||||
"api_op_ListResourcePermissionStatements.go",
|
||||
"api_op_PutConsoleAuthorizationConfiguration.go",
|
||||
"api_op_PutResourcePermissionStatement.go",
|
||||
"api_op_RevokeOAuth2TokenWithIAM.go",
|
||||
"auth.go",
|
||||
"deserializers.go",
|
||||
"doc.go",
|
||||
@@ -19,6 +29,8 @@
|
||||
"internal/endpoints/endpoints.go",
|
||||
"internal/endpoints/endpoints_test.go",
|
||||
"options.go",
|
||||
"request_snapshot_test.go",
|
||||
"response_snapshot_test.go",
|
||||
"serializers.go",
|
||||
"snapshot_test.go",
|
||||
"sra_operation_order_test.go",
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package signin
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.1.5"
|
||||
const goModuleVersion = "1.5.0"
|
||||
|
||||
+9
@@ -44,6 +44,11 @@ type Options struct {
|
||||
// clients initial default settings.
|
||||
DefaultsMode aws.DefaultsMode
|
||||
|
||||
// Disables SDK clock skew correction. When set, the SDK will not adjust request
|
||||
// signing timestamps to compensate for clock drift between the client and the
|
||||
// service.
|
||||
DisableClockSkewCorrection bool
|
||||
|
||||
// The endpoint options to be used when attempting to resolve an endpoint.
|
||||
EndpointOptions EndpointResolverOptions
|
||||
|
||||
@@ -64,6 +69,10 @@ type Options struct {
|
||||
// Signature Version 4 (SigV4) Signer
|
||||
HTTPSignerV4 HTTPSignerV4
|
||||
|
||||
// Provides idempotency tokens values that will be automatically populated into
|
||||
// idempotent API operations.
|
||||
IdempotencyTokenProvider IdempotencyTokenProvider
|
||||
|
||||
// The logger writer interface to write logging messages to.
|
||||
Logger logging.Logger
|
||||
|
||||
|
||||
+842
@@ -97,6 +97,848 @@ func awsRestjson1_serializeOpHttpBindingsCreateOAuth2TokenInput(v *CreateOAuth2T
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpCreateOAuth2TokenWithIAM struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpCreateOAuth2TokenWithIAM) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpCreateOAuth2TokenWithIAM) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*CreateOAuth2TokenWithIAMInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/v1/token?x-amz-client-auth-method=iam")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentCreateOAuth2TokenWithIAMInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsCreateOAuth2TokenWithIAMInput(v *CreateOAuth2TokenWithIAMInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentCreateOAuth2TokenWithIAMInput(v *CreateOAuth2TokenWithIAMInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.GrantType != nil {
|
||||
ok := object.Key("grant_type")
|
||||
ok.String(*v.GrantType)
|
||||
}
|
||||
|
||||
if v.Resource != nil {
|
||||
ok := object.Key("resource")
|
||||
ok.String(*v.Resource)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpDeleteConsoleAuthorizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*DeleteConsoleAuthorizationConfigurationInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/delete-console-authorization-configuration")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentDeleteConsoleAuthorizationConfigurationInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsDeleteConsoleAuthorizationConfigurationInput(v *DeleteConsoleAuthorizationConfigurationInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentDeleteConsoleAuthorizationConfigurationInput(v *DeleteConsoleAuthorizationConfigurationInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.TargetId != nil {
|
||||
ok := object.Key("targetId")
|
||||
ok.String(*v.TargetId)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpDeleteResourcePermissionStatement struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpDeleteResourcePermissionStatement) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpDeleteResourcePermissionStatement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*DeleteResourcePermissionStatementInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/delete-resource-permission-statement")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentDeleteResourcePermissionStatementInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsDeleteResourcePermissionStatementInput(v *DeleteResourcePermissionStatementInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentDeleteResourcePermissionStatementInput(v *DeleteResourcePermissionStatementInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.ClientToken != nil {
|
||||
ok := object.Key("clientToken")
|
||||
ok.String(*v.ClientToken)
|
||||
}
|
||||
|
||||
if v.StatementId != nil {
|
||||
ok := object.Key("statementId")
|
||||
ok.String(*v.StatementId)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpGetConsoleAuthorizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*GetConsoleAuthorizationConfigurationInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/get-console-authorization-configuration")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentGetConsoleAuthorizationConfigurationInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsGetConsoleAuthorizationConfigurationInput(v *GetConsoleAuthorizationConfigurationInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentGetConsoleAuthorizationConfigurationInput(v *GetConsoleAuthorizationConfigurationInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.TargetId != nil {
|
||||
ok := object.Key("targetId")
|
||||
ok.String(*v.TargetId)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpGetResourcePolicy struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpGetResourcePolicy) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpGetResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*GetResourcePolicyInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/get-resource-policy")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsGetResourcePolicyInput(v *GetResourcePolicyInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpIntrospectOAuth2TokenWithIAM struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpIntrospectOAuth2TokenWithIAM) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpIntrospectOAuth2TokenWithIAM) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*IntrospectOAuth2TokenWithIAMInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/v1/introspect?x-amz-client-auth-method=iam")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentIntrospectOAuth2TokenWithIAMInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsIntrospectOAuth2TokenWithIAMInput(v *IntrospectOAuth2TokenWithIAMInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentIntrospectOAuth2TokenWithIAMInput(v *IntrospectOAuth2TokenWithIAMInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.Token != nil {
|
||||
ok := object.Key("token")
|
||||
ok.String(*v.Token)
|
||||
}
|
||||
|
||||
if v.TokenTypeHint != nil {
|
||||
ok := object.Key("token_type_hint")
|
||||
ok.String(*v.TokenTypeHint)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpListResourcePermissionStatements struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpListResourcePermissionStatements) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpListResourcePermissionStatements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*ListResourcePermissionStatementsInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/list-resource-permission-statements")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentListResourcePermissionStatementsInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsListResourcePermissionStatementsInput(v *ListResourcePermissionStatementsInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentListResourcePermissionStatementsInput(v *ListResourcePermissionStatementsInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.MaxResults != nil {
|
||||
ok := object.Key("maxResults")
|
||||
ok.Integer(*v.MaxResults)
|
||||
}
|
||||
|
||||
if v.NextToken != nil {
|
||||
ok := object.Key("nextToken")
|
||||
ok.String(*v.NextToken)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpPutConsoleAuthorizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*PutConsoleAuthorizationConfigurationInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/put-console-authorization-configuration")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentPutConsoleAuthorizationConfigurationInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsPutConsoleAuthorizationConfigurationInput(v *PutConsoleAuthorizationConfigurationInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentPutConsoleAuthorizationConfigurationInput(v *PutConsoleAuthorizationConfigurationInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.TargetId != nil {
|
||||
ok := object.Key("targetId")
|
||||
ok.String(*v.TargetId)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpPutResourcePermissionStatement struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpPutResourcePermissionStatement) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpPutResourcePermissionStatement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*PutResourcePermissionStatementInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/put-resource-permission-statement")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentPutResourcePermissionStatementInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsPutResourcePermissionStatementInput(v *PutResourcePermissionStatementInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentPutResourcePermissionStatementInput(v *PutResourcePermissionStatementInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.ClientToken != nil {
|
||||
ok := object.Key("clientToken")
|
||||
ok.String(*v.ClientToken)
|
||||
}
|
||||
|
||||
if v.ConsoleSourceVpce != nil {
|
||||
ok := object.Key("consoleSourceVpce")
|
||||
ok.String(*v.ConsoleSourceVpce)
|
||||
}
|
||||
|
||||
if v.ExcludedPrincipal != nil {
|
||||
ok := object.Key("excludedPrincipal")
|
||||
ok.String(*v.ExcludedPrincipal)
|
||||
}
|
||||
|
||||
if v.RequestedRegion != nil {
|
||||
ok := object.Key("requestedRegion")
|
||||
ok.String(*v.RequestedRegion)
|
||||
}
|
||||
|
||||
if v.SigninSourceVpce != nil {
|
||||
ok := object.Key("signinSourceVpce")
|
||||
ok.String(*v.SigninSourceVpce)
|
||||
}
|
||||
|
||||
if v.SourceIp != nil {
|
||||
ok := object.Key("sourceIp")
|
||||
ok.String(*v.SourceIp)
|
||||
}
|
||||
|
||||
if v.SourceVpc != nil {
|
||||
ok := object.Key("sourceVpc")
|
||||
ok.String(*v.SourceVpc)
|
||||
}
|
||||
|
||||
if v.VpcSourceIp != nil {
|
||||
ok := object.Key("vpcSourceIp")
|
||||
ok.String(*v.VpcSourceIp)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpRevokeOAuth2TokenWithIAM struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpRevokeOAuth2TokenWithIAM) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpRevokeOAuth2TokenWithIAM) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
_, span := tracing.StartSpan(ctx, "OperationSerializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*RevokeOAuth2TokenWithIAMInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/v1/revoke?x-amz-client-auth-method=iam")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
var restEncoder *httpbinding.Encoder
|
||||
if request.URL.RawPath == "" {
|
||||
restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
} else {
|
||||
request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
|
||||
restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentRevokeOAuth2TokenWithIAMInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsRevokeOAuth2TokenWithIAMInput(v *RevokeOAuth2TokenWithIAMInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentRevokeOAuth2TokenWithIAMInput(v *RevokeOAuth2TokenWithIAMInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.Token != nil {
|
||||
ok := object.Key("token")
|
||||
ok.String(*v.Token)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeDocumentCreateOAuth2TokenRequestBody(v *types.CreateOAuth2TokenRequestBody, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
+9
@@ -19,6 +19,12 @@ const (
|
||||
// The request is missing a required parameter, includes an invalid parameter
|
||||
// value, or is otherwise malformed
|
||||
OAuth2ErrorCodeInvalidRequest OAuth2ErrorCode = "INVALID_REQUEST"
|
||||
// Requested resource was not found
|
||||
OAuth2ErrorCodeResourceNotFound OAuth2ErrorCode = "RESOURCE_NOT_FOUND"
|
||||
// Request conflicts with current state of the resource
|
||||
OAuth2ErrorCodeConflict OAuth2ErrorCode = "CONFLICT"
|
||||
// Request would cause a service quota to be exceeded
|
||||
OAuth2ErrorCodeServiceQuotaExceeded OAuth2ErrorCode = "SERVICE_QUOTA_EXCEEDED"
|
||||
)
|
||||
|
||||
// Values returns all known values for OAuth2ErrorCode. Note that this can be
|
||||
@@ -33,5 +39,8 @@ func (OAuth2ErrorCode) Values() []OAuth2ErrorCode {
|
||||
"AUTHCODE_EXPIRED",
|
||||
"server_error",
|
||||
"INVALID_REQUEST",
|
||||
"RESOURCE_NOT_FOUND",
|
||||
"CONFLICT",
|
||||
"SERVICE_QUOTA_EXCEEDED",
|
||||
}
|
||||
}
|
||||
|
||||
+96
@@ -44,6 +44,38 @@ func (e *AccessDeniedException) ErrorCode() string {
|
||||
}
|
||||
func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Error thrown when request conflicts with current state
|
||||
//
|
||||
// HTTP Status Code: 409 Conflict
|
||||
//
|
||||
// Used when the request conflicts with the current state of the resource
|
||||
type ConflictException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ OAuth2ErrorCode
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *ConflictException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *ConflictException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *ConflictException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "ConflictException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Error thrown when an internal server error occurs
|
||||
//
|
||||
// HTTP Status Code: 500 Internal Server Error
|
||||
@@ -76,6 +108,70 @@ func (e *InternalServerException) ErrorCode() string {
|
||||
}
|
||||
func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
|
||||
|
||||
// Error thrown when requested resource is not found
|
||||
//
|
||||
// HTTP Status Code: 404 Not Found
|
||||
//
|
||||
// Used when the specified resource does not exist
|
||||
type ResourceNotFoundException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ OAuth2ErrorCode
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *ResourceNotFoundException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *ResourceNotFoundException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *ResourceNotFoundException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "ResourceNotFoundException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Error thrown when service quota is exceeded
|
||||
//
|
||||
// HTTP Status Code: 402 Payment Required (used as quota exceeded indicator)
|
||||
//
|
||||
// Used when the request would cause a service quota to be exceeded
|
||||
type ServiceQuotaExceededException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ OAuth2ErrorCode
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *ServiceQuotaExceededException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *ServiceQuotaExceededException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *ServiceQuotaExceededException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "ServiceQuotaExceededException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Error thrown when rate limit is exceeded
|
||||
//
|
||||
// HTTP Status Code: 429 Too Many Requests
|
||||
|
||||
+48
-3
@@ -8,9 +8,7 @@ import (
|
||||
|
||||
// AWS credentials structure containing temporary access credentials
|
||||
//
|
||||
// The scoped-down, 15 minute duration AWS credentials. Scoping down will be based
|
||||
// on CLI policy (CLI team needs to create it). Similar to cloud shell
|
||||
// implementation.
|
||||
// Scoped, temporary AWS credentials with a 15-minute duration.
|
||||
type AccessToken struct {
|
||||
|
||||
// AWS access key ID for temporary credentials
|
||||
@@ -112,4 +110,51 @@ type CreateOAuth2TokenResponseBody struct {
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Summary of a permission statement
|
||||
type PermissionStatementSummary struct {
|
||||
|
||||
// Unique identifier for the permission statement
|
||||
//
|
||||
// This member is required.
|
||||
Sid *string
|
||||
|
||||
// Condition block for the permission statement
|
||||
Condition map[string]map[string][]string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// Individual policy statement within a resource-based policy
|
||||
type PolicyStatement struct {
|
||||
|
||||
// Actions the statement controls
|
||||
Action []string
|
||||
|
||||
// Condition block for the statement
|
||||
Condition map[string]map[string][]string
|
||||
|
||||
// Effect of the policy statement (Allow/Deny)
|
||||
Effect *string
|
||||
|
||||
// Principal the statement applies to
|
||||
Principal map[string]string
|
||||
|
||||
// Resource the statement applies to
|
||||
Resource *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
// SignIn resource-based policy document
|
||||
type SigninResourceBasedPolicy struct {
|
||||
|
||||
// Policy statements
|
||||
Statement []PolicyStatement
|
||||
|
||||
// Policy version
|
||||
Version *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type noSmithyDocumentSerde = smithydocument.NoSerde
|
||||
|
||||
+159
@@ -30,10 +30,106 @@ func (m *validateOpCreateOAuth2Token) HandleInitialize(ctx context.Context, in m
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpCreateOAuth2TokenWithIAM struct {
|
||||
}
|
||||
|
||||
func (*validateOpCreateOAuth2TokenWithIAM) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpCreateOAuth2TokenWithIAM) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*CreateOAuth2TokenWithIAMInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpCreateOAuth2TokenWithIAMInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpDeleteResourcePermissionStatement struct {
|
||||
}
|
||||
|
||||
func (*validateOpDeleteResourcePermissionStatement) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpDeleteResourcePermissionStatement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*DeleteResourcePermissionStatementInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpDeleteResourcePermissionStatementInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpIntrospectOAuth2TokenWithIAM struct {
|
||||
}
|
||||
|
||||
func (*validateOpIntrospectOAuth2TokenWithIAM) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpIntrospectOAuth2TokenWithIAM) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*IntrospectOAuth2TokenWithIAMInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpIntrospectOAuth2TokenWithIAMInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpRevokeOAuth2TokenWithIAM struct {
|
||||
}
|
||||
|
||||
func (*validateOpRevokeOAuth2TokenWithIAM) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpRevokeOAuth2TokenWithIAM) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*RevokeOAuth2TokenWithIAMInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpRevokeOAuth2TokenWithIAMInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
func addOpCreateOAuth2TokenValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpCreateOAuth2Token{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpCreateOAuth2TokenWithIAMValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpCreateOAuth2TokenWithIAM{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpDeleteResourcePermissionStatementValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpDeleteResourcePermissionStatement{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpIntrospectOAuth2TokenWithIAMValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpIntrospectOAuth2TokenWithIAM{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpRevokeOAuth2TokenWithIAMValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpRevokeOAuth2TokenWithIAM{}, middleware.After)
|
||||
}
|
||||
|
||||
func validateCreateOAuth2TokenRequestBody(v *types.CreateOAuth2TokenRequestBody) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
@@ -70,3 +166,66 @@ func validateOpCreateOAuth2TokenInput(v *CreateOAuth2TokenInput) error {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpCreateOAuth2TokenWithIAMInput(v *CreateOAuth2TokenWithIAMInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "CreateOAuth2TokenWithIAMInput"}
|
||||
if v.GrantType == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("GrantType"))
|
||||
}
|
||||
if v.Resource == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("Resource"))
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpDeleteResourcePermissionStatementInput(v *DeleteResourcePermissionStatementInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePermissionStatementInput"}
|
||||
if v.StatementId == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("StatementId"))
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpIntrospectOAuth2TokenWithIAMInput(v *IntrospectOAuth2TokenWithIAMInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "IntrospectOAuth2TokenWithIAMInput"}
|
||||
if v.Token == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("Token"))
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpRevokeOAuth2TokenWithIAMInput(v *RevokeOAuth2TokenWithIAMInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "RevokeOAuth2TokenWithIAMInput"}
|
||||
if v.Token == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("Token"))
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
# v1.33.0 (2026-07-21)
|
||||
|
||||
* **Feature**: Add an option to clients to disable clock skew
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.32.1 (2026-07-13)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.32.0 (2026-07-06)
|
||||
|
||||
* **Feature**: Add request serialization snapshot tests.
|
||||
|
||||
# v1.31.5 (2026-07-01)
|
||||
|
||||
* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.31.4 (2026-06-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.31.3 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+72
-13
@@ -259,6 +259,10 @@ func (c *Client) invokeOperation(
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
if err := c.addCommonMiddlewares(stack, options, opID); err != nil {
|
||||
return nil, metadata, err
|
||||
}
|
||||
|
||||
for _, fn := range stackFns {
|
||||
if err := fn(stack, options); err != nil {
|
||||
return nil, metadata, err
|
||||
@@ -363,6 +367,49 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, operation string) error {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
if err := addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func resolveAuthSchemeResolver(options *Options) {
|
||||
if options.AuthSchemeResolver == nil {
|
||||
options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
|
||||
@@ -436,16 +483,17 @@ func setResolvedDefaultsMode(o *Options) {
|
||||
// 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,
|
||||
AuthSchemePreference: cfg.AuthSchemePreference,
|
||||
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,
|
||||
DisableClockSkewCorrection: cfg.DisableClockSkewCorrection,
|
||||
AuthSchemePreference: cfg.AuthSchemePreference,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
@@ -635,15 +683,17 @@ func addClientRequestID(stack *middleware.Stack) error {
|
||||
}
|
||||
|
||||
func addComputeContentLength(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
|
||||
return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After)
|
||||
}
|
||||
|
||||
func addRawResponseToMetadata(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
|
||||
}
|
||||
|
||||
func addRecordResponseTiming(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
|
||||
func addRecordResponseTiming(stack *middleware.Stack, options Options) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{
|
||||
DisableClockSkewCorrection: options.DisableClockSkewCorrection,
|
||||
}, middleware.After)
|
||||
}
|
||||
|
||||
func addSpanRetryLoop(stack *middleware.Stack, options Options) error {
|
||||
@@ -714,6 +764,7 @@ func addRetry(stack *middleware.Stack, o Options, c *Client) error {
|
||||
m.LogAttempts = o.ClientLogMode.IsRetries()
|
||||
m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sso")
|
||||
m.ClientSkew = c.timeOffset
|
||||
m.DisableClockSkewCorrection = o.DisableClockSkewCorrection
|
||||
})
|
||||
if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
|
||||
return err
|
||||
@@ -816,6 +867,14 @@ func resolveMeterProvider(options *Options) {
|
||||
}
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: operation,
|
||||
}
|
||||
}
|
||||
|
||||
func addRecursionDetection(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sso
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sso/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -63,9 +61,6 @@ type GetRoleCredentialsOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRoleCredentials{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -74,38 +69,17 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetRoleCredentials"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -114,22 +88,13 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetRoleCredentialsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRoleCredentials(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetRoleCredentials"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -144,22 +109,8 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetRoleCredentials(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetRoleCredentials",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-50
@@ -5,7 +5,6 @@ package sso
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sso/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -68,9 +67,6 @@ type ListAccountRolesOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccountRoles{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -79,38 +75,17 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccountRoles"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -119,22 +94,13 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListAccountRolesValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountRoles(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListAccountRoles"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -149,12 +115,6 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -253,11 +213,3 @@ type ListAccountRolesAPIClient interface {
|
||||
}
|
||||
|
||||
var _ ListAccountRolesAPIClient = (*Client)(nil)
|
||||
|
||||
func newServiceMetadataMiddleware_opListAccountRoles(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "ListAccountRoles",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-50
@@ -5,7 +5,6 @@ package sso
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sso/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -67,9 +66,6 @@ type ListAccountsOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccounts{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -78,38 +74,17 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccounts"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -118,22 +93,13 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpListAccountsValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListAccounts"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -148,12 +114,6 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -251,11 +211,3 @@ type ListAccountsAPIClient interface {
|
||||
}
|
||||
|
||||
var _ ListAccountsAPIClient = (*Client)(nil)
|
||||
|
||||
func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "ListAccounts",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sso
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
@@ -62,9 +60,6 @@ type LogoutOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpLogout{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -73,38 +68,17 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "Logout"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -113,22 +87,13 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpLogoutValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLogout(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "Logout"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -143,22 +108,8 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opLogout(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "Logout",
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -22,6 +22,8 @@
|
||||
"internal/endpoints/endpoints.go",
|
||||
"internal/endpoints/endpoints_test.go",
|
||||
"options.go",
|
||||
"request_snapshot_test.go",
|
||||
"response_snapshot_test.go",
|
||||
"serializers.go",
|
||||
"snapshot_test.go",
|
||||
"sra_operation_order_test.go",
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package sso
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.31.3"
|
||||
const goModuleVersion = "1.33.0"
|
||||
|
||||
+5
@@ -44,6 +44,11 @@ type Options struct {
|
||||
// clients initial default settings.
|
||||
DefaultsMode aws.DefaultsMode
|
||||
|
||||
// Disables SDK clock skew correction. When set, the SDK will not adjust request
|
||||
// signing timestamps to compensate for clock drift between the client and the
|
||||
// service.
|
||||
DisableClockSkewCorrection bool
|
||||
|
||||
// The endpoint options to be used when attempting to resolve an endpoint.
|
||||
EndpointOptions EndpointResolverOptions
|
||||
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
# v1.38.0 (2026-07-21)
|
||||
|
||||
* **Feature**: Add an option to clients to disable clock skew
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.37.1 (2026-07-13)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.37.0 (2026-07-06)
|
||||
|
||||
* **Feature**: Add request serialization snapshot tests.
|
||||
|
||||
# v1.36.8 (2026-07-01)
|
||||
|
||||
* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.36.7 (2026-06-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.36.6 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+72
-13
@@ -259,6 +259,10 @@ func (c *Client) invokeOperation(
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
if err := c.addCommonMiddlewares(stack, options, opID); err != nil {
|
||||
return nil, metadata, err
|
||||
}
|
||||
|
||||
for _, fn := range stackFns {
|
||||
if err := fn(stack, options); err != nil {
|
||||
return nil, metadata, err
|
||||
@@ -363,6 +367,49 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, operation string) error {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
if err := addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func resolveAuthSchemeResolver(options *Options) {
|
||||
if options.AuthSchemeResolver == nil {
|
||||
options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
|
||||
@@ -436,16 +483,17 @@ func setResolvedDefaultsMode(o *Options) {
|
||||
// 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,
|
||||
AuthSchemePreference: cfg.AuthSchemePreference,
|
||||
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,
|
||||
DisableClockSkewCorrection: cfg.DisableClockSkewCorrection,
|
||||
AuthSchemePreference: cfg.AuthSchemePreference,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
@@ -635,15 +683,17 @@ func addClientRequestID(stack *middleware.Stack) error {
|
||||
}
|
||||
|
||||
func addComputeContentLength(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
|
||||
return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After)
|
||||
}
|
||||
|
||||
func addRawResponseToMetadata(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
|
||||
}
|
||||
|
||||
func addRecordResponseTiming(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
|
||||
func addRecordResponseTiming(stack *middleware.Stack, options Options) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{
|
||||
DisableClockSkewCorrection: options.DisableClockSkewCorrection,
|
||||
}, middleware.After)
|
||||
}
|
||||
|
||||
func addSpanRetryLoop(stack *middleware.Stack, options Options) error {
|
||||
@@ -714,6 +764,7 @@ func addRetry(stack *middleware.Stack, o Options, c *Client) error {
|
||||
m.LogAttempts = o.ClientLogMode.IsRetries()
|
||||
m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc")
|
||||
m.ClientSkew = c.timeOffset
|
||||
m.DisableClockSkewCorrection = o.DisableClockSkewCorrection
|
||||
})
|
||||
if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
|
||||
return err
|
||||
@@ -816,6 +867,14 @@ func resolveMeterProvider(options *Options) {
|
||||
}
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: operation,
|
||||
}
|
||||
}
|
||||
|
||||
func addRecursionDetection(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
@@ -133,9 +131,6 @@ type CreateTokenOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateToken{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -144,38 +139,17 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateToken"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -184,22 +158,13 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateTokenValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateToken(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateToken"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -214,22 +179,8 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateToken(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateToken",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssooidc/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -177,9 +175,6 @@ type CreateTokenWithIAMOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTokenWithIAM{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -188,19 +183,10 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTokenWithIAM"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -210,19 +196,7 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -231,22 +205,13 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateTokenWithIAMValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTokenWithIAM(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateTokenWithIAM"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -261,22 +226,8 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateTokenWithIAM(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateTokenWithIAM",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
@@ -104,9 +102,6 @@ type RegisterClientOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterClient{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -115,38 +110,17 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterClient"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -155,22 +129,13 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack,
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpRegisterClientValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterClient(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RegisterClient"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -185,22 +150,8 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack,
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opRegisterClient(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "RegisterClient",
|
||||
}
|
||||
}
|
||||
|
||||
Generated
Vendored
+2
-51
@@ -4,8 +4,6 @@ package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
@@ -86,9 +84,6 @@ type StartDeviceAuthorizationOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDeviceAuthorization{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -97,38 +92,17 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "StartDeviceAuthorization"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -137,22 +111,13 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDeviceAuthorization(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "StartDeviceAuthorization"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -167,22 +132,8 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opStartDeviceAuthorization(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "StartDeviceAuthorization",
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -22,6 +22,8 @@
|
||||
"internal/endpoints/endpoints.go",
|
||||
"internal/endpoints/endpoints_test.go",
|
||||
"options.go",
|
||||
"request_snapshot_test.go",
|
||||
"response_snapshot_test.go",
|
||||
"serializers.go",
|
||||
"snapshot_test.go",
|
||||
"sra_operation_order_test.go",
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package ssooidc
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.36.6"
|
||||
const goModuleVersion = "1.38.0"
|
||||
|
||||
+5
@@ -44,6 +44,11 @@ type Options struct {
|
||||
// clients initial default settings.
|
||||
DefaultsMode aws.DefaultsMode
|
||||
|
||||
// Disables SDK clock skew correction. When set, the SDK will not adjust request
|
||||
// signing timestamps to compensate for clock drift between the client and the
|
||||
// service.
|
||||
DisableClockSkewCorrection bool
|
||||
|
||||
// The endpoint options to be used when attempting to resolve an endpoint.
|
||||
EndpointOptions EndpointResolverOptions
|
||||
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
# v1.45.0 (2026-07-21)
|
||||
|
||||
* **Feature**: Add an option to clients to disable clock skew
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.44.1 (2026-07-13)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.44.0 (2026-07-06)
|
||||
|
||||
* **Feature**: Add request serialization snapshot tests.
|
||||
|
||||
# v1.43.5 (2026-07-01)
|
||||
|
||||
* **Bug Fix**: Bump smithy-go to 1.27.3, fix JSON encorder for document.Number, endpoint host label format validation and CBOR union serialization on new serde
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.43.4 (2026-06-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.43.3 (2026-06-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
+72
-13
@@ -268,6 +268,10 @@ func (c *Client) invokeOperation(
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
if err := c.addCommonMiddlewares(stack, options, opID); err != nil {
|
||||
return nil, metadata, err
|
||||
}
|
||||
|
||||
for _, fn := range stackFns {
|
||||
if err := fn(stack, options); err != nil {
|
||||
return nil, metadata, err
|
||||
@@ -372,6 +376,49 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, operation string) error {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
|
||||
return fmt.Errorf("add protocol finalizers: %v", err)
|
||||
}
|
||||
if err := addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addClientUserAgent(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addRecursionDetection(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func resolveAuthSchemeResolver(options *Options) {
|
||||
if options.AuthSchemeResolver == nil {
|
||||
options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
|
||||
@@ -450,16 +497,17 @@ func setResolvedDefaultsMode(o *Options) {
|
||||
// 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,
|
||||
AuthSchemePreference: cfg.AuthSchemePreference,
|
||||
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,
|
||||
DisableClockSkewCorrection: cfg.DisableClockSkewCorrection,
|
||||
AuthSchemePreference: cfg.AuthSchemePreference,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
@@ -649,15 +697,17 @@ func addClientRequestID(stack *middleware.Stack) error {
|
||||
}
|
||||
|
||||
func addComputeContentLength(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
|
||||
return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After)
|
||||
}
|
||||
|
||||
func addRawResponseToMetadata(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
|
||||
}
|
||||
|
||||
func addRecordResponseTiming(stack *middleware.Stack) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
|
||||
func addRecordResponseTiming(stack *middleware.Stack, options Options) error {
|
||||
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{
|
||||
DisableClockSkewCorrection: options.DisableClockSkewCorrection,
|
||||
}, middleware.After)
|
||||
}
|
||||
|
||||
func addSpanRetryLoop(stack *middleware.Stack, options Options) error {
|
||||
@@ -728,6 +778,7 @@ func addRetry(stack *middleware.Stack, o Options, c *Client) error {
|
||||
m.LogAttempts = o.ClientLogMode.IsRetries()
|
||||
m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sts")
|
||||
m.ClientSkew = c.timeOffset
|
||||
m.DisableClockSkewCorrection = o.DisableClockSkewCorrection
|
||||
})
|
||||
if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
|
||||
return err
|
||||
@@ -854,6 +905,14 @@ func resolveMeterProvider(options *Options) {
|
||||
}
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: operation,
|
||||
}
|
||||
}
|
||||
|
||||
func addRecursionDetection(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
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/sts/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
@@ -415,9 +413,6 @@ type AssumeRoleOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRole{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -426,19 +421,10 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRole"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -448,19 +434,7 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -469,22 +443,13 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAssumeRoleValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRole(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRole"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -499,26 +464,12 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opAssumeRole(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "AssumeRole",
|
||||
}
|
||||
}
|
||||
|
||||
// PresignAssumeRole is used to generate a presigned HTTP Request which contains
|
||||
// presigned URL, signed headers and HTTP method used.
|
||||
func (c *PresignClient) PresignAssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sts/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -353,9 +351,6 @@ type AssumeRoleWithSAMLOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithSAML{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -364,38 +359,17 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoleWithSAML"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -404,22 +378,13 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithSAML(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoleWithSAML"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -434,22 +399,8 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opAssumeRoleWithSAML(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "AssumeRoleWithSAML",
|
||||
}
|
||||
}
|
||||
|
||||
Generated
Vendored
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sts/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -370,9 +368,6 @@ type AssumeRoleWithWebIdentityOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithWebIdentity{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -381,38 +376,17 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoleWithWebIdentity"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -421,22 +395,13 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoleWithWebIdentity"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -451,22 +416,8 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "AssumeRoleWithWebIdentity",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sts/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -124,9 +122,6 @@ type AssumeRootOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoot{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -135,19 +130,10 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoot"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -157,19 +143,7 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -178,22 +152,13 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpAssumeRootValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoot(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoot"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -208,22 +173,8 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opAssumeRoot(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "AssumeRoot",
|
||||
}
|
||||
}
|
||||
|
||||
Generated
Vendored
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
@@ -84,9 +82,6 @@ type DecodeAuthorizationMessageOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpDecodeAuthorizationMessage{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -95,19 +90,10 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "DecodeAuthorizationMessage"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -117,19 +103,7 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -138,22 +112,13 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDecodeAuthorizationMessage(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DecodeAuthorizationMessage"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -168,22 +133,8 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opDecodeAuthorizationMessage(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "DecodeAuthorizationMessage",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
@@ -75,9 +73,6 @@ type GetAccessKeyInfoOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccessKeyInfo{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -86,19 +81,10 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccessKeyInfo"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -108,19 +94,7 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -129,22 +103,13 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyInfo(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetAccessKeyInfo"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -159,22 +124,8 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetAccessKeyInfo(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetAccessKeyInfo",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
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"
|
||||
@@ -66,9 +64,6 @@ type GetCallerIdentityOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetCallerIdentity{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -77,19 +72,10 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetCallerIdentity"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -99,19 +85,7 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -120,19 +94,10 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetCallerIdentity"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -147,26 +112,12 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetCallerIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetCallerIdentity",
|
||||
}
|
||||
}
|
||||
|
||||
// PresignGetCallerIdentity is used to generate a presigned HTTP Request which
|
||||
// contains presigned URL, signed headers and HTTP method used.
|
||||
func (c *PresignClient) PresignGetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
|
||||
|
||||
Generated
Vendored
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sts/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -64,9 +62,6 @@ type GetDelegatedAccessTokenOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetDelegatedAccessToken{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -75,19 +70,10 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetDelegatedAccessToken"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -97,19 +83,7 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -118,22 +92,13 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetDelegatedAccessTokenValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDelegatedAccessToken(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetDelegatedAccessToken"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -148,22 +113,8 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetDelegatedAccessToken(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetDelegatedAccessToken",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sts/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -288,9 +286,6 @@ type GetFederationTokenOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetFederationToken{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -299,19 +294,10 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetFederationToken"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -321,19 +307,7 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -342,22 +316,13 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFederationToken(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetFederationToken"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -372,22 +337,8 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetFederationToken(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetFederationToken",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sts/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -137,9 +135,6 @@ type GetSessionTokenOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSessionToken{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -148,19 +143,10 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetSessionToken"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -170,19 +156,7 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -191,19 +165,10 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetSessionToken"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -218,22 +183,8 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetSessionToken(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetSessionToken",
|
||||
}
|
||||
}
|
||||
|
||||
+2
-51
@@ -4,8 +4,6 @@ package sts
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sts/types"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
@@ -87,9 +85,6 @@ type GetWebIdentityTokenOutput struct {
|
||||
}
|
||||
|
||||
func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetWebIdentityToken{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -98,19 +93,10 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addProtocolFinalizerMiddlewares(stack, options, "GetWebIdentityToken"); 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 = addClientRequestID(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputeContentLength(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -120,19 +106,7 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack, options); err != nil {
|
||||
if err = addRecordResponseTiming(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
@@ -141,22 +115,13 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addUserAgentRetryMode(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addCredentialSource(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpGetWebIdentityTokenValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWebIdentityToken(options.Region), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRecursionDetection(stack); err != nil {
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetWebIdentityToken"), middleware.Before); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
|
||||
@@ -171,22 +136,8 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opGetWebIdentityToken(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "GetWebIdentityToken",
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -32,6 +32,8 @@
|
||||
"internal/endpoints/endpoints.go",
|
||||
"internal/endpoints/endpoints_test.go",
|
||||
"options.go",
|
||||
"request_snapshot_test.go",
|
||||
"response_snapshot_test.go",
|
||||
"serializers.go",
|
||||
"snapshot_test.go",
|
||||
"sra_operation_order_test.go",
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
package sts
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.43.3"
|
||||
const goModuleVersion = "1.45.0"
|
||||
|
||||
+5
@@ -46,6 +46,11 @@ type Options struct {
|
||||
// clients initial default settings.
|
||||
DefaultsMode aws.DefaultsMode
|
||||
|
||||
// Disables SDK clock skew correction. When set, the SDK will not adjust request
|
||||
// signing timestamps to compensate for clock drift between the client and the
|
||||
// service.
|
||||
DisableClockSkewCorrection bool
|
||||
|
||||
// The endpoint options to be used when attempting to resolve an endpoint.
|
||||
EndpointOptions EndpointResolverOptions
|
||||
|
||||
|
||||
+20
@@ -1,3 +1,23 @@
|
||||
# Release (2026-07-16)
|
||||
|
||||
## General Highlights
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
## Module Highlights
|
||||
* `github.com/aws/smithy-go/aws-http-auth`: [v1.2.1](aws-http-auth/CHANGELOG.md#v121-2026-07-16)
|
||||
* **Bug Fix**: Use r.URL.Host when r.Host is unset.
|
||||
* `github.com/aws/smithy-go/aws-http-auth-schemes`: [v1.0.0](aws-http-auth-schemes/CHANGELOG.md#v100-2026-07-16)
|
||||
* **Release**: Module `github.com/aws/smithy-go/aws-http-auth-schemes` adds generic smithy-go client support for AWS Sigv4 and Sigv4a.
|
||||
|
||||
# Release (2026-06-26)
|
||||
|
||||
## General Highlights
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
## Module Highlights
|
||||
* `github.com/aws/smithy-go`: v1.27.3
|
||||
* **Bug Fix**: Fix bug in JSON doc encoder and endpoint host label format validation
|
||||
|
||||
# Release (2026-06-05)
|
||||
|
||||
## General Highlights
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user