Bumps the aws-sdk-go-v2 group with 3 updates in the / directory: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/kinesis](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.43 to 1.28.9 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.43...config/v1.28.9) Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.17.41 to 1.17.50 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.41...credentials/v1.17.50) Updates `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue` from 1.15.12 to 1.15.25 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.15.12...service/kinesis/v1.15.25) Updates `github.com/aws/aws-sdk-go-v2/service/dynamodb` from 1.36.2 to 1.39.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/iam/v1.36.2...service/ivs/v1.39.2) Updates `github.com/aws/aws-sdk-go-v2/service/kinesis` from 1.32.2 to 1.32.10 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.32.2...service/kinesis/v1.32.10) Updates `github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream` from 1.6.6 to 1.6.7 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/rum/v1.6.6...service/rum/v1.6.7) Updates `github.com/aws/aws-sdk-go-v2/feature/ec2/imds` from 1.16.17 to 1.16.23 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ram/v1.16.17...service/ram/v1.16.23) Updates `github.com/aws/aws-sdk-go-v2/internal/configsources` from 1.3.21 to 1.3.27 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/internal/ini/v1.3.21...internal/ini/v1.3.27) Updates `github.com/aws/aws-sdk-go-v2/internal/endpoints/v2` from 2.6.21 to 2.6.27 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/internal/endpoints/v2.6.21...internal/endpoints/v2.6.27) Updates `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams` from 1.24.2 to 1.24.12 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/fsx/v1.24.12/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/pi/v1.24.2...service/fsx/v1.24.12) Updates `github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding` from 1.12.0 to 1.12.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.12.0...service/m2/v1.12.1) Updates `github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery` from 1.10.2 to 1.10.8 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.10.2...service/m2/v1.10.8) Updates `github.com/aws/aws-sdk-go-v2/service/internal/presigned-url` from 1.12.2 to 1.12.8 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/m2/v1.12.2...service/fis/v1.12.8) Updates `github.com/aws/aws-sdk-go-v2/service/sso` from 1.24.2 to 1.24.9 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/fsx/v1.24.9/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/pi/v1.24.2...service/fsx/v1.24.9) Updates `github.com/aws/aws-sdk-go-v2/service/ssooidc` from 1.28.2 to 1.28.8 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.28.2...config/v1.28.8) Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.32.2 to 1.33.5 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.32.2...service/sts/v1.33.5) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/credentials dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/dynamodb dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/kinesis dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/feature/ec2/imds dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/internal/configsources dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/dynamodbstreams dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/internal/presigned-url dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/sso dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/ssooidc dependency-type: indirect update-type: version-update:semver-patch dependency-group: aws-sdk-go-v2 - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: indirect update-type: version-update:semver-minor dependency-group: aws-sdk-go-v2 ... Signed-off-by: dependabot[bot] <support@github.com>
347 lines
9.8 KiB
Go
347 lines
9.8 KiB
Go
// Code generated by smithy-go-codegen DO NOT EDIT.
|
|
|
|
package sts
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"github.com/aws/aws-sdk-go-v2/service/sts/types"
|
|
smithy "github.com/aws/smithy-go"
|
|
"github.com/aws/smithy-go/middleware"
|
|
)
|
|
|
|
type validateOpAssumeRole struct {
|
|
}
|
|
|
|
func (*validateOpAssumeRole) ID() string {
|
|
return "OperationInputValidation"
|
|
}
|
|
|
|
func (m *validateOpAssumeRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
|
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
input, ok := in.Parameters.(*AssumeRoleInput)
|
|
if !ok {
|
|
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
|
}
|
|
if err := validateOpAssumeRoleInput(input); err != nil {
|
|
return out, metadata, err
|
|
}
|
|
return next.HandleInitialize(ctx, in)
|
|
}
|
|
|
|
type validateOpAssumeRoleWithSAML struct {
|
|
}
|
|
|
|
func (*validateOpAssumeRoleWithSAML) ID() string {
|
|
return "OperationInputValidation"
|
|
}
|
|
|
|
func (m *validateOpAssumeRoleWithSAML) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
|
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
input, ok := in.Parameters.(*AssumeRoleWithSAMLInput)
|
|
if !ok {
|
|
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
|
}
|
|
if err := validateOpAssumeRoleWithSAMLInput(input); err != nil {
|
|
return out, metadata, err
|
|
}
|
|
return next.HandleInitialize(ctx, in)
|
|
}
|
|
|
|
type validateOpAssumeRoleWithWebIdentity struct {
|
|
}
|
|
|
|
func (*validateOpAssumeRoleWithWebIdentity) ID() string {
|
|
return "OperationInputValidation"
|
|
}
|
|
|
|
func (m *validateOpAssumeRoleWithWebIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
|
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
input, ok := in.Parameters.(*AssumeRoleWithWebIdentityInput)
|
|
if !ok {
|
|
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
|
}
|
|
if err := validateOpAssumeRoleWithWebIdentityInput(input); err != nil {
|
|
return out, metadata, err
|
|
}
|
|
return next.HandleInitialize(ctx, in)
|
|
}
|
|
|
|
type validateOpAssumeRoot struct {
|
|
}
|
|
|
|
func (*validateOpAssumeRoot) ID() string {
|
|
return "OperationInputValidation"
|
|
}
|
|
|
|
func (m *validateOpAssumeRoot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
|
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
input, ok := in.Parameters.(*AssumeRootInput)
|
|
if !ok {
|
|
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
|
}
|
|
if err := validateOpAssumeRootInput(input); err != nil {
|
|
return out, metadata, err
|
|
}
|
|
return next.HandleInitialize(ctx, in)
|
|
}
|
|
|
|
type validateOpDecodeAuthorizationMessage struct {
|
|
}
|
|
|
|
func (*validateOpDecodeAuthorizationMessage) ID() string {
|
|
return "OperationInputValidation"
|
|
}
|
|
|
|
func (m *validateOpDecodeAuthorizationMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
|
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
input, ok := in.Parameters.(*DecodeAuthorizationMessageInput)
|
|
if !ok {
|
|
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
|
}
|
|
if err := validateOpDecodeAuthorizationMessageInput(input); err != nil {
|
|
return out, metadata, err
|
|
}
|
|
return next.HandleInitialize(ctx, in)
|
|
}
|
|
|
|
type validateOpGetAccessKeyInfo struct {
|
|
}
|
|
|
|
func (*validateOpGetAccessKeyInfo) ID() string {
|
|
return "OperationInputValidation"
|
|
}
|
|
|
|
func (m *validateOpGetAccessKeyInfo) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
|
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
input, ok := in.Parameters.(*GetAccessKeyInfoInput)
|
|
if !ok {
|
|
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
|
}
|
|
if err := validateOpGetAccessKeyInfoInput(input); err != nil {
|
|
return out, metadata, err
|
|
}
|
|
return next.HandleInitialize(ctx, in)
|
|
}
|
|
|
|
type validateOpGetFederationToken struct {
|
|
}
|
|
|
|
func (*validateOpGetFederationToken) ID() string {
|
|
return "OperationInputValidation"
|
|
}
|
|
|
|
func (m *validateOpGetFederationToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
|
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
input, ok := in.Parameters.(*GetFederationTokenInput)
|
|
if !ok {
|
|
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
|
}
|
|
if err := validateOpGetFederationTokenInput(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)
|
|
}
|
|
|
|
func addOpAssumeRoleWithSAMLValidationMiddleware(stack *middleware.Stack) error {
|
|
return stack.Initialize.Add(&validateOpAssumeRoleWithSAML{}, middleware.After)
|
|
}
|
|
|
|
func addOpAssumeRoleWithWebIdentityValidationMiddleware(stack *middleware.Stack) error {
|
|
return stack.Initialize.Add(&validateOpAssumeRoleWithWebIdentity{}, middleware.After)
|
|
}
|
|
|
|
func addOpAssumeRootValidationMiddleware(stack *middleware.Stack) error {
|
|
return stack.Initialize.Add(&validateOpAssumeRoot{}, middleware.After)
|
|
}
|
|
|
|
func addOpDecodeAuthorizationMessageValidationMiddleware(stack *middleware.Stack) error {
|
|
return stack.Initialize.Add(&validateOpDecodeAuthorizationMessage{}, middleware.After)
|
|
}
|
|
|
|
func addOpGetAccessKeyInfoValidationMiddleware(stack *middleware.Stack) error {
|
|
return stack.Initialize.Add(&validateOpGetAccessKeyInfo{}, middleware.After)
|
|
}
|
|
|
|
func addOpGetFederationTokenValidationMiddleware(stack *middleware.Stack) error {
|
|
return stack.Initialize.Add(&validateOpGetFederationToken{}, middleware.After)
|
|
}
|
|
|
|
func validateTag(v *types.Tag) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "Tag"}
|
|
if v.Key == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("Key"))
|
|
}
|
|
if v.Value == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("Value"))
|
|
}
|
|
if invalidParams.Len() > 0 {
|
|
return invalidParams
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|
|
|
|
func validateTagListType(v []types.Tag) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "TagListType"}
|
|
for i := range v {
|
|
if err := validateTag(&v[i]); err != nil {
|
|
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
|
|
}
|
|
}
|
|
if invalidParams.Len() > 0 {
|
|
return invalidParams
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|
|
|
|
func validateOpAssumeRoleInput(v *AssumeRoleInput) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleInput"}
|
|
if v.RoleArn == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
|
|
}
|
|
if v.RoleSessionName == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("RoleSessionName"))
|
|
}
|
|
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
|
|
}
|
|
}
|
|
|
|
func validateOpAssumeRoleWithSAMLInput(v *AssumeRoleWithSAMLInput) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleWithSAMLInput"}
|
|
if v.RoleArn == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
|
|
}
|
|
if v.PrincipalArn == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
|
|
}
|
|
if v.SAMLAssertion == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("SAMLAssertion"))
|
|
}
|
|
if invalidParams.Len() > 0 {
|
|
return invalidParams
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|
|
|
|
func validateOpAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleWithWebIdentityInput"}
|
|
if v.RoleArn == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
|
|
}
|
|
if v.RoleSessionName == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("RoleSessionName"))
|
|
}
|
|
if v.WebIdentityToken == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("WebIdentityToken"))
|
|
}
|
|
if invalidParams.Len() > 0 {
|
|
return invalidParams
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|
|
|
|
func validateOpAssumeRootInput(v *AssumeRootInput) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "AssumeRootInput"}
|
|
if v.TargetPrincipal == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("TargetPrincipal"))
|
|
}
|
|
if v.TaskPolicyArn == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("TaskPolicyArn"))
|
|
}
|
|
if invalidParams.Len() > 0 {
|
|
return invalidParams
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|
|
|
|
func validateOpDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "DecodeAuthorizationMessageInput"}
|
|
if v.EncodedMessage == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("EncodedMessage"))
|
|
}
|
|
if invalidParams.Len() > 0 {
|
|
return invalidParams
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|
|
|
|
func validateOpGetAccessKeyInfoInput(v *GetAccessKeyInfoInput) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "GetAccessKeyInfoInput"}
|
|
if v.AccessKeyId == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId"))
|
|
}
|
|
if invalidParams.Len() > 0 {
|
|
return invalidParams
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|
|
|
|
func validateOpGetFederationTokenInput(v *GetFederationTokenInput) error {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
invalidParams := smithy.InvalidParamsError{Context: "GetFederationTokenInput"}
|
|
if v.Name == nil {
|
|
invalidParams.Add(smithy.NewErrParamRequired("Name"))
|
|
}
|
|
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
|
|
}
|
|
}
|