Update
This commit is contained in:
158
vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
generated
vendored
158
vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
generated
vendored
@@ -1,3 +1,161 @@
|
||||
# v1.41.5 (2025-12-09)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.41.4 (2025-12-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.41.3 (2025-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change.
|
||||
|
||||
# v1.41.2 (2025-11-25)
|
||||
|
||||
* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234
|
||||
|
||||
# v1.41.1 (2025-11-19.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.41.0 (2025-11-19)
|
||||
|
||||
* **Feature**: IAM now supports outbound identity federation via the STS GetWebIdentityToken API, enabling AWS workloads to securely authenticate with external services using short-lived JSON Web Tokens.
|
||||
|
||||
# v1.40.2 (2025-11-12)
|
||||
|
||||
* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use.
|
||||
* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured.
|
||||
* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations.
|
||||
|
||||
# v1.40.1 (2025-11-11)
|
||||
|
||||
* **Bug Fix**: Return validation error if input region is not a valid host label.
|
||||
|
||||
# v1.40.0 (2025-11-10)
|
||||
|
||||
* **Feature**: Added GetDelegatedAccessToken API, which is not available for general use at this time.
|
||||
|
||||
# v1.39.1 (2025-11-04)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system.
|
||||
|
||||
# v1.39.0 (2025-10-30)
|
||||
|
||||
* **Feature**: Update endpoint ruleset parameters casing
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.9 (2025-10-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.8 (2025-10-22)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.38.7 (2025-10-16)
|
||||
|
||||
* **Dependency Update**: Bump minimum Go version to 1.23.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.6 (2025-09-26)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.5 (2025-09-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.4 (2025-09-10)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.38.3 (2025-09-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.2 (2025-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.1 (2025-08-27)
|
||||
|
||||
* **Dependency Update**: Update to smithy-go v1.23.0.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.38.0 (2025-08-21)
|
||||
|
||||
* **Feature**: Remove incorrect endpoint tests
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.37.1 (2025-08-20)
|
||||
|
||||
* **Bug Fix**: Remove unused deserialization code.
|
||||
|
||||
# v1.37.0 (2025-08-11)
|
||||
|
||||
* **Feature**: Add support for configuring per-service Options via callback on global config.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.36.0 (2025-08-04)
|
||||
|
||||
* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.35.1 (2025-07-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.35.0 (2025-07-28)
|
||||
|
||||
* **Feature**: Add support for HTTP interceptors.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.34.1 (2025-07-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.34.0 (2025-06-17)
|
||||
|
||||
* **Feature**: The AWS Security Token Service APIs AssumeRoleWithSAML and AssumeRoleWithWebIdentity can now be invoked without pre-configured AWS credentials in the SDK configuration.
|
||||
* **Dependency Update**: Update to smithy-go v1.22.4.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.33.21 (2025-06-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.33.20 (2025-06-06)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.33.19 (2025-04-10)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.33.18 (2025-04-03)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.33.17 (2025-03-04.2)
|
||||
|
||||
* **Bug Fix**: Add assurance test for operation order.
|
||||
|
||||
# v1.33.16 (2025-02-27)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.33.15 (2025-02-18)
|
||||
|
||||
* **Bug Fix**: Bump go version to 1.22
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.33.14 (2025-02-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.33.13 (2025-02-04)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
221
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
generated
vendored
221
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
generated
vendored
@@ -68,7 +68,12 @@ func timeOperationMetric[T any](
|
||||
ctx context.Context, metric string, fn func() (T, error),
|
||||
opts ...metrics.RecordMetricOption,
|
||||
) (T, error) {
|
||||
instr := getOperationMetrics(ctx).histogramFor(metric)
|
||||
mm := getOperationMetrics(ctx)
|
||||
if mm == nil { // not using the metrics system
|
||||
return fn()
|
||||
}
|
||||
|
||||
instr := mm.histogramFor(metric)
|
||||
opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
|
||||
|
||||
start := time.Now()
|
||||
@@ -81,7 +86,12 @@ func timeOperationMetric[T any](
|
||||
}
|
||||
|
||||
func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() {
|
||||
instr := getOperationMetrics(ctx).histogramFor(metric)
|
||||
mm := getOperationMetrics(ctx)
|
||||
if mm == nil { // not using the metrics system
|
||||
return func() {}
|
||||
}
|
||||
|
||||
instr := mm.histogramFor(metric)
|
||||
opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
|
||||
|
||||
var ended bool
|
||||
@@ -109,6 +119,12 @@ func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption {
|
||||
type operationMetricsKey struct{}
|
||||
|
||||
func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) {
|
||||
if _, ok := mp.(metrics.NopMeterProvider); ok {
|
||||
// not using the metrics system - setting up the metrics context is a memory-intensive operation
|
||||
// so we should skip it in this case
|
||||
return parent, nil
|
||||
}
|
||||
|
||||
meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sts")
|
||||
om := &operationMetrics{}
|
||||
|
||||
@@ -156,7 +172,10 @@ func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Hi
|
||||
}
|
||||
|
||||
func getOperationMetrics(ctx context.Context) *operationMetrics {
|
||||
return ctx.Value(operationMetricsKey{}).(*operationMetrics)
|
||||
if v := ctx.Value(operationMetricsKey{}); v != nil {
|
||||
return v.(*operationMetrics)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func operationTracer(p tracing.TracerProvider) tracing.Tracer {
|
||||
@@ -423,24 +442,33 @@ 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,
|
||||
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,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
resolveAWSRetryMode(cfg, &opts)
|
||||
resolveAWSEndpointResolver(cfg, &opts)
|
||||
resolveInterceptors(cfg, &opts)
|
||||
resolveUseDualStackEndpoint(cfg, &opts)
|
||||
resolveUseFIPSEndpoint(cfg, &opts)
|
||||
resolveBaseEndpoint(cfg, &opts)
|
||||
return New(opts, optFns...)
|
||||
return New(opts, func(o *Options) {
|
||||
for _, opt := range cfg.ServiceOptions {
|
||||
opt(ServiceID, o)
|
||||
}
|
||||
for _, opt := range optFns {
|
||||
opt(o)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func resolveHTTPClient(o *Options) {
|
||||
@@ -554,6 +582,10 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
|
||||
o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
|
||||
}
|
||||
|
||||
func resolveInterceptors(cfg aws.Config, o *Options) {
|
||||
o.Interceptors = cfg.Interceptors.Copy()
|
||||
}
|
||||
|
||||
func addClientUserAgent(stack *middleware.Stack, options Options) error {
|
||||
ua, err := getOrAddRequestUserAgent(stack)
|
||||
if err != nil {
|
||||
@@ -765,6 +797,37 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type setCredentialSourceMiddleware struct {
|
||||
ua *awsmiddleware.RequestUserAgent
|
||||
options Options
|
||||
}
|
||||
|
||||
func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" }
|
||||
|
||||
func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
|
||||
out middleware.BuildOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource)
|
||||
if !ok {
|
||||
return next.HandleBuild(ctx, in)
|
||||
}
|
||||
providerSources := asProviderSource.ProviderSources()
|
||||
for _, source := range providerSources {
|
||||
m.ua.AddCredentialsSource(source)
|
||||
}
|
||||
return next.HandleBuild(ctx, in)
|
||||
}
|
||||
|
||||
func addCredentialSource(stack *middleware.Stack, options Options) error {
|
||||
ua, err := getOrAddRequestUserAgent(stack)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mw := setCredentialSourceMiddleware{ua: ua, options: options}
|
||||
return stack.Build.Insert(&mw, "UserAgent", middleware.Before)
|
||||
}
|
||||
|
||||
func resolveTracerProvider(options *Options) {
|
||||
if options.TracerProvider == nil {
|
||||
options.TracerProvider = &tracing.NopTracerProvider{}
|
||||
@@ -977,88 +1040,62 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
|
||||
}, "ResolveEndpointV2", middleware.After)
|
||||
}
|
||||
|
||||
type spanInitializeStart struct {
|
||||
func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error {
|
||||
return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{
|
||||
Interceptors: opts.Interceptors.BeforeRetryLoop,
|
||||
}, "Retry", middleware.Before)
|
||||
}
|
||||
|
||||
func (*spanInitializeStart) ID() string {
|
||||
return "spanInitializeStart"
|
||||
func addInterceptAttempt(stack *middleware.Stack, opts Options) error {
|
||||
return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{
|
||||
BeforeAttempt: opts.Interceptors.BeforeAttempt,
|
||||
AfterAttempt: opts.Interceptors.AfterAttempt,
|
||||
}, "Retry", middleware.After)
|
||||
}
|
||||
|
||||
func (m *spanInitializeStart) HandleInitialize(
|
||||
ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
|
||||
) (
|
||||
middleware.InitializeOutput, middleware.Metadata, error,
|
||||
) {
|
||||
ctx, _ = tracing.StartSpan(ctx, "Initialize")
|
||||
func addInterceptors(stack *middleware.Stack, opts Options) error {
|
||||
// middlewares are expensive, don't add all of these interceptor ones unless the caller
|
||||
// actually has at least one interceptor configured
|
||||
//
|
||||
// at the moment it's all-or-nothing because some of the middlewares here are responsible for
|
||||
// setting fields in the interceptor context for future ones
|
||||
if len(opts.Interceptors.BeforeExecution) == 0 &&
|
||||
len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 &&
|
||||
len(opts.Interceptors.BeforeRetryLoop) == 0 &&
|
||||
len(opts.Interceptors.BeforeAttempt) == 0 &&
|
||||
len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 &&
|
||||
len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 &&
|
||||
len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 &&
|
||||
len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type spanInitializeEnd struct {
|
||||
}
|
||||
|
||||
func (*spanInitializeEnd) ID() string {
|
||||
return "spanInitializeEnd"
|
||||
}
|
||||
|
||||
func (m *spanInitializeEnd) HandleInitialize(
|
||||
ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
|
||||
) (
|
||||
middleware.InitializeOutput, middleware.Metadata, error,
|
||||
) {
|
||||
ctx, span := tracing.PopSpan(ctx)
|
||||
span.End()
|
||||
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type spanBuildRequestStart struct {
|
||||
}
|
||||
|
||||
func (*spanBuildRequestStart) ID() string {
|
||||
return "spanBuildRequestStart"
|
||||
}
|
||||
|
||||
func (m *spanBuildRequestStart) HandleSerialize(
|
||||
ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
|
||||
) (
|
||||
middleware.SerializeOutput, middleware.Metadata, error,
|
||||
) {
|
||||
ctx, _ = tracing.StartSpan(ctx, "BuildRequest")
|
||||
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
|
||||
type spanBuildRequestEnd struct {
|
||||
}
|
||||
|
||||
func (*spanBuildRequestEnd) ID() string {
|
||||
return "spanBuildRequestEnd"
|
||||
}
|
||||
|
||||
func (m *spanBuildRequestEnd) HandleBuild(
|
||||
ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
|
||||
) (
|
||||
middleware.BuildOutput, middleware.Metadata, error,
|
||||
) {
|
||||
ctx, span := tracing.PopSpan(ctx)
|
||||
span.End()
|
||||
|
||||
return next.HandleBuild(ctx, in)
|
||||
}
|
||||
|
||||
func addSpanInitializeStart(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before)
|
||||
}
|
||||
|
||||
func addSpanInitializeEnd(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After)
|
||||
}
|
||||
|
||||
func addSpanBuildRequestStart(stack *middleware.Stack) error {
|
||||
return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before)
|
||||
}
|
||||
|
||||
func addSpanBuildRequestEnd(stack *middleware.Stack) error {
|
||||
return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After)
|
||||
return errors.Join(
|
||||
stack.Initialize.Add(&smithyhttp.InterceptExecution{
|
||||
BeforeExecution: opts.Interceptors.BeforeExecution,
|
||||
AfterExecution: opts.Interceptors.AfterExecution,
|
||||
}, middleware.Before),
|
||||
stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{
|
||||
Interceptors: opts.Interceptors.BeforeSerialization,
|
||||
}, "OperationSerializer", middleware.Before),
|
||||
stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{
|
||||
Interceptors: opts.Interceptors.AfterSerialization,
|
||||
}, "OperationSerializer", middleware.After),
|
||||
stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{
|
||||
Interceptors: opts.Interceptors.BeforeSigning,
|
||||
}, "Signing", middleware.Before),
|
||||
stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{
|
||||
Interceptors: opts.Interceptors.AfterSigning,
|
||||
}, "Signing", middleware.After),
|
||||
stack.Deserialize.Add(&smithyhttp.InterceptTransmit{
|
||||
BeforeTransmit: opts.Interceptors.BeforeTransmit,
|
||||
AfterTransmit: opts.Interceptors.AfterTransmit,
|
||||
}, middleware.After),
|
||||
stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{
|
||||
Interceptors: opts.Interceptors.BeforeDeserialization,
|
||||
}, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse)
|
||||
stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{
|
||||
Interceptors: opts.Interceptors.AfterDeserialization,
|
||||
}, "OperationDeserializer", middleware.Before),
|
||||
)
|
||||
}
|
||||
|
||||
18
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
generated
vendored
18
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
generated
vendored
@@ -147,7 +147,7 @@ type AssumeRoleInput struct {
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
// include underscores or any of the following characters: +=,.@-
|
||||
//
|
||||
// [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
||||
// [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
||||
@@ -196,7 +196,7 @@ type AssumeRoleInput struct {
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@:/-
|
||||
// include underscores or any of the following characters: +=,.@:\/-
|
||||
//
|
||||
// [How to Use an External ID When Granting Access to Your Amazon Web Services Resources to a Third Party]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
|
||||
ExternalId *string
|
||||
@@ -279,7 +279,7 @@ type AssumeRoleInput struct {
|
||||
//
|
||||
// The regex used to validate this parameter is a string of characters consisting
|
||||
// of upper- and lower-case alphanumeric characters with no spaces. You can also
|
||||
// include underscores or any of the following characters: =,.@-
|
||||
// include underscores or any of the following characters: +=/:,.@-
|
||||
SerialNumber *string
|
||||
|
||||
// The source identity specified by the principal that is calling the AssumeRole
|
||||
@@ -478,6 +478,9 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
|
||||
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
|
||||
}
|
||||
@@ -499,16 +502,13 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
15
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
generated
vendored
15
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
generated
vendored
@@ -23,6 +23,9 @@ import (
|
||||
// these temporary security credentials to sign calls to Amazon Web Services
|
||||
// services.
|
||||
//
|
||||
// AssumeRoleWithSAML will not work on IAM Identity Center managed roles. These
|
||||
// roles' names start with AWSReservedSSO_ .
|
||||
//
|
||||
// # Session Duration
|
||||
//
|
||||
// By default, the temporary security credentials created by AssumeRoleWithSAML
|
||||
@@ -410,6 +413,9 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
|
||||
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
|
||||
}
|
||||
@@ -431,16 +437,13 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
16
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
generated
vendored
16
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
generated
vendored
@@ -75,7 +75,7 @@ import (
|
||||
//
|
||||
// (Optional) You can configure your IdP to pass attributes into your web identity
|
||||
// token as session tags. Each session tag consists of a key name and an associated
|
||||
// value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User Guide.
|
||||
// value. For more information about session tags, see [Passing session tags using AssumeRoleWithWebIdentity]in the IAM User Guide.
|
||||
//
|
||||
// You can pass up to 50 session tags. The plaintext session tag keys can’t exceed
|
||||
// 128 characters and the values can’t exceed 256 characters. For these and
|
||||
@@ -123,6 +123,7 @@ import (
|
||||
// providers to get and use temporary security credentials.
|
||||
//
|
||||
// [Amazon Web Services SDK for iOS Developer Guide]: http://aws.amazon.com/sdkforios/
|
||||
// [Passing session tags using AssumeRoleWithWebIdentity]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_adding-assume-role-idp
|
||||
// [Amazon Web Services SDK for Android Developer Guide]: http://aws.amazon.com/sdkforandroid/
|
||||
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
||||
// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
@@ -135,7 +136,6 @@ import (
|
||||
// [Using IAM Roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
||||
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
||||
// [Amazon Cognito federated identities]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
||||
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
||||
// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
||||
// [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
||||
// [Using Web Identity Federation API Operations for Mobile Apps]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
||||
@@ -430,6 +430,9 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
|
||||
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
|
||||
}
|
||||
@@ -451,16 +454,13 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
30
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go
generated
vendored
30
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go
generated
vendored
@@ -12,7 +12,9 @@ import (
|
||||
)
|
||||
|
||||
// Returns a set of short term credentials you can use to perform privileged tasks
|
||||
// on a member account in your organization.
|
||||
// on a member account in your organization. You must use credentials from an
|
||||
// Organizations management account or a delegated administrator account for IAM to
|
||||
// call AssumeRoot . You cannot use root user credentials to make this call.
|
||||
//
|
||||
// Before you can launch a privileged session, you must have centralized root
|
||||
// access in your organization. For steps to enable this feature, see [Centralize root access for member accounts]in the IAM
|
||||
@@ -24,8 +26,16 @@ import (
|
||||
// You can track AssumeRoot in CloudTrail logs to determine what actions were
|
||||
// performed in a session. For more information, see [Track privileged tasks in CloudTrail]in the IAM User Guide.
|
||||
//
|
||||
// When granting access to privileged tasks you should only grant the necessary
|
||||
// permissions required to perform that task. For more information, see [Security best practices in IAM]. In
|
||||
// addition, you can use [service control policies](SCPs) to manage and limit permissions in your
|
||||
// organization. See [General examples]in the Organizations User Guide for more information on SCPs.
|
||||
//
|
||||
// [Endpoints]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
|
||||
// [Security best practices in IAM]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
|
||||
// [Track privileged tasks in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
|
||||
// [General examples]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_general.html
|
||||
// [service control policies]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html
|
||||
// [Centralize root access for member accounts]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
|
||||
func (c *Client) AssumeRoot(ctx context.Context, params *AssumeRootInput, optFns ...func(*Options)) (*AssumeRootOutput, error) {
|
||||
if params == nil {
|
||||
@@ -50,8 +60,10 @@ type AssumeRootInput struct {
|
||||
TargetPrincipal *string
|
||||
|
||||
// The identity based policy that scopes the session to the privileged tasks that
|
||||
// can be performed. You can use one of following Amazon Web Services managed
|
||||
// policies to scope root session actions.
|
||||
// can be performed. You must
|
||||
//
|
||||
// use one of following Amazon Web Services managed policies to scope root session
|
||||
// actions:
|
||||
//
|
||||
// [IAMAuditRootUserCredentials]
|
||||
//
|
||||
@@ -175,6 +187,9 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti
|
||||
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
|
||||
}
|
||||
@@ -196,16 +211,13 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
generated
vendored
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
generated
vendored
@@ -147,6 +147,9 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
|
||||
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
|
||||
}
|
||||
@@ -168,16 +171,13 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
generated
vendored
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
generated
vendored
@@ -138,6 +138,9 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
|
||||
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
|
||||
}
|
||||
@@ -159,16 +162,13 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
generated
vendored
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
generated
vendored
@@ -129,6 +129,9 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
|
||||
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
|
||||
}
|
||||
@@ -147,16 +150,13 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
172
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go
generated
vendored
Normal file
172
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go
generated
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// Exchanges a trade-in token for temporary Amazon Web Services credentials with
|
||||
// the permissions associated with the assumed principal. This operation allows you
|
||||
// to obtain credentials for a specific principal based on a trade-in token,
|
||||
// enabling delegation of access to Amazon Web Services resources.
|
||||
func (c *Client) GetDelegatedAccessToken(ctx context.Context, params *GetDelegatedAccessTokenInput, optFns ...func(*Options)) (*GetDelegatedAccessTokenOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetDelegatedAccessTokenInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetDelegatedAccessToken", params, optFns, c.addOperationGetDelegatedAccessTokenMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetDelegatedAccessTokenOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetDelegatedAccessTokenInput struct {
|
||||
|
||||
// The token to exchange for temporary Amazon Web Services credentials. This token
|
||||
// must be valid and unexpired at the time of the request.
|
||||
//
|
||||
// This member is required.
|
||||
TradeInToken *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetDelegatedAccessTokenOutput struct {
|
||||
|
||||
// The Amazon Resource Name (ARN) of the principal that was assumed when obtaining
|
||||
// the delegated access token. This ARN identifies the IAM entity whose permissions
|
||||
// are granted by the temporary credentials.
|
||||
AssumedPrincipal *string
|
||||
|
||||
// Amazon Web Services credentials for API authentication.
|
||||
Credentials *types.Credentials
|
||||
|
||||
// The percentage of the maximum policy size that is used by the session policy.
|
||||
// The policy size is calculated as the sum of all the session policies and
|
||||
// permission boundaries attached to the session. If the packed size exceeds 100%,
|
||||
// the request fails.
|
||||
PackedPolicySize *int32
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetDelegatedAccessToken{}, middleware.After)
|
||||
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
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options); 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 {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); 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 {
|
||||
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 = 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",
|
||||
}
|
||||
}
|
||||
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
generated
vendored
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
generated
vendored
@@ -351,6 +351,9 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
|
||||
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
|
||||
}
|
||||
@@ -372,16 +375,13 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
generated
vendored
12
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
generated
vendored
@@ -200,6 +200,9 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
|
||||
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
|
||||
}
|
||||
@@ -218,16 +221,13 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
|
||||
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeStart(stack); err != nil {
|
||||
if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanInitializeEnd(stack); err != nil {
|
||||
if err = addInterceptAttempt(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestStart(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSpanBuildRequestEnd(stack); err != nil {
|
||||
if err = addInterceptors(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
195
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go
generated
vendored
Normal file
195
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go
generated
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
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"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Returns a signed JSON Web Token (JWT) that represents the calling Amazon Web
|
||||
// Services identity. The returned JWT can be used to authenticate with external
|
||||
// services that support OIDC discovery. The token is signed by Amazon Web Services
|
||||
// STS and can be publicly verified using the verification keys published at the
|
||||
// issuer's JWKS endpoint.
|
||||
func (c *Client) GetWebIdentityToken(ctx context.Context, params *GetWebIdentityTokenInput, optFns ...func(*Options)) (*GetWebIdentityTokenOutput, error) {
|
||||
if params == nil {
|
||||
params = &GetWebIdentityTokenInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "GetWebIdentityToken", params, optFns, c.addOperationGetWebIdentityTokenMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*GetWebIdentityTokenOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type GetWebIdentityTokenInput struct {
|
||||
|
||||
// The intended recipient of the web identity token. This value populates the aud
|
||||
// claim in the JWT and should identify the service or application that will
|
||||
// validate and use the token. The external service should verify this claim to
|
||||
// ensure the token was intended for their use.
|
||||
//
|
||||
// This member is required.
|
||||
Audience []string
|
||||
|
||||
// The cryptographic algorithm to use for signing the JSON Web Token (JWT). Valid
|
||||
// values are RS256 (RSA with SHA-256) and ES384 (ECDSA using P-384 curve with
|
||||
// SHA-384).
|
||||
//
|
||||
// This member is required.
|
||||
SigningAlgorithm *string
|
||||
|
||||
// The duration, in seconds, for which the JSON Web Token (JWT) will remain valid.
|
||||
// The value can range from 60 seconds (1 minute) to 3600 seconds (1 hour). If not
|
||||
// specified, the default duration is 300 seconds (5 minutes). The token is
|
||||
// designed to be short-lived and should be used for proof of identity, then
|
||||
// exchanged for credentials or short-lived tokens in the external service.
|
||||
DurationSeconds *int32
|
||||
|
||||
// An optional list of tags to include in the JSON Web Token (JWT). These tags are
|
||||
// added as custom claims to the JWT and can be used by the downstream service for
|
||||
// authorization decisions.
|
||||
Tags []types.Tag
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type GetWebIdentityTokenOutput struct {
|
||||
|
||||
// The date and time when the web identity token expires, in UTC. The expiration
|
||||
// is determined by adding the DurationSeconds value to the time the token was
|
||||
// issued. After this time, the token should no longer be considered valid.
|
||||
Expiration *time.Time
|
||||
|
||||
// A signed JSON Web Token (JWT) that represents the caller's Amazon Web Services
|
||||
// identity. The token contains standard JWT claims such as subject, audience,
|
||||
// expiration time, and additional identity attributes added by STS as custom
|
||||
// claims. You can also add your own custom claims to the token by passing tags as
|
||||
// request parameters to the GetWebIdentityToken API. The token is signed using
|
||||
// the specified signing algorithm and can be verified using the verification keys
|
||||
// available at the issuer's JWKS endpoint.
|
||||
WebIdentityToken *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetWebIdentityToken{}, middleware.After)
|
||||
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
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addComputePayloadSHA256(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetry(stack, options); 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 {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addTimeOffsetBuild(stack, c); 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 {
|
||||
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 = 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",
|
||||
}
|
||||
}
|
||||
44
vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go
generated
vendored
44
vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go
generated
vendored
@@ -12,10 +12,13 @@ import (
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/tracing"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"slices"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) {
|
||||
func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error {
|
||||
params.Region = options.Region
|
||||
return nil
|
||||
}
|
||||
|
||||
type setLegacyContextSigningOptionsMiddleware struct {
|
||||
@@ -92,14 +95,16 @@ type AuthResolverParameters struct {
|
||||
Region string
|
||||
}
|
||||
|
||||
func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters {
|
||||
func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) {
|
||||
params := &AuthResolverParameters{
|
||||
Operation: operation,
|
||||
}
|
||||
|
||||
bindAuthParamsRegion(ctx, params, input, options)
|
||||
if err := bindAuthParamsRegion(ctx, params, input, options); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return params
|
||||
return params, nil
|
||||
}
|
||||
|
||||
// AuthSchemeResolver returns a set of possible authentication options for an
|
||||
@@ -162,7 +167,10 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid
|
||||
_, span := tracing.StartSpan(ctx, "ResolveAuthScheme")
|
||||
defer span.End()
|
||||
|
||||
params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options)
|
||||
params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("bind auth scheme params: %w", err)
|
||||
}
|
||||
options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
|
||||
@@ -181,7 +189,8 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid
|
||||
}
|
||||
|
||||
func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
|
||||
for _, option := range options {
|
||||
sorted := sortAuthOptions(options, m.options.AuthSchemePreference)
|
||||
for _, option := range sorted {
|
||||
if option.SchemeID == smithyauth.SchemeIDAnonymous {
|
||||
return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
|
||||
}
|
||||
@@ -200,6 +209,29 @@ func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option)
|
||||
return nil, false
|
||||
}
|
||||
|
||||
func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option {
|
||||
byPriority := make([]*smithyauth.Option, 0, len(options))
|
||||
for _, prefName := range preferred {
|
||||
for _, option := range options {
|
||||
optName := option.SchemeID
|
||||
if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 {
|
||||
optName = parts[1]
|
||||
}
|
||||
if prefName == optName {
|
||||
byPriority = append(byPriority, option)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, option := range options {
|
||||
if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool {
|
||||
return o.SchemeID == option.SchemeID
|
||||
}) {
|
||||
byPriority = append(byPriority, option)
|
||||
}
|
||||
}
|
||||
return byPriority
|
||||
}
|
||||
|
||||
type resolvedAuthSchemeKey struct{}
|
||||
|
||||
type resolvedAuthScheme struct {
|
||||
|
||||
755
vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
generated
vendored
755
vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
generated
vendored
@@ -21,17 +21,8 @@ import (
|
||||
"io"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func deserializeS3Expires(v string) (*time.Time, error) {
|
||||
t, err := smithytime.ParseHTTPDate(v)
|
||||
if err != nil {
|
||||
return nil, nil
|
||||
}
|
||||
return &t, nil
|
||||
}
|
||||
|
||||
type awsAwsquery_deserializeOpAssumeRole struct {
|
||||
}
|
||||
|
||||
@@ -855,6 +846,124 @@ func awsAwsquery_deserializeOpErrorGetCallerIdentity(response *smithyhttp.Respon
|
||||
}
|
||||
}
|
||||
|
||||
type awsAwsquery_deserializeOpGetDelegatedAccessToken struct {
|
||||
}
|
||||
|
||||
func (*awsAwsquery_deserializeOpGetDelegatedAccessToken) ID() string {
|
||||
return "OperationDeserializer"
|
||||
}
|
||||
|
||||
func (m *awsAwsquery_deserializeOpGetDelegatedAccessToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
||||
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
out, metadata, err = next.HandleDeserialize(ctx, in)
|
||||
if err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
_, span := tracing.StartSpan(ctx, "OperationDeserializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
response, ok := out.RawResponse.(*smithyhttp.Response)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
||||
}
|
||||
|
||||
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
||||
return out, metadata, awsAwsquery_deserializeOpErrorGetDelegatedAccessToken(response, &metadata)
|
||||
}
|
||||
output := &GetDelegatedAccessTokenOutput{}
|
||||
out.Result = output
|
||||
|
||||
var buff [1024]byte
|
||||
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
||||
body := io.TeeReader(response.Body, ringBuffer)
|
||||
rootDecoder := xml.NewDecoder(body)
|
||||
t, err := smithyxml.FetchRootElement(rootDecoder)
|
||||
if err == io.EOF {
|
||||
return out, metadata, nil
|
||||
}
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return out, metadata, &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
|
||||
t, err = decoder.GetElement("GetDelegatedAccessTokenResult")
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
err = &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
|
||||
err = awsAwsquery_deserializeOpDocumentGetDelegatedAccessTokenOutput(&output, decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
err = &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeOpErrorGetDelegatedAccessToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
||||
var errorBuffer bytes.Buffer
|
||||
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
||||
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
||||
}
|
||||
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
||||
|
||||
errorCode := "UnknownError"
|
||||
errorMessage := errorCode
|
||||
|
||||
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if reqID := errorComponents.RequestID; len(reqID) != 0 {
|
||||
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
|
||||
}
|
||||
if len(errorComponents.Code) != 0 {
|
||||
errorCode = errorComponents.Code
|
||||
}
|
||||
if len(errorComponents.Message) != 0 {
|
||||
errorMessage = errorComponents.Message
|
||||
}
|
||||
errorBody.Seek(0, io.SeekStart)
|
||||
switch {
|
||||
case strings.EqualFold("ExpiredTradeInTokenException", errorCode):
|
||||
return awsAwsquery_deserializeErrorExpiredTradeInTokenException(response, errorBody)
|
||||
|
||||
case strings.EqualFold("PackedPolicyTooLarge", errorCode):
|
||||
return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
|
||||
|
||||
case strings.EqualFold("RegionDisabledException", errorCode):
|
||||
return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
|
||||
|
||||
default:
|
||||
genericError := &smithy.GenericAPIError{
|
||||
Code: errorCode,
|
||||
Message: errorMessage,
|
||||
}
|
||||
return genericError
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
type awsAwsquery_deserializeOpGetFederationToken struct {
|
||||
}
|
||||
|
||||
@@ -1085,6 +1194,124 @@ func awsAwsquery_deserializeOpErrorGetSessionToken(response *smithyhttp.Response
|
||||
}
|
||||
}
|
||||
|
||||
type awsAwsquery_deserializeOpGetWebIdentityToken struct {
|
||||
}
|
||||
|
||||
func (*awsAwsquery_deserializeOpGetWebIdentityToken) ID() string {
|
||||
return "OperationDeserializer"
|
||||
}
|
||||
|
||||
func (m *awsAwsquery_deserializeOpGetWebIdentityToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
||||
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
out, metadata, err = next.HandleDeserialize(ctx, in)
|
||||
if err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
_, span := tracing.StartSpan(ctx, "OperationDeserializer")
|
||||
endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
|
||||
defer endTimer()
|
||||
defer span.End()
|
||||
response, ok := out.RawResponse.(*smithyhttp.Response)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
||||
}
|
||||
|
||||
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
||||
return out, metadata, awsAwsquery_deserializeOpErrorGetWebIdentityToken(response, &metadata)
|
||||
}
|
||||
output := &GetWebIdentityTokenOutput{}
|
||||
out.Result = output
|
||||
|
||||
var buff [1024]byte
|
||||
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
||||
body := io.TeeReader(response.Body, ringBuffer)
|
||||
rootDecoder := xml.NewDecoder(body)
|
||||
t, err := smithyxml.FetchRootElement(rootDecoder)
|
||||
if err == io.EOF {
|
||||
return out, metadata, nil
|
||||
}
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return out, metadata, &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
|
||||
t, err = decoder.GetElement("GetWebIdentityTokenResult")
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
err = &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
|
||||
err = awsAwsquery_deserializeOpDocumentGetWebIdentityTokenOutput(&output, decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
err = &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeOpErrorGetWebIdentityToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
||||
var errorBuffer bytes.Buffer
|
||||
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
||||
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
||||
}
|
||||
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
||||
|
||||
errorCode := "UnknownError"
|
||||
errorMessage := errorCode
|
||||
|
||||
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if reqID := errorComponents.RequestID; len(reqID) != 0 {
|
||||
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
|
||||
}
|
||||
if len(errorComponents.Code) != 0 {
|
||||
errorCode = errorComponents.Code
|
||||
}
|
||||
if len(errorComponents.Message) != 0 {
|
||||
errorMessage = errorComponents.Message
|
||||
}
|
||||
errorBody.Seek(0, io.SeekStart)
|
||||
switch {
|
||||
case strings.EqualFold("JWTPayloadSizeExceededException", errorCode):
|
||||
return awsAwsquery_deserializeErrorJWTPayloadSizeExceededException(response, errorBody)
|
||||
|
||||
case strings.EqualFold("OutboundWebIdentityFederationDisabledException", errorCode):
|
||||
return awsAwsquery_deserializeErrorOutboundWebIdentityFederationDisabledException(response, errorBody)
|
||||
|
||||
case strings.EqualFold("SessionDurationEscalationException", errorCode):
|
||||
return awsAwsquery_deserializeErrorSessionDurationEscalationException(response, errorBody)
|
||||
|
||||
default:
|
||||
genericError := &smithy.GenericAPIError{
|
||||
Code: errorCode,
|
||||
Message: errorMessage,
|
||||
}
|
||||
return genericError
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeErrorExpiredTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
||||
output := &types.ExpiredTokenException{}
|
||||
var buff [1024]byte
|
||||
@@ -1129,6 +1356,50 @@ func awsAwsquery_deserializeErrorExpiredTokenException(response *smithyhttp.Resp
|
||||
return output
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeErrorExpiredTradeInTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
||||
output := &types.ExpiredTradeInTokenException{}
|
||||
var buff [1024]byte
|
||||
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
||||
body := io.TeeReader(errorBody, ringBuffer)
|
||||
rootDecoder := xml.NewDecoder(body)
|
||||
t, err := smithyxml.FetchRootElement(rootDecoder)
|
||||
if err == io.EOF {
|
||||
return output
|
||||
}
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
|
||||
t, err = decoder.GetElement("Error")
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
|
||||
err = awsAwsquery_deserializeDocumentExpiredTradeInTokenException(&output, decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeErrorIDPCommunicationErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
||||
output := &types.IDPCommunicationErrorException{}
|
||||
var buff [1024]byte
|
||||
@@ -1305,6 +1576,50 @@ func awsAwsquery_deserializeErrorInvalidIdentityTokenException(response *smithyh
|
||||
return output
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeErrorJWTPayloadSizeExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
||||
output := &types.JWTPayloadSizeExceededException{}
|
||||
var buff [1024]byte
|
||||
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
||||
body := io.TeeReader(errorBody, ringBuffer)
|
||||
rootDecoder := xml.NewDecoder(body)
|
||||
t, err := smithyxml.FetchRootElement(rootDecoder)
|
||||
if err == io.EOF {
|
||||
return output
|
||||
}
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
|
||||
t, err = decoder.GetElement("Error")
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
|
||||
err = awsAwsquery_deserializeDocumentJWTPayloadSizeExceededException(&output, decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
||||
output := &types.MalformedPolicyDocumentException{}
|
||||
var buff [1024]byte
|
||||
@@ -1349,6 +1664,50 @@ func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smit
|
||||
return output
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeErrorOutboundWebIdentityFederationDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
||||
output := &types.OutboundWebIdentityFederationDisabledException{}
|
||||
var buff [1024]byte
|
||||
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
||||
body := io.TeeReader(errorBody, ringBuffer)
|
||||
rootDecoder := xml.NewDecoder(body)
|
||||
t, err := smithyxml.FetchRootElement(rootDecoder)
|
||||
if err == io.EOF {
|
||||
return output
|
||||
}
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
|
||||
t, err = decoder.GetElement("Error")
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
|
||||
err = awsAwsquery_deserializeDocumentOutboundWebIdentityFederationDisabledException(&output, decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
||||
output := &types.PackedPolicyTooLargeException{}
|
||||
var buff [1024]byte
|
||||
@@ -1437,6 +1796,50 @@ func awsAwsquery_deserializeErrorRegionDisabledException(response *smithyhttp.Re
|
||||
return output
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeErrorSessionDurationEscalationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
||||
output := &types.SessionDurationEscalationException{}
|
||||
var buff [1024]byte
|
||||
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
||||
body := io.TeeReader(errorBody, ringBuffer)
|
||||
rootDecoder := xml.NewDecoder(body)
|
||||
t, err := smithyxml.FetchRootElement(rootDecoder)
|
||||
if err == io.EOF {
|
||||
return output
|
||||
}
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
|
||||
t, err = decoder.GetElement("Error")
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
|
||||
err = awsAwsquery_deserializeDocumentSessionDurationEscalationException(&output, decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
return &smithy.DeserializationError{
|
||||
Err: fmt.Errorf("failed to decode response body, %w", err),
|
||||
Snapshot: snapshot.Bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
@@ -1640,6 +2043,55 @@ func awsAwsquery_deserializeDocumentExpiredTokenException(v **types.ExpiredToken
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeDocumentExpiredTradeInTokenException(v **types.ExpiredTradeInTokenException, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
}
|
||||
var sv *types.ExpiredTradeInTokenException
|
||||
if *v == nil {
|
||||
sv = &types.ExpiredTradeInTokenException{}
|
||||
} else {
|
||||
sv = *v
|
||||
}
|
||||
|
||||
for {
|
||||
t, done, err := decoder.Token()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if done {
|
||||
break
|
||||
}
|
||||
originalDecoder := decoder
|
||||
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
|
||||
switch {
|
||||
case strings.EqualFold("message", t.Name.Local):
|
||||
val, err := decoder.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val == nil {
|
||||
break
|
||||
}
|
||||
{
|
||||
xtv := string(val)
|
||||
sv.Message = ptr.String(xtv)
|
||||
}
|
||||
|
||||
default:
|
||||
// Do nothing and ignore the unexpected tag element
|
||||
err = decoder.Decoder.Skip()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
decoder = originalDecoder
|
||||
}
|
||||
*v = sv
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeDocumentFederatedUser(v **types.FederatedUser, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
@@ -1898,6 +2350,55 @@ func awsAwsquery_deserializeDocumentInvalidIdentityTokenException(v **types.Inva
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeDocumentJWTPayloadSizeExceededException(v **types.JWTPayloadSizeExceededException, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
}
|
||||
var sv *types.JWTPayloadSizeExceededException
|
||||
if *v == nil {
|
||||
sv = &types.JWTPayloadSizeExceededException{}
|
||||
} else {
|
||||
sv = *v
|
||||
}
|
||||
|
||||
for {
|
||||
t, done, err := decoder.Token()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if done {
|
||||
break
|
||||
}
|
||||
originalDecoder := decoder
|
||||
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
|
||||
switch {
|
||||
case strings.EqualFold("message", t.Name.Local):
|
||||
val, err := decoder.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val == nil {
|
||||
break
|
||||
}
|
||||
{
|
||||
xtv := string(val)
|
||||
sv.Message = ptr.String(xtv)
|
||||
}
|
||||
|
||||
default:
|
||||
// Do nothing and ignore the unexpected tag element
|
||||
err = decoder.Decoder.Skip()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
decoder = originalDecoder
|
||||
}
|
||||
*v = sv
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
@@ -1947,6 +2448,55 @@ func awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(v **types.M
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeDocumentOutboundWebIdentityFederationDisabledException(v **types.OutboundWebIdentityFederationDisabledException, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
}
|
||||
var sv *types.OutboundWebIdentityFederationDisabledException
|
||||
if *v == nil {
|
||||
sv = &types.OutboundWebIdentityFederationDisabledException{}
|
||||
} else {
|
||||
sv = *v
|
||||
}
|
||||
|
||||
for {
|
||||
t, done, err := decoder.Token()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if done {
|
||||
break
|
||||
}
|
||||
originalDecoder := decoder
|
||||
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
|
||||
switch {
|
||||
case strings.EqualFold("message", t.Name.Local):
|
||||
val, err := decoder.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val == nil {
|
||||
break
|
||||
}
|
||||
{
|
||||
xtv := string(val)
|
||||
sv.Message = ptr.String(xtv)
|
||||
}
|
||||
|
||||
default:
|
||||
// Do nothing and ignore the unexpected tag element
|
||||
err = decoder.Decoder.Skip()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
decoder = originalDecoder
|
||||
}
|
||||
*v = sv
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(v **types.PackedPolicyTooLargeException, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
@@ -2045,6 +2595,55 @@ func awsAwsquery_deserializeDocumentRegionDisabledException(v **types.RegionDisa
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeDocumentSessionDurationEscalationException(v **types.SessionDurationEscalationException, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
}
|
||||
var sv *types.SessionDurationEscalationException
|
||||
if *v == nil {
|
||||
sv = &types.SessionDurationEscalationException{}
|
||||
} else {
|
||||
sv = *v
|
||||
}
|
||||
|
||||
for {
|
||||
t, done, err := decoder.Token()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if done {
|
||||
break
|
||||
}
|
||||
originalDecoder := decoder
|
||||
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
|
||||
switch {
|
||||
case strings.EqualFold("message", t.Name.Local):
|
||||
val, err := decoder.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val == nil {
|
||||
break
|
||||
}
|
||||
{
|
||||
xtv := string(val)
|
||||
sv.Message = ptr.String(xtv)
|
||||
}
|
||||
|
||||
default:
|
||||
// Do nothing and ignore the unexpected tag element
|
||||
err = decoder.Decoder.Skip()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
decoder = originalDecoder
|
||||
}
|
||||
*v = sv
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeOpDocumentAssumeRoleOutput(v **AssumeRoleOutput, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
@@ -2611,6 +3210,78 @@ func awsAwsquery_deserializeOpDocumentGetCallerIdentityOutput(v **GetCallerIdent
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeOpDocumentGetDelegatedAccessTokenOutput(v **GetDelegatedAccessTokenOutput, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
}
|
||||
var sv *GetDelegatedAccessTokenOutput
|
||||
if *v == nil {
|
||||
sv = &GetDelegatedAccessTokenOutput{}
|
||||
} else {
|
||||
sv = *v
|
||||
}
|
||||
|
||||
for {
|
||||
t, done, err := decoder.Token()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if done {
|
||||
break
|
||||
}
|
||||
originalDecoder := decoder
|
||||
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
|
||||
switch {
|
||||
case strings.EqualFold("AssumedPrincipal", t.Name.Local):
|
||||
val, err := decoder.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val == nil {
|
||||
break
|
||||
}
|
||||
{
|
||||
xtv := string(val)
|
||||
sv.AssumedPrincipal = ptr.String(xtv)
|
||||
}
|
||||
|
||||
case strings.EqualFold("Credentials", t.Name.Local):
|
||||
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
|
||||
if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
case strings.EqualFold("PackedPolicySize", t.Name.Local):
|
||||
val, err := decoder.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val == nil {
|
||||
break
|
||||
}
|
||||
{
|
||||
xtv := string(val)
|
||||
i64, err := strconv.ParseInt(xtv, 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sv.PackedPolicySize = ptr.Int32(int32(i64))
|
||||
}
|
||||
|
||||
default:
|
||||
// Do nothing and ignore the unexpected tag element
|
||||
err = decoder.Decoder.Skip()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
decoder = originalDecoder
|
||||
}
|
||||
*v = sv
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeOpDocumentGetFederationTokenOutput(v **GetFederationTokenOutput, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
@@ -2717,3 +3388,69 @@ func awsAwsquery_deserializeOpDocumentGetSessionTokenOutput(v **GetSessionTokenO
|
||||
*v = sv
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_deserializeOpDocumentGetWebIdentityTokenOutput(v **GetWebIdentityTokenOutput, decoder smithyxml.NodeDecoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unexpected nil of type %T", v)
|
||||
}
|
||||
var sv *GetWebIdentityTokenOutput
|
||||
if *v == nil {
|
||||
sv = &GetWebIdentityTokenOutput{}
|
||||
} else {
|
||||
sv = *v
|
||||
}
|
||||
|
||||
for {
|
||||
t, done, err := decoder.Token()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if done {
|
||||
break
|
||||
}
|
||||
originalDecoder := decoder
|
||||
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
|
||||
switch {
|
||||
case strings.EqualFold("Expiration", t.Name.Local):
|
||||
val, err := decoder.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val == nil {
|
||||
break
|
||||
}
|
||||
{
|
||||
xtv := string(val)
|
||||
t, err := smithytime.ParseDateTime(xtv)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sv.Expiration = ptr.Time(t)
|
||||
}
|
||||
|
||||
case strings.EqualFold("WebIdentityToken", t.Name.Local):
|
||||
val, err := decoder.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if val == nil {
|
||||
break
|
||||
}
|
||||
{
|
||||
xtv := string(val)
|
||||
sv.WebIdentityToken = ptr.String(xtv)
|
||||
}
|
||||
|
||||
default:
|
||||
// Do nothing and ignore the unexpected tag element
|
||||
err = decoder.Decoder.Skip()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
decoder = originalDecoder
|
||||
}
|
||||
*v = sv
|
||||
return nil
|
||||
}
|
||||
|
||||
30
vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
generated
vendored
30
vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
generated
vendored
@@ -15,6 +15,7 @@ import (
|
||||
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/rulesfn"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/ptr"
|
||||
"github.com/aws/smithy-go/tracing"
|
||||
@@ -218,11 +219,15 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) {
|
||||
}
|
||||
}
|
||||
|
||||
func bindRegion(region string) *string {
|
||||
func bindRegion(region string) (*string, error) {
|
||||
if region == "" {
|
||||
return nil
|
||||
return nil, nil
|
||||
}
|
||||
return aws.String(endpoints.MapFIPSRegion(region))
|
||||
if !rulesfn.IsValidHostLabel(region, true) {
|
||||
return nil, fmt.Errorf("invalid input region %s", region)
|
||||
}
|
||||
|
||||
return aws.String(endpoints.MapFIPSRegion(region)), nil
|
||||
}
|
||||
|
||||
// EndpointParameters provides the parameters that influence how endpoints are
|
||||
@@ -346,8 +351,11 @@ func (r *resolver) ResolveEndpoint(
|
||||
return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
|
||||
}
|
||||
_UseDualStack := *params.UseDualStack
|
||||
_ = _UseDualStack
|
||||
_UseFIPS := *params.UseFIPS
|
||||
_ = _UseFIPS
|
||||
_UseGlobalEndpoint := *params.UseGlobalEndpoint
|
||||
_ = _UseGlobalEndpoint
|
||||
|
||||
if _UseGlobalEndpoint == true {
|
||||
if !(params.Endpoint != nil) {
|
||||
@@ -1057,10 +1065,15 @@ type endpointParamsBinder interface {
|
||||
bindEndpointParams(*EndpointParameters)
|
||||
}
|
||||
|
||||
func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters {
|
||||
func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) {
|
||||
params := &EndpointParameters{}
|
||||
|
||||
params.Region = bindRegion(options.Region)
|
||||
region, err := bindRegion(options.Region)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
params.Region = region
|
||||
|
||||
params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
|
||||
params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
|
||||
params.Endpoint = options.BaseEndpoint
|
||||
@@ -1069,7 +1082,7 @@ func bindEndpointParams(ctx context.Context, input interface{}, options Options)
|
||||
b.bindEndpointParams(params)
|
||||
}
|
||||
|
||||
return params
|
||||
return params, nil
|
||||
}
|
||||
|
||||
type resolveEndpointV2Middleware struct {
|
||||
@@ -1099,7 +1112,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid
|
||||
return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
|
||||
}
|
||||
|
||||
params := bindEndpointParams(ctx, getOperationInput(ctx), m.options)
|
||||
params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err)
|
||||
}
|
||||
endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration",
|
||||
func() (smithyendpoints.Endpoint, error) {
|
||||
return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
|
||||
|
||||
5
vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
generated
vendored
5
vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
generated
vendored
@@ -17,8 +17,10 @@
|
||||
"api_op_DecodeAuthorizationMessage.go",
|
||||
"api_op_GetAccessKeyInfo.go",
|
||||
"api_op_GetCallerIdentity.go",
|
||||
"api_op_GetDelegatedAccessToken.go",
|
||||
"api_op_GetFederationToken.go",
|
||||
"api_op_GetSessionToken.go",
|
||||
"api_op_GetWebIdentityToken.go",
|
||||
"auth.go",
|
||||
"deserializers.go",
|
||||
"doc.go",
|
||||
@@ -32,11 +34,12 @@
|
||||
"protocol_test.go",
|
||||
"serializers.go",
|
||||
"snapshot_test.go",
|
||||
"sra_operation_order_test.go",
|
||||
"types/errors.go",
|
||||
"types/types.go",
|
||||
"validators.go"
|
||||
],
|
||||
"go": "1.15",
|
||||
"go": "1.23",
|
||||
"module": "github.com/aws/aws-sdk-go-v2/service/sts",
|
||||
"unstable": false
|
||||
}
|
||||
|
||||
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
generated
vendored
@@ -3,4 +3,4 @@
|
||||
package sts
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.33.13"
|
||||
const goModuleVersion = "1.41.5"
|
||||
|
||||
56
vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
generated
vendored
56
vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
generated
vendored
@@ -87,6 +87,7 @@ func New() *Resolver {
|
||||
var partitionRegexp = struct {
|
||||
Aws *regexp.Regexp
|
||||
AwsCn *regexp.Regexp
|
||||
AwsEusc *regexp.Regexp
|
||||
AwsIso *regexp.Regexp
|
||||
AwsIsoB *regexp.Regexp
|
||||
AwsIsoE *regexp.Regexp
|
||||
@@ -96,6 +97,7 @@ var partitionRegexp = struct {
|
||||
|
||||
Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
|
||||
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
|
||||
AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"),
|
||||
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
|
||||
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
|
||||
AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
|
||||
@@ -145,6 +147,9 @@ var defaultPartitions = endpoints.Partitions{
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-east-1",
|
||||
}: endpoints.Endpoint{},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-east-2",
|
||||
}: endpoints.Endpoint{},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoints.Endpoint{},
|
||||
@@ -175,6 +180,9 @@ var defaultPartitions = endpoints.Partitions{
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-southeast-5",
|
||||
}: endpoints.Endpoint{},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-southeast-6",
|
||||
}: endpoints.Endpoint{},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-southeast-7",
|
||||
}: endpoints.Endpoint{},
|
||||
@@ -348,6 +356,46 @@ var defaultPartitions = endpoints.Partitions{
|
||||
}: endpoints.Endpoint{},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-eusc",
|
||||
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
|
||||
{
|
||||
Variant: endpoints.DualStackVariant,
|
||||
}: {
|
||||
Hostname: "sts.{region}.api.amazonwebservices.eu",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: endpoints.FIPSVariant,
|
||||
}: {
|
||||
Hostname: "sts-fips.{region}.amazonaws.eu",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
|
||||
}: {
|
||||
Hostname: "sts-fips.{region}.api.amazonwebservices.eu",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: 0,
|
||||
}: {
|
||||
Hostname: "sts.{region}.amazonaws.eu",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
},
|
||||
RegionRegex: partitionRegexp.AwsEusc,
|
||||
IsRegionalized: true,
|
||||
Endpoints: endpoints.Endpoints{
|
||||
endpoints.EndpointKey{
|
||||
Region: "eusc-de-east-1",
|
||||
}: endpoints.Endpoint{},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-iso",
|
||||
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
|
||||
@@ -401,6 +449,9 @@ var defaultPartitions = endpoints.Partitions{
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-isob-east-1",
|
||||
}: endpoints.Endpoint{},
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-isob-west-1",
|
||||
}: endpoints.Endpoint{},
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -423,6 +474,11 @@ var defaultPartitions = endpoints.Partitions{
|
||||
},
|
||||
RegionRegex: partitionRegexp.AwsIsoE,
|
||||
IsRegionalized: true,
|
||||
Endpoints: endpoints.Endpoints{
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-isoe-west-1",
|
||||
}: endpoints.Endpoint{},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-iso-f",
|
||||
|
||||
7
vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go
generated
vendored
7
vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go
generated
vendored
@@ -119,12 +119,18 @@ type Options struct {
|
||||
// implementation if nil.
|
||||
HTTPClient HTTPClient
|
||||
|
||||
// Client registry of operation interceptors.
|
||||
Interceptors smithyhttp.InterceptorRegistry
|
||||
|
||||
// The auth scheme resolver which determines how to authenticate for each
|
||||
// operation.
|
||||
AuthSchemeResolver AuthSchemeResolver
|
||||
|
||||
// The list of auth schemes supported by the client.
|
||||
AuthSchemes []smithyhttp.AuthScheme
|
||||
|
||||
// Priority list of preferred auth scheme names (e.g. sigv4a).
|
||||
AuthSchemePreference []string
|
||||
}
|
||||
|
||||
// Copy creates a clone where the APIOptions list is deep copied.
|
||||
@@ -132,6 +138,7 @@ func (o Options) Copy() Options {
|
||||
to := o
|
||||
to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
|
||||
copy(to.APIOptions, o.APIOptions)
|
||||
to.Interceptors = o.Interceptors.Copy()
|
||||
|
||||
return to
|
||||
}
|
||||
|
||||
193
vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
generated
vendored
193
vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
generated
vendored
@@ -502,6 +502,76 @@ func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.C
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
|
||||
type awsAwsquery_serializeOpGetDelegatedAccessToken struct {
|
||||
}
|
||||
|
||||
func (*awsAwsquery_serializeOpGetDelegatedAccessToken) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsAwsquery_serializeOpGetDelegatedAccessToken) 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.(*GetDelegatedAccessTokenInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
operationPath := "/"
|
||||
if len(request.Request.URL.Path) == 0 {
|
||||
request.Request.URL.Path = operationPath
|
||||
} else {
|
||||
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
|
||||
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
|
||||
request.Request.URL.Path += "/"
|
||||
}
|
||||
}
|
||||
request.Request.Method = "POST"
|
||||
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
|
||||
|
||||
bodyWriter := bytes.NewBuffer(nil)
|
||||
bodyEncoder := query.NewEncoder(bodyWriter)
|
||||
body := bodyEncoder.Object()
|
||||
body.Key("Action").String("GetDelegatedAccessToken")
|
||||
body.Key("Version").String("2011-06-15")
|
||||
|
||||
if err := awsAwsquery_serializeOpDocumentGetDelegatedAccessTokenInput(input, bodyEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
err = bodyEncoder.Encode()
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
|
||||
type awsAwsquery_serializeOpGetFederationToken struct {
|
||||
}
|
||||
|
||||
@@ -641,6 +711,76 @@ func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Con
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
|
||||
type awsAwsquery_serializeOpGetWebIdentityToken struct {
|
||||
}
|
||||
|
||||
func (*awsAwsquery_serializeOpGetWebIdentityToken) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsAwsquery_serializeOpGetWebIdentityToken) 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.(*GetWebIdentityTokenInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
operationPath := "/"
|
||||
if len(request.Request.URL.Path) == 0 {
|
||||
request.Request.URL.Path = operationPath
|
||||
} else {
|
||||
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
|
||||
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
|
||||
request.Request.URL.Path += "/"
|
||||
}
|
||||
}
|
||||
request.Request.Method = "POST"
|
||||
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
|
||||
|
||||
bodyWriter := bytes.NewBuffer(nil)
|
||||
bodyEncoder := query.NewEncoder(bodyWriter)
|
||||
body := bodyEncoder.Object()
|
||||
body.Key("Action").String("GetWebIdentityToken")
|
||||
body.Key("Version").String("2011-06-15")
|
||||
|
||||
if err := awsAwsquery_serializeOpDocumentGetWebIdentityTokenInput(input, bodyEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
err = bodyEncoder.Encode()
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
endTimer()
|
||||
span.End()
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsAwsquery_serializeDocumentPolicyDescriptorListType(v []types.PolicyDescriptorType, value query.Value) error {
|
||||
array := value.Array("member")
|
||||
|
||||
@@ -733,6 +873,16 @@ func awsAwsquery_serializeDocumentTagListType(v []types.Tag, value query.Value)
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_serializeDocumentWebIdentityTokenAudienceListType(v []string, value query.Value) error {
|
||||
array := value.Array("member")
|
||||
|
||||
for i := range v {
|
||||
av := array.Value()
|
||||
av.String(v[i])
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_serializeOpDocumentAssumeRoleInput(v *AssumeRoleInput, value query.Value) error {
|
||||
object := value.Object()
|
||||
_ = object
|
||||
@@ -946,6 +1096,18 @@ func awsAwsquery_serializeOpDocumentGetCallerIdentityInput(v *GetCallerIdentityI
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_serializeOpDocumentGetDelegatedAccessTokenInput(v *GetDelegatedAccessTokenInput, value query.Value) error {
|
||||
object := value.Object()
|
||||
_ = object
|
||||
|
||||
if v.TradeInToken != nil {
|
||||
objectKey := object.Key("TradeInToken")
|
||||
objectKey.String(*v.TradeInToken)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_serializeOpDocumentGetFederationTokenInput(v *GetFederationTokenInput, value query.Value) error {
|
||||
object := value.Object()
|
||||
_ = object
|
||||
@@ -1003,3 +1165,34 @@ func awsAwsquery_serializeOpDocumentGetSessionTokenInput(v *GetSessionTokenInput
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsAwsquery_serializeOpDocumentGetWebIdentityTokenInput(v *GetWebIdentityTokenInput, value query.Value) error {
|
||||
object := value.Object()
|
||||
_ = object
|
||||
|
||||
if v.Audience != nil {
|
||||
objectKey := object.Key("Audience")
|
||||
if err := awsAwsquery_serializeDocumentWebIdentityTokenAudienceListType(v.Audience, objectKey); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if v.DurationSeconds != nil {
|
||||
objectKey := object.Key("DurationSeconds")
|
||||
objectKey.Integer(*v.DurationSeconds)
|
||||
}
|
||||
|
||||
if v.SigningAlgorithm != nil {
|
||||
objectKey := object.Key("SigningAlgorithm")
|
||||
objectKey.String(*v.SigningAlgorithm)
|
||||
}
|
||||
|
||||
if v.Tags != nil {
|
||||
objectKey := object.Key("Tags")
|
||||
if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
117
vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
generated
vendored
117
vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
generated
vendored
@@ -34,6 +34,33 @@ func (e *ExpiredTokenException) ErrorCode() string {
|
||||
}
|
||||
func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// The trade-in token provided in the request has expired and can no longer be
|
||||
// exchanged for credentials. Request a new token and retry the operation.
|
||||
type ExpiredTradeInTokenException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *ExpiredTradeInTokenException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *ExpiredTradeInTokenException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *ExpiredTradeInTokenException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "ExpiredTradeInTokenException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *ExpiredTradeInTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// The request could not be fulfilled because the identity provider (IDP) that was
|
||||
// asked to verify the incoming identity token could not be reached. This is often
|
||||
// a transient error caused by network conditions. Retry the request a limited
|
||||
@@ -152,6 +179,34 @@ func (e *InvalidIdentityTokenException) ErrorCode() string {
|
||||
}
|
||||
func (e *InvalidIdentityTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// The requested token payload size exceeds the maximum allowed size. Reduce the
|
||||
// number of request tags included in the GetWebIdentityToken API call to reduce
|
||||
// the token payload size.
|
||||
type JWTPayloadSizeExceededException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *JWTPayloadSizeExceededException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *JWTPayloadSizeExceededException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *JWTPayloadSizeExceededException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "JWTPayloadSizeExceededException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *JWTPayloadSizeExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// The request was rejected because the policy document was malformed. The error
|
||||
// message describes the specific error.
|
||||
type MalformedPolicyDocumentException struct {
|
||||
@@ -179,6 +234,36 @@ func (e *MalformedPolicyDocumentException) ErrorCode() string {
|
||||
}
|
||||
func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// The outbound web identity federation feature is not enabled for this account.
|
||||
// To use this feature, you must first enable it through the Amazon Web Services
|
||||
// Management Console or API.
|
||||
type OutboundWebIdentityFederationDisabledException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *OutboundWebIdentityFederationDisabledException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *OutboundWebIdentityFederationDisabledException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *OutboundWebIdentityFederationDisabledException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "OutboundWebIdentityFederationDisabledException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *OutboundWebIdentityFederationDisabledException) ErrorFault() smithy.ErrorFault {
|
||||
return smithy.FaultClient
|
||||
}
|
||||
|
||||
// The request was rejected because the total packed size of the session policies
|
||||
// and session tags combined was too large. An Amazon Web Services conversion
|
||||
// compresses the session policy document, session policy ARNs, and session tags
|
||||
@@ -221,7 +306,7 @@ func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return
|
||||
// console to activate STS in that region. For more information, see [Activating and Deactivating STS in an Amazon Web Services Region]in the IAM
|
||||
// User Guide.
|
||||
//
|
||||
// [Activating and Deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html
|
||||
// [Activating and Deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate
|
||||
type RegionDisabledException struct {
|
||||
Message *string
|
||||
|
||||
@@ -246,3 +331,33 @@ func (e *RegionDisabledException) ErrorCode() string {
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *RegionDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// The requested token duration would extend the session beyond its original
|
||||
// expiration time. You cannot use this operation to extend the lifetime of a
|
||||
// session beyond what was granted when the session was originally created.
|
||||
type SessionDurationEscalationException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *SessionDurationEscalationException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *SessionDurationEscalationException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *SessionDurationEscalationException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "SessionDurationEscalationException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *SessionDurationEscalationException) ErrorFault() smithy.ErrorFault {
|
||||
return smithy.FaultClient
|
||||
}
|
||||
|
||||
86
vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go
generated
vendored
86
vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go
generated
vendored
@@ -130,6 +130,26 @@ func (m *validateOpGetAccessKeyInfo) HandleInitialize(ctx context.Context, in mi
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpGetDelegatedAccessToken struct {
|
||||
}
|
||||
|
||||
func (*validateOpGetDelegatedAccessToken) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpGetDelegatedAccessToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*GetDelegatedAccessTokenInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpGetDelegatedAccessTokenInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpGetFederationToken struct {
|
||||
}
|
||||
|
||||
@@ -150,6 +170,26 @@ func (m *validateOpGetFederationToken) HandleInitialize(ctx context.Context, in
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpGetWebIdentityToken struct {
|
||||
}
|
||||
|
||||
func (*validateOpGetWebIdentityToken) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpGetWebIdentityToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*GetWebIdentityTokenInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpGetWebIdentityTokenInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
func addOpAssumeRoleValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpAssumeRole{}, middleware.After)
|
||||
}
|
||||
@@ -174,10 +214,18 @@ func addOpGetAccessKeyInfoValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpGetAccessKeyInfo{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpGetDelegatedAccessTokenValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpGetDelegatedAccessToken{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpGetFederationTokenValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpGetFederationToken{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpGetWebIdentityTokenValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpGetWebIdentityToken{}, middleware.After)
|
||||
}
|
||||
|
||||
func validateTag(v *types.Tag) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
@@ -326,6 +374,21 @@ func validateOpGetAccessKeyInfoInput(v *GetAccessKeyInfoInput) error {
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpGetDelegatedAccessTokenInput(v *GetDelegatedAccessTokenInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "GetDelegatedAccessTokenInput"}
|
||||
if v.TradeInToken == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("TradeInToken"))
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpGetFederationTokenInput(v *GetFederationTokenInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
@@ -345,3 +408,26 @@ func validateOpGetFederationTokenInput(v *GetFederationTokenInput) error {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpGetWebIdentityTokenInput(v *GetWebIdentityTokenInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "GetWebIdentityTokenInput"}
|
||||
if v.Audience == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("Audience"))
|
||||
}
|
||||
if v.SigningAlgorithm == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("SigningAlgorithm"))
|
||||
}
|
||||
if v.Tags != nil {
|
||||
if err := validateTagListType(v.Tags); err != nil {
|
||||
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
|
||||
}
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user