From 8882bcbafb01ce81d15871e4e4ccac37640acb48 Mon Sep 17 00:00:00 2001 From: Peter Rifel Date: Fri, 29 Mar 2024 20:59:05 -0500 Subject: [PATCH 1/2] Migrate IAM to aws-sdk-go-v2 --- cloudmock/aws/mockiam/api.go | 15 +- cloudmock/aws/mockiam/iaminstanceprofile.go | 132 ++++---------- cloudmock/aws/mockiam/iamrole.go | 115 +++--------- cloudmock/aws/mockiam/iamrolepolicy.go | 88 ++------- cloudmock/aws/mockiam/oidcprovider.go | 76 ++------ pkg/model/awsmodel/iam.go | 23 +-- pkg/model/awsmodel/oidc_provider.go | 10 +- pkg/model/iam/iam_builder_test.go | 2 +- pkg/resources/aws/aws.go | 171 +++++++++--------- pkg/resources/aws/aws_test.go | 32 ++-- pkg/testutils/integrationtestharness.go | 10 +- .../fi/cloudup/awstasks/iaminstanceprofile.go | 35 ++-- .../awstasks/iaminstanceprofilerole.go | 23 ++- .../fi/cloudup/awstasks/iamoidcprovider.go | 47 ++--- upup/pkg/fi/cloudup/awstasks/iamrole.go | 97 +++++----- upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go | 59 +++--- upup/pkg/fi/cloudup/awstasks/tags.go | 10 +- upup/pkg/fi/cloudup/awsup/aws_cloud.go | 22 +-- upup/pkg/fi/cloudup/awsup/mock_aws_cloud.go | 5 +- util/pkg/awsinterfaces/iam.go | 59 ++++++ 20 files changed, 443 insertions(+), 588 deletions(-) create mode 100644 util/pkg/awsinterfaces/iam.go diff --git a/cloudmock/aws/mockiam/api.go b/cloudmock/aws/mockiam/api.go index 622edd59a55c2..580903e17a967 100644 --- a/cloudmock/aws/mockiam/api.go +++ b/cloudmock/aws/mockiam/api.go @@ -21,23 +21,24 @@ import ( "math/rand" "sync" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" + "k8s.io/kops/util/pkg/awsinterfaces" ) type MockIAM struct { // Mock out interface - iamiface.IAMAPI + awsinterfaces.IAMAPI mutex sync.Mutex - InstanceProfiles map[string]*iam.InstanceProfile - Roles map[string]*iam.Role + InstanceProfiles map[string]*iamtypes.InstanceProfile + Roles map[string]*iamtypes.Role OIDCProviders map[string]*iam.GetOpenIDConnectProviderOutput RolePolicies []*rolePolicy - AttachedPolicies map[string][]*iam.AttachedPolicy + AttachedPolicies map[string][]iamtypes.AttachedPolicy } -var _ iamiface.IAMAPI = &MockIAM{} +var _ awsinterfaces.IAMAPI = &MockIAM{} func (m *MockIAM) createID() string { return "AID" + fmt.Sprintf("%x", rand.Int63()) diff --git a/cloudmock/aws/mockiam/iaminstanceprofile.go b/cloudmock/aws/mockiam/iaminstanceprofile.go index 92fca04ccbc7e..c88a62c91fe43 100644 --- a/cloudmock/aws/mockiam/iaminstanceprofile.go +++ b/cloudmock/aws/mockiam/iaminstanceprofile.go @@ -17,23 +17,23 @@ limitations under the License. package mockiam import ( + "context" "fmt" "strings" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/klog/v2" ) -func (m *MockIAM) GetInstanceProfile(request *iam.GetInstanceProfileInput) (*iam.GetInstanceProfileOutput, error) { +func (m *MockIAM) GetInstanceProfile(ctx context.Context, request *iam.GetInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.GetInstanceProfileOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() - ip := m.InstanceProfiles[aws.StringValue(request.InstanceProfileName)] - if ip == nil || strings.Contains(aws.StringValue(ip.InstanceProfileName), "__no_entity__") { - return nil, awserr.New(iam.ErrCodeNoSuchEntityException, "No such entity", nil) + ip, ok := m.InstanceProfiles[aws.ToString(request.InstanceProfileName)] + if !ok || strings.Contains(aws.ToString(ip.InstanceProfileName), "__no_entity__") { + return nil, &iamtypes.NoSuchEntityException{} } response := &iam.GetInstanceProfileOutput{ InstanceProfile: ip, @@ -41,21 +41,13 @@ func (m *MockIAM) GetInstanceProfile(request *iam.GetInstanceProfileInput) (*iam return response, nil } -func (m *MockIAM) GetInstanceProfileWithContext(aws.Context, *iam.GetInstanceProfileInput, ...request.Option) (*iam.GetInstanceProfileOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) GetInstanceProfileRequest(*iam.GetInstanceProfileInput) (*request.Request, *iam.GetInstanceProfileOutput) { - panic("Not implemented") -} - -func (m *MockIAM) CreateInstanceProfile(request *iam.CreateInstanceProfileInput) (*iam.CreateInstanceProfileOutput, error) { +func (m *MockIAM) CreateInstanceProfile(ctx context.Context, request *iam.CreateInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.CreateInstanceProfileOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("CreateInstanceProfile: %v", request) - p := &iam.InstanceProfile{ + p := iamtypes.InstanceProfile{ InstanceProfileName: request.InstanceProfileName, // Arn: request.Arn, // InstanceProfileId: request.InstanceProfileId, @@ -77,30 +69,22 @@ func (m *MockIAM) CreateInstanceProfile(request *iam.CreateInstanceProfileInput) // InstanceProfileId *string `min:"16" type:"string" required:"true"` if m.InstanceProfiles == nil { - m.InstanceProfiles = make(map[string]*iam.InstanceProfile) + m.InstanceProfiles = make(map[string]*iamtypes.InstanceProfile) } - m.InstanceProfiles[*p.InstanceProfileName] = p + m.InstanceProfiles[*p.InstanceProfileName] = &p - copy := *p + copy := p return &iam.CreateInstanceProfileOutput{InstanceProfile: ©}, nil } -func (m *MockIAM) CreateInstanceProfileWithContext(aws.Context, *iam.CreateInstanceProfileInput, ...request.Option) (*iam.CreateInstanceProfileOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) CreateInstanceProfileRequest(*iam.CreateInstanceProfileInput) (*request.Request, *iam.CreateInstanceProfileOutput) { - panic("Not implemented") -} - -func (m *MockIAM) TagInstanceProfile(request *iam.TagInstanceProfileInput) (*iam.TagInstanceProfileOutput, error) { +func (m *MockIAM) TagInstanceProfile(ctx context.Context, request *iam.TagInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.TagInstanceProfileOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("CreateInstanceProfile: %v", request) - ip := m.InstanceProfiles[aws.StringValue(request.InstanceProfileName)] - if ip == nil { + ip, ok := m.InstanceProfiles[aws.ToString(request.InstanceProfileName)] + if !ok { return nil, fmt.Errorf("InstanceProfile not found") } @@ -121,49 +105,41 @@ func (m *MockIAM) TagInstanceProfile(request *iam.TagInstanceProfileInput) (*iam return &iam.TagInstanceProfileOutput{}, nil } -func (m *MockIAM) AddRoleToInstanceProfile(request *iam.AddRoleToInstanceProfileInput) (*iam.AddRoleToInstanceProfileOutput, error) { +func (m *MockIAM) AddRoleToInstanceProfile(ctx context.Context, request *iam.AddRoleToInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.AddRoleToInstanceProfileOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("AddRoleToInstanceProfile: %v", request) - ip := m.InstanceProfiles[aws.StringValue(request.InstanceProfileName)] - if ip == nil { + ip, ok := m.InstanceProfiles[aws.ToString(request.InstanceProfileName)] + if !ok { return nil, fmt.Errorf("InstanceProfile not found") } - r := m.Roles[aws.StringValue(request.RoleName)] - if r == nil { + r, ok := m.Roles[aws.ToString(request.RoleName)] + if !ok { return nil, fmt.Errorf("Role not found") } - ip.Roles = append(ip.Roles, r) + ip.Roles = append(ip.Roles, *r) return &iam.AddRoleToInstanceProfileOutput{}, nil } -func (m *MockIAM) AddRoleToInstanceProfileWithContext(aws.Context, *iam.AddRoleToInstanceProfileInput, ...request.Option) (*iam.AddRoleToInstanceProfileOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) AddRoleToInstanceProfileRequest(*iam.AddRoleToInstanceProfileInput) (*request.Request, *iam.AddRoleToInstanceProfileOutput) { - panic("Not implemented") -} - -func (m *MockIAM) RemoveRoleFromInstanceProfile(request *iam.RemoveRoleFromInstanceProfileInput) (*iam.RemoveRoleFromInstanceProfileOutput, error) { +func (m *MockIAM) RemoveRoleFromInstanceProfile(ctx context.Context, request *iam.RemoveRoleFromInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.RemoveRoleFromInstanceProfileOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("RemoveRoleFromInstanceProfile: %v", request) - ip := m.InstanceProfiles[aws.StringValue(request.InstanceProfileName)] - if ip == nil { + ip, ok := m.InstanceProfiles[aws.ToString(request.InstanceProfileName)] + if !ok { return nil, fmt.Errorf("InstanceProfile not found") } found := false - var newRoles []*iam.Role + var newRoles []iamtypes.Role for _, role := range ip.Roles { - if aws.StringValue(role.RoleName) == aws.StringValue(request.RoleName) { + if aws.ToString(role.RoleName) == aws.ToString(request.RoleName) { found = true continue } @@ -178,15 +154,7 @@ func (m *MockIAM) RemoveRoleFromInstanceProfile(request *iam.RemoveRoleFromInsta return &iam.RemoveRoleFromInstanceProfileOutput{}, nil } -func (m *MockIAM) RemoveRoleFromInstanceProfileWithContext(aws.Context, *iam.RemoveRoleFromInstanceProfileInput, ...request.Option) (*iam.RemoveRoleFromInstanceProfileOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) RemoveRoleFromInstanceProfileRequest(*iam.RemoveRoleFromInstanceProfileInput) (*request.Request, *iam.RemoveRoleFromInstanceProfileOutput) { - panic("Not implemented") -} - -func (m *MockIAM) ListInstanceProfiles(request *iam.ListInstanceProfilesInput) (*iam.ListInstanceProfilesOutput, error) { +func (m *MockIAM) ListInstanceProfiles(ctx context.Context, request *iam.ListInstanceProfilesInput, optFns ...func(*iam.Options)) (*iam.ListInstanceProfilesOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() @@ -196,11 +164,11 @@ func (m *MockIAM) ListInstanceProfiles(request *iam.ListInstanceProfilesInput) ( klog.Fatalf("MockIAM ListInstanceProfiles PathPrefix not implemented") } - var instanceProfiles []*iam.InstanceProfile + var instanceProfiles []iamtypes.InstanceProfile for _, ip := range m.InstanceProfiles { copy := *ip - instanceProfiles = append(instanceProfiles, ©) + instanceProfiles = append(instanceProfiles, copy) } response := &iam.ListInstanceProfilesOutput{ @@ -210,50 +178,18 @@ func (m *MockIAM) ListInstanceProfiles(request *iam.ListInstanceProfilesInput) ( return response, nil } -func (m *MockIAM) ListInstanceProfilesWithContext(aws.Context, *iam.ListInstanceProfilesInput, ...request.Option) (*iam.ListInstanceProfilesOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) ListInstanceProfilesRequest(*iam.ListInstanceProfilesInput) (*request.Request, *iam.ListInstanceProfilesOutput) { - panic("Not implemented") -} - -func (m *MockIAM) ListInstanceProfilesPages(request *iam.ListInstanceProfilesInput, callback func(*iam.ListInstanceProfilesOutput, bool) bool) error { - // For the mock, we just send everything in one page - page, err := m.ListInstanceProfiles(request) - if err != nil { - return err - } - - callback(page, false) - - return nil -} - -func (m *MockIAM) ListInstanceProfilesPagesWithContext(aws.Context, *iam.ListInstanceProfilesInput, func(*iam.ListInstanceProfilesOutput, bool) bool, ...request.Option) error { - panic("Not implemented") -} - -func (m *MockIAM) DeleteInstanceProfile(request *iam.DeleteInstanceProfileInput) (*iam.DeleteInstanceProfileOutput, error) { +func (m *MockIAM) DeleteInstanceProfile(ctx context.Context, request *iam.DeleteInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.DeleteInstanceProfileOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("DeleteInstanceProfile: %v", request) - id := aws.StringValue(request.InstanceProfileName) - o := m.InstanceProfiles[id] - if o == nil { + id := aws.ToString(request.InstanceProfileName) + _, ok := m.InstanceProfiles[id] + if !ok { return nil, fmt.Errorf("InstanceProfile %q not found", id) } delete(m.InstanceProfiles, id) return &iam.DeleteInstanceProfileOutput{}, nil } - -func (m *MockIAM) DeleteInstanceProfileWithContext(aws.Context, *iam.DeleteInstanceProfileInput, ...request.Option) (*iam.DeleteInstanceProfileOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) DeleteInstanceProfileRequest(*iam.DeleteInstanceProfileInput) (*request.Request, *iam.DeleteInstanceProfileOutput) { - panic("Not implemented") -} diff --git a/cloudmock/aws/mockiam/iamrole.go b/cloudmock/aws/mockiam/iamrole.go index dd92a475b7f4e..f8143b6211495 100644 --- a/cloudmock/aws/mockiam/iamrole.go +++ b/cloudmock/aws/mockiam/iamrole.go @@ -17,22 +17,22 @@ limitations under the License. package mockiam import ( + "context" "fmt" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/klog/v2" ) -func (m *MockIAM) GetRole(request *iam.GetRoleInput) (*iam.GetRoleOutput, error) { +func (m *MockIAM) GetRole(ctx context.Context, request *iam.GetRoleInput, optFns ...func(*iam.Options)) (*iam.GetRoleOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() - role := m.Roles[aws.StringValue(request.RoleName)] - if role == nil { - return nil, awserr.New(iam.ErrCodeNoSuchEntityException, "No such entity", nil) + role, ok := m.Roles[aws.ToString(request.RoleName)] + if !ok { + return nil, &iamtypes.NoSuchEntityException{} } response := &iam.GetRoleOutput{ Role: role, @@ -40,24 +40,16 @@ func (m *MockIAM) GetRole(request *iam.GetRoleInput) (*iam.GetRoleOutput, error) return response, nil } -func (m *MockIAM) GetRoleWithContext(aws.Context, *iam.GetRoleInput, ...request.Option) (*iam.GetRoleOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) GetRoleRequest(*iam.GetRoleInput) (*request.Request, *iam.GetRoleOutput) { - panic("Not implemented") -} - -func (m *MockIAM) CreateRole(request *iam.CreateRoleInput) (*iam.CreateRoleOutput, error) { +func (m *MockIAM) CreateRole(ctx context.Context, request *iam.CreateRoleInput, optFns ...func(*iam.Options)) (*iam.CreateRoleOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() roleID := m.createID() - r := &iam.Role{ + r := iamtypes.Role{ AssumeRolePolicyDocument: request.AssumeRolePolicyDocument, Description: request.Description, Path: request.Path, - PermissionsBoundary: &iam.AttachedPermissionsBoundary{ + PermissionsBoundary: &iamtypes.AttachedPermissionsBoundary{ PermissionsBoundaryArn: request.PermissionsBoundary, }, RoleName: request.RoleName, @@ -66,23 +58,15 @@ func (m *MockIAM) CreateRole(request *iam.CreateRoleInput) (*iam.CreateRoleOutpu } if m.Roles == nil { - m.Roles = make(map[string]*iam.Role) + m.Roles = make(map[string]*iamtypes.Role) } - m.Roles[*r.RoleName] = r + m.Roles[*r.RoleName] = &r - copy := *r + copy := r return &iam.CreateRoleOutput{Role: ©}, nil } -func (m *MockIAM) CreateRoleWithContext(aws.Context, *iam.CreateRoleInput, ...request.Option) (*iam.CreateRoleOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) CreateRoleRequest(*iam.CreateRoleInput) (*request.Request, *iam.CreateRoleOutput) { - panic("Not implemented") -} - -func (m *MockIAM) ListRoles(request *iam.ListRolesInput) (*iam.ListRolesOutput, error) { +func (m *MockIAM) ListRoles(ctx context.Context, request *iam.ListRolesInput, optFns ...func(*iam.Options)) (*iam.ListRolesOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() @@ -92,11 +76,11 @@ func (m *MockIAM) ListRoles(request *iam.ListRolesInput) (*iam.ListRolesOutput, klog.Fatalf("MockIAM ListRoles PathPrefix not implemented") } - var roles []*iam.Role + var roles []iamtypes.Role for _, r := range m.Roles { copy := *r - roles = append(roles, ©) + roles = append(roles, copy) } response := &iam.ListRolesOutput{ @@ -106,39 +90,15 @@ func (m *MockIAM) ListRoles(request *iam.ListRolesInput) (*iam.ListRolesOutput, return response, nil } -func (m *MockIAM) ListRolesWithContext(aws.Context, *iam.ListRolesInput, ...request.Option) (*iam.ListRolesOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) ListRolesRequest(*iam.ListRolesInput) (*request.Request, *iam.ListRolesOutput) { - panic("Not implemented") -} - -func (m *MockIAM) ListRolesPages(request *iam.ListRolesInput, callback func(*iam.ListRolesOutput, bool) bool) error { - // For the mock, we just send everything in one page - page, err := m.ListRoles(request) - if err != nil { - return err - } - - callback(page, false) - - return nil -} - -func (m *MockIAM) ListRolesPagesWithContext(aws.Context, *iam.ListRolesInput, func(*iam.ListRolesOutput, bool) bool, ...request.Option) error { - panic("Not implemented") -} - -func (m *MockIAM) DeleteRole(request *iam.DeleteRoleInput) (*iam.DeleteRoleOutput, error) { +func (m *MockIAM) DeleteRole(ctx context.Context, request *iam.DeleteRoleInput, optFns ...func(*iam.Options)) (*iam.DeleteRoleOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("DeleteRole: %v", request) - id := aws.StringValue(request.RoleName) - o := m.Roles[id] - if o == nil { + id := aws.ToString(request.RoleName) + _, ok := m.Roles[id] + if !ok { return nil, fmt.Errorf("Role %q not found", id) } delete(m.Roles, id) @@ -146,23 +106,15 @@ func (m *MockIAM) DeleteRole(request *iam.DeleteRoleInput) (*iam.DeleteRoleOutpu return &iam.DeleteRoleOutput{}, nil } -func (m *MockIAM) DeleteRoleWithContext(aws.Context, *iam.DeleteRoleInput, ...request.Option) (*iam.DeleteRoleOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) DeleteRoleRequest(*iam.DeleteRoleInput) (*request.Request, *iam.DeleteRoleOutput) { - panic("Not implemented") -} - -func (m *MockIAM) ListAttachedRolePolicies(input *iam.ListAttachedRolePoliciesInput) (*iam.ListAttachedRolePoliciesOutput, error) { +func (m *MockIAM) ListAttachedRolePolicies(ctx context.Context, request *iam.ListAttachedRolePoliciesInput, optFns ...func(*iam.Options)) (*iam.ListAttachedRolePoliciesOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() - klog.Infof("ListAttachedRolePolicies: %s", aws.StringValue(input.RoleName)) + klog.Infof("ListAttachedRolePolicies: %s", aws.ToString(request.RoleName)) for _, r := range m.Roles { - if r.RoleName == input.RoleName { - role := aws.StringValue(r.RoleName) + if r.RoleName == request.RoleName { + role := aws.ToString(r.RoleName) return &iam.ListAttachedRolePoliciesOutput{ AttachedPolicies: m.AttachedPolicies[role], @@ -172,20 +124,3 @@ func (m *MockIAM) ListAttachedRolePolicies(input *iam.ListAttachedRolePoliciesIn return &iam.ListAttachedRolePoliciesOutput{}, nil } - -func (m *MockIAM) ListAttachedRolePoliciesPages(input *iam.ListAttachedRolePoliciesInput, pager func(*iam.ListAttachedRolePoliciesOutput, bool) bool) error { - m.mutex.Lock() - defer m.mutex.Unlock() - - klog.Infof("ListAttachedRolePolicies: %s", aws.StringValue(input.RoleName)) - - role := aws.StringValue(input.RoleName) - - if pager(&iam.ListAttachedRolePoliciesOutput{ - AttachedPolicies: m.AttachedPolicies[role], - }, true) { - return nil - } - - return nil -} diff --git a/cloudmock/aws/mockiam/iamrolepolicy.go b/cloudmock/aws/mockiam/iamrolepolicy.go index f58ee52391a40..e3102c6826f4a 100644 --- a/cloudmock/aws/mockiam/iamrolepolicy.go +++ b/cloudmock/aws/mockiam/iamrolepolicy.go @@ -17,12 +17,12 @@ limitations under the License. package mockiam import ( + "context" "fmt" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/klog/v2" ) @@ -32,16 +32,16 @@ type rolePolicy struct { RoleName string } -func (m *MockIAM) GetRolePolicy(request *iam.GetRolePolicyInput) (*iam.GetRolePolicyOutput, error) { +func (m *MockIAM) GetRolePolicy(ctx context.Context, request *iam.GetRolePolicyInput, optFns ...func(*iam.Options)) (*iam.GetRolePolicyOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() for _, rp := range m.RolePolicies { - if rp.PolicyName != aws.StringValue(request.PolicyName) { + if rp.PolicyName != aws.ToString(request.PolicyName) { // TODO: check regex? continue } - if rp.RoleName != aws.StringValue(request.RoleName) { + if rp.RoleName != aws.ToString(request.RoleName) { // TODO: check regex? continue } @@ -53,55 +53,39 @@ func (m *MockIAM) GetRolePolicy(request *iam.GetRolePolicyInput) (*iam.GetRolePo } return response, nil } - return nil, awserr.New(iam.ErrCodeNoSuchEntityException, "No such entity", nil) + return nil, &iamtypes.NoSuchEntityException{} } -func (m *MockIAM) GetRolePolicyWithContext(aws.Context, *iam.GetRolePolicyInput, ...request.Option) (*iam.GetRolePolicyOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) GetRolePolicyRequest(*iam.GetRolePolicyInput) (*request.Request, *iam.GetRolePolicyOutput) { - panic("Not implemented") -} - -func (m *MockIAM) PutRolePolicy(request *iam.PutRolePolicyInput) (*iam.PutRolePolicyOutput, error) { +func (m *MockIAM) PutRolePolicy(ctx context.Context, request *iam.PutRolePolicyInput, optFns ...func(*iam.Options)) (*iam.PutRolePolicyOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("PutRolePolicy: %v", request) for _, rp := range m.RolePolicies { - if rp.PolicyName != aws.StringValue(request.PolicyName) { + if rp.PolicyName != aws.ToString(request.PolicyName) { // TODO: check regex? continue } - if rp.RoleName != aws.StringValue(request.RoleName) { + if rp.RoleName != aws.ToString(request.RoleName) { // TODO: check regex? continue } - rp.PolicyDocument = aws.StringValue(request.PolicyDocument) + rp.PolicyDocument = aws.ToString(request.PolicyDocument) return &iam.PutRolePolicyOutput{}, nil } m.RolePolicies = append(m.RolePolicies, &rolePolicy{ - PolicyDocument: aws.StringValue(request.PolicyDocument), - PolicyName: aws.StringValue(request.PolicyName), - RoleName: aws.StringValue(request.RoleName), + PolicyDocument: aws.ToString(request.PolicyDocument), + PolicyName: aws.ToString(request.PolicyName), + RoleName: aws.ToString(request.RoleName), }) return &iam.PutRolePolicyOutput{}, nil } -func (m *MockIAM) PutRolePolicyWithContext(aws.Context, *iam.PutRolePolicyInput, ...request.Option) (*iam.PutRolePolicyOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) PutRolePolicyRequest(*iam.PutRolePolicyInput) (*request.Request, *iam.PutRolePolicyOutput) { - panic("Not implemented") -} - -func (m *MockIAM) ListRolePolicies(request *iam.ListRolePoliciesInput) (*iam.ListRolePoliciesOutput, error) { +func (m *MockIAM) ListRolePolicies(ctx context.Context, request *iam.ListRolePoliciesInput, optFns ...func(*iam.Options)) (*iam.ListRolePoliciesOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() @@ -111,7 +95,7 @@ func (m *MockIAM) ListRolePolicies(request *iam.ListRolePoliciesInput) (*iam.Lis for _, r := range m.RolePolicies { if request.RoleName != nil { - if r.RoleName != aws.StringValue(request.RoleName) { + if r.RoleName != aws.ToString(request.RoleName) { continue } } @@ -119,37 +103,13 @@ func (m *MockIAM) ListRolePolicies(request *iam.ListRolePoliciesInput) (*iam.Lis } response := &iam.ListRolePoliciesOutput{ - PolicyNames: aws.StringSlice(policyNames), + PolicyNames: policyNames, } return response, nil } -func (m *MockIAM) ListRolePoliciesWithContext(aws.Context, *iam.ListRolePoliciesInput, ...request.Option) (*iam.ListRolePoliciesOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) ListRolePoliciesRequest(*iam.ListRolePoliciesInput) (*request.Request, *iam.ListRolePoliciesOutput) { - panic("Not implemented") -} - -func (m *MockIAM) ListRolePoliciesPages(request *iam.ListRolePoliciesInput, callback func(*iam.ListRolePoliciesOutput, bool) bool) error { - // For the mock, we just send everything in one page - page, err := m.ListRolePolicies(request) - if err != nil { - return err - } - - callback(page, false) - - return nil -} - -func (m *MockIAM) ListRolePoliciesPagesWithContext(aws.Context, *iam.ListRolePoliciesInput, func(*iam.ListRolePoliciesOutput, bool) bool, ...request.Option) error { - panic("Not implemented") -} - -func (m *MockIAM) DeleteRolePolicy(request *iam.DeleteRolePolicyInput) (*iam.DeleteRolePolicyOutput, error) { +func (m *MockIAM) DeleteRolePolicy(ctx context.Context, request *iam.DeleteRolePolicyInput, optFns ...func(*iam.Options)) (*iam.DeleteRolePolicyOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() @@ -158,7 +118,7 @@ func (m *MockIAM) DeleteRolePolicy(request *iam.DeleteRolePolicyInput) (*iam.Del found := false var newRolePolicies []*rolePolicy for _, rp := range m.RolePolicies { - if rp.PolicyName == aws.StringValue(request.PolicyName) && rp.RoleName == aws.StringValue(request.RoleName) { + if rp.PolicyName == aws.ToString(request.PolicyName) && rp.RoleName == aws.ToString(request.RoleName) { found = true continue } @@ -171,11 +131,3 @@ func (m *MockIAM) DeleteRolePolicy(request *iam.DeleteRolePolicyInput) (*iam.Del return &iam.DeleteRolePolicyOutput{}, nil } - -func (m *MockIAM) DeleteRolePolicyWithContext(aws.Context, *iam.DeleteRolePolicyInput, ...request.Option) (*iam.DeleteRolePolicyOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) DeleteRolePolicyRequest(*iam.DeleteRolePolicyInput) (*request.Request, *iam.DeleteRolePolicyOutput) { - panic("Not implemented") -} diff --git a/cloudmock/aws/mockiam/oidcprovider.go b/cloudmock/aws/mockiam/oidcprovider.go index 1334eee5f3274..1a43822b7bffe 100644 --- a/cloudmock/aws/mockiam/oidcprovider.go +++ b/cloudmock/aws/mockiam/oidcprovider.go @@ -20,19 +20,19 @@ import ( "context" "fmt" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/klog/v2" ) -func (m *MockIAM) ListOpenIDConnectProviders(request *iam.ListOpenIDConnectProvidersInput) (*iam.ListOpenIDConnectProvidersOutput, error) { +func (m *MockIAM) ListOpenIDConnectProviders(ctx context.Context, params *iam.ListOpenIDConnectProvidersInput, optFns ...func(*iam.Options)) (*iam.ListOpenIDConnectProvidersOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() - providers := make([]*iam.OpenIDConnectProviderListEntry, 0) + providers := make([]iamtypes.OpenIDConnectProviderListEntry, 0) for arn := range m.OIDCProviders { - providers = append(providers, &iam.OpenIDConnectProviderListEntry{ + providers = append(providers, iamtypes.OpenIDConnectProviderListEntry{ Arn: &arn, }) } @@ -42,22 +42,14 @@ func (m *MockIAM) ListOpenIDConnectProviders(request *iam.ListOpenIDConnectProvi return response, nil } -func (m *MockIAM) ListOpenIDConnectProvidersWithContext(aws.Context, *iam.ListOpenIDConnectProvidersInput, ...request.Option) (*iam.ListOpenIDConnectProvidersOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) ListOpenIDConnectProvidersRequest(*iam.ListOpenIDConnectProvidersInput) (*request.Request, *iam.ListOpenIDConnectProvidersOutput) { - panic("Not implemented") -} - -func (m *MockIAM) GetOpenIDConnectProviderWithContext(ctx aws.Context, request *iam.GetOpenIDConnectProviderInput, options ...request.Option) (*iam.GetOpenIDConnectProviderOutput, error) { +func (m *MockIAM) GetOpenIDConnectProvider(ctx context.Context, request *iam.GetOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.GetOpenIDConnectProviderOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() - arn := aws.StringValue(request.OpenIDConnectProviderArn) + arn := aws.ToString(request.OpenIDConnectProviderArn) - provider := m.OIDCProviders[arn] - if provider == nil { + provider, ok := m.OIDCProviders[arn] + if !ok { return nil, fmt.Errorf("OpenIDConnectProvider with arn=%q not found", arn) } @@ -71,15 +63,7 @@ func (m *MockIAM) GetOpenIDConnectProviderWithContext(ctx aws.Context, request * return response, nil } -func (m *MockIAM) GetOpenIDConnectProvider(request *iam.GetOpenIDConnectProviderInput) (*iam.GetOpenIDConnectProviderOutput, error) { - return m.GetOpenIDConnectProviderWithContext(context.Background(), request) -} - -func (m *MockIAM) GetOpenIDConnectProviderRequest(*iam.GetOpenIDConnectProviderInput) (*request.Request, *iam.GetOpenIDConnectProviderOutput) { - panic("Not implemented") -} - -func (m *MockIAM) CreateOpenIDConnectProvider(request *iam.CreateOpenIDConnectProviderInput) (*iam.CreateOpenIDConnectProviderOutput, error) { +func (m *MockIAM) CreateOpenIDConnectProvider(ctx context.Context, request *iam.CreateOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.CreateOpenIDConnectProviderOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() @@ -87,7 +71,7 @@ func (m *MockIAM) CreateOpenIDConnectProvider(request *iam.CreateOpenIDConnectPr arn := fmt.Sprintf("arn:aws-test:iam::0000000000:oidc-provider/%s", *request.Url) - p := &iam.GetOpenIDConnectProviderOutput{ + p := iam.GetOpenIDConnectProviderOutput{ ClientIDList: request.ClientIDList, Tags: request.Tags, ThumbprintList: request.ThumbprintList, @@ -97,28 +81,20 @@ func (m *MockIAM) CreateOpenIDConnectProvider(request *iam.CreateOpenIDConnectPr if m.OIDCProviders == nil { m.OIDCProviders = make(map[string]*iam.GetOpenIDConnectProviderOutput) } - m.OIDCProviders[arn] = p + m.OIDCProviders[arn] = &p return &iam.CreateOpenIDConnectProviderOutput{OpenIDConnectProviderArn: &arn}, nil } -func (m *MockIAM) CreateOpenIDConnectProviderWithContext(aws.Context, *iam.CreateOpenIDConnectProviderInput, ...request.Option) (*iam.CreateOpenIDConnectProviderOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) CreateOpenIDConnectProviderRequest(*iam.CreateOpenIDConnectProviderInput) (*request.Request, *iam.CreateOpenIDConnectProviderOutput) { - panic("Not implemented") -} - -func (m *MockIAM) DeleteOpenIDConnectProvider(request *iam.DeleteOpenIDConnectProviderInput) (*iam.DeleteOpenIDConnectProviderOutput, error) { +func (m *MockIAM) DeleteOpenIDConnectProvider(ctx context.Context, request *iam.DeleteOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.DeleteOpenIDConnectProviderOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("DeleteOpenIDConnectProvider: %v", request) - arn := aws.StringValue(request.OpenIDConnectProviderArn) - o := m.OIDCProviders[arn] - if o == nil { + arn := aws.ToString(request.OpenIDConnectProviderArn) + _, ok := m.OIDCProviders[arn] + if !ok { return nil, fmt.Errorf("OIDCProvider %q not found", arn) } delete(m.OIDCProviders, arn) @@ -126,22 +102,6 @@ func (m *MockIAM) DeleteOpenIDConnectProvider(request *iam.DeleteOpenIDConnectPr return &iam.DeleteOpenIDConnectProviderOutput{}, nil } -func (m *MockIAM) DeleteOpenIDConnectProviderWithContext(aws.Context, *iam.DeleteOpenIDConnectProviderInput, ...request.Option) (*iam.DeleteOpenIDConnectProviderOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) DeleteOpenIDConnectProviderRequest(*iam.DeleteOpenIDConnectProviderInput) (*request.Request, *iam.DeleteOpenIDConnectProviderOutput) { - panic("Not implemented") -} - -func (m *MockIAM) UpdateOpenIDConnectProviderThumbprint(*iam.UpdateOpenIDConnectProviderThumbprintInput) (*iam.UpdateOpenIDConnectProviderThumbprintOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) UpdateOpenIDConnectProviderThumbprintWithContext(aws.Context, *iam.UpdateOpenIDConnectProviderThumbprintInput, ...request.Option) (*iam.UpdateOpenIDConnectProviderThumbprintOutput, error) { - panic("Not implemented") -} - -func (m *MockIAM) UpdateOpenIDConnectProviderThumbprintRequest(*iam.UpdateOpenIDConnectProviderThumbprintInput) (*request.Request, *iam.UpdateOpenIDConnectProviderThumbprintOutput) { +func (m *MockIAM) UpdateOpenIDConnectProviderThumbprint(ctx context.Context, params *iam.UpdateOpenIDConnectProviderThumbprintInput, optFns ...func(*iam.Options)) (*iam.UpdateOpenIDConnectProviderThumbprintOutput, error) { panic("Not implemented") } diff --git a/pkg/model/awsmodel/iam.go b/pkg/model/awsmodel/iam.go index 7b2ef5434dd91..b5f47ed40845c 100644 --- a/pkg/model/awsmodel/iam.go +++ b/pkg/model/awsmodel/iam.go @@ -21,8 +21,8 @@ import ( "sort" "strings" + awsIam "github.com/aws/aws-sdk-go-v2/service/iam" "github.com/aws/aws-sdk-go/aws/endpoints" - awsIam "github.com/aws/aws-sdk-go/service/iam" "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" "k8s.io/kops/pkg/apis/kops" @@ -473,20 +473,25 @@ func (b *IAMModelBuilder) buildAWSIAMRolePolicy(role iam.Subject) (fi.Resource, } func (b *IAMModelBuilder) FindDeletions(context *fi.CloudupModelBuilderContext, cloud fi.Cloud) error { + ctx := context.Context() iamapi := cloud.(awsup.AWSCloud).IAM() ownershipTag := "kubernetes.io/cluster/" + b.Cluster.ObjectMeta.Name request := &awsIam.ListRolesInput{} var getRoleErr error - err := iamapi.ListRolesPages(request, func(p *awsIam.ListRolesOutput, lastPage bool) bool { - for _, role := range p.Roles { + paginator := awsIam.NewListRolesPaginator(iamapi, request) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + return fmt.Errorf("listing IAM roles: %w", err) + } + for _, role := range page.Roles { if !strings.HasSuffix(fi.ValueOf(role.RoleName), "."+b.Cluster.ObjectMeta.Name) { continue } getRequest := &awsIam.GetRoleInput{RoleName: role.RoleName} - roleOutput, err := iamapi.GetRole(getRequest) + roleOutput, err := iamapi.GetRole(ctx, getRequest) if err != nil { - getRoleErr = fmt.Errorf("calling IAM GetRole on %s: %w", fi.ValueOf(role.RoleName), err) - return false + return fmt.Errorf("calling IAM GetRole on %s: %w", fi.ValueOf(role.RoleName), err) } for _, tag := range roleOutput.Role.Tags { if fi.ValueOf(tag.Key) == ownershipTag && fi.ValueOf(tag.Value) == "owned" { @@ -500,13 +505,9 @@ func (b *IAMModelBuilder) FindDeletions(context *fi.CloudupModelBuilderContext, } } } - return true - }) + } if getRoleErr != nil { return getRoleErr } - if err != nil { - return fmt.Errorf("listing IAM roles: %w", err) - } return nil } diff --git a/pkg/model/awsmodel/oidc_provider.go b/pkg/model/awsmodel/oidc_provider.go index 5ae07b3308263..8986613213d81 100644 --- a/pkg/model/awsmodel/oidc_provider.go +++ b/pkg/model/awsmodel/oidc_provider.go @@ -42,12 +42,6 @@ func (b *OIDCProviderBuilder) Build(c *fi.CloudupModelBuilderContext) error { fingerprints := getFingerprints() - thumbprints := []*string{} - - for _, fingerprint := range fingerprints { - thumbprints = append(thumbprints, fi.PtrTo(fingerprint)) - } - audiences := []string{defaultAudience} if b.Cluster.Spec.ServiceAccountIssuerDiscovery.AdditionalAudiences != nil { audiences = append(audiences, b.Cluster.Spec.ServiceAccountIssuerDiscovery.AdditionalAudiences...) @@ -57,9 +51,9 @@ func (b *OIDCProviderBuilder) Build(c *fi.CloudupModelBuilderContext) error { Name: fi.PtrTo(b.ClusterName()), Lifecycle: b.Lifecycle, URL: b.Cluster.Spec.KubeAPIServer.ServiceAccountIssuer, - ClientIDs: fi.StringSlice(audiences), + ClientIDs: audiences, Tags: b.CloudTags(b.ClusterName(), false), - Thumbprints: thumbprints, + Thumbprints: fingerprints, }) return nil diff --git a/pkg/model/iam/iam_builder_test.go b/pkg/model/iam/iam_builder_test.go index d7d3b2828542c..9b9fa2625dfb8 100644 --- a/pkg/model/iam/iam_builder_test.go +++ b/pkg/model/iam/iam_builder_test.go @@ -20,7 +20,7 @@ import ( "encoding/json" "testing" - "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go-v2/aws" "k8s.io/apimachinery/pkg/types" "k8s.io/kops/pkg/apis/kops" diff --git a/pkg/resources/aws/aws.go b/pkg/resources/aws/aws.go index 2e688225f9959..0414b6172017a 100644 --- a/pkg/resources/aws/aws.go +++ b/pkg/resources/aws/aws.go @@ -23,14 +23,15 @@ import ( "strings" "sync" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elb" "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/route53" + "github.com/aws/smithy-go" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog/v2" "k8s.io/kops/pkg/dns" @@ -300,7 +301,7 @@ func matchesElbV2Tags(tags map[string]string, actual []*elbv2.Tag) bool { return true } -func matchesIAMTags(tags map[string]string, actual []*iam.Tag) bool { +func matchesIAMTags(tags map[string]string, actual []iamtypes.Tag) bool { for k, v := range tags { found := false for _, a := range actual { @@ -1827,7 +1828,8 @@ func ListRoute53Records(cloud fi.Cloud, vpcID, clusterName string) ([]*resources } func DeleteIAMRole(cloud fi.Cloud, r *resources.Resource) error { - var attachedPolicies []*iam.AttachedPolicy + ctx := context.TODO() + var attachedPolicies []iamtypes.AttachedPolicy var policyNames []string c := cloud.(awsup.AWSCloud) @@ -1838,19 +1840,20 @@ func DeleteIAMRole(cloud fi.Cloud, r *resources.Resource) error { request := &iam.ListRolePoliciesInput{ RoleName: aws.String(roleName), } - err := c.IAM().ListRolePoliciesPages(request, func(page *iam.ListRolePoliciesOutput, lastPage bool) bool { - for _, policy := range page.PolicyNames { - policyNames = append(policyNames, aws.StringValue(policy)) + paginator := iam.NewListRolePoliciesPaginator(c.IAM(), request) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy %q; will treat as already-deleted", roleName) + return nil + } + return fmt.Errorf("error listing IAM role policies for %q: %v", roleName, err) } - return true - }) - if err != nil { - if awsup.AWSErrorCode(err) == iam.ErrCodeNoSuchEntityException { - klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy %q; will treat as already-deleted", roleName) - return nil + for _, policy := range page.PolicyNames { + policyNames = append(policyNames, policy) } - - return fmt.Errorf("error listing IAM role policies for %q: %v", roleName, err) } } @@ -1859,17 +1862,18 @@ func DeleteIAMRole(cloud fi.Cloud, r *resources.Resource) error { request := &iam.ListAttachedRolePoliciesInput{ RoleName: aws.String(roleName), } - err := c.IAM().ListAttachedRolePoliciesPages(request, func(page *iam.ListAttachedRolePoliciesOutput, lastPage bool) bool { - attachedPolicies = append(attachedPolicies, page.AttachedPolicies...) - return true - }) - if err != nil { - if awsup.AWSErrorCode(err) == iam.ErrCodeNoSuchEntityException { - klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy %q; will treat as already-detached", roleName) - return nil + paginator := iam.NewListAttachedRolePoliciesPaginator(c.IAM(), request) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy %q; will treat as already-deleted", roleName) + return nil + } + return fmt.Errorf("error listing IAM role policies for %q: %v", roleName, err) } - - return fmt.Errorf("error listing IAM role policies for %q: %v", roleName, err) + attachedPolicies = append(attachedPolicies, page.AttachedPolicies...) } } @@ -1880,7 +1884,7 @@ func DeleteIAMRole(cloud fi.Cloud, r *resources.Resource) error { RoleName: aws.String(r.Name), PolicyName: aws.String(policyName), } - _, err := c.IAM().DeleteRolePolicy(request) + _, err := c.IAM().DeleteRolePolicy(ctx, request) if err != nil { return fmt.Errorf("error deleting IAM role policy %q %q: %v", roleName, policyName, err) } @@ -1888,12 +1892,12 @@ func DeleteIAMRole(cloud fi.Cloud, r *resources.Resource) error { // Detach Managed Policies for _, policy := range attachedPolicies { - klog.V(2).Infof("Detaching IAM role policy %q %q", roleName, policy) + klog.V(2).Infof("Detaching IAM role policy %q %v", roleName, policy) request := &iam.DetachRolePolicyInput{ RoleName: aws.String(r.Name), PolicyArn: policy.PolicyArn, } - _, err := c.IAM().DetachRolePolicy(request) + _, err := c.IAM().DetachRolePolicy(ctx, request) if err != nil { return fmt.Errorf("error detaching IAM role policy %q %q: %v", roleName, *policy.PolicyArn, err) } @@ -1905,7 +1909,7 @@ func DeleteIAMRole(cloud fi.Cloud, r *resources.Resource) error { request := &iam.DeleteRoleInput{ RoleName: aws.String(r.Name), } - _, err := c.IAM().DeleteRole(request) + _, err := c.IAM().DeleteRole(ctx, request) if err != nil { return fmt.Errorf("error deleting IAM role %q: %v", r.Name, err) } @@ -1915,33 +1919,35 @@ func DeleteIAMRole(cloud fi.Cloud, r *resources.Resource) error { } func ListIAMRoles(cloud fi.Cloud, vpcID, clusterName string) ([]*resources.Resource, error) { + ctx := context.TODO() c := cloud.(awsup.AWSCloud) var resourceTrackers []*resources.Resource // Find roles owned by the cluster { - var getRoleErr error ownershipTag := "kubernetes.io/cluster/" + clusterName request := &iam.ListRolesInput{} - err := c.IAM().ListRolesPages(request, func(p *iam.ListRolesOutput, lastPage bool) bool { - for _, r := range p.Roles { + paginator := iam.NewListRolesPaginator(c.IAM(), request) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + return nil, fmt.Errorf("error listing IAM roles: %v", err) + } + for _, r := range page.Roles { name := aws.StringValue(r.RoleName) getRequest := &iam.GetRoleInput{RoleName: r.RoleName} - roleOutput, err := c.IAM().GetRole(getRequest) + roleOutput, err := c.IAM().GetRole(ctx, getRequest) if err != nil { - if awserror, ok := err.(awserr.RequestFailure); ok { - if awserror.StatusCode() == 403 { - klog.Warningf("failed to determine ownership of %q: %v", *r.RoleName, awserror) - - continue - } else if awsup.AWSErrorCode(err) == iam.ErrCodeNoSuchEntityException { - klog.Warningf("could not find role %q. Resource may already have been deleted: %v", name, awserror) - continue - } + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.Warningf("could not find role %q. Resource may already have been deleted: %v", name, nse) + continue + } else if awserror, ok := err.(smithy.APIError); ok && awserror.ErrorCode() == "403" { + klog.Warningf("failed to determine ownership of %q: %v", name, awserror) + continue } - getRoleErr = fmt.Errorf("calling IAM GetRole on %s: %w", name, err) - return false + return nil, fmt.Errorf("calling IAM GetRole on %s: %w", name, err) } for _, tag := range roleOutput.Role.Tags { if fi.ValueOf(tag.Key) == ownershipTag && fi.ValueOf(tag.Value) == "owned" { @@ -1955,13 +1961,6 @@ func ListIAMRoles(cloud fi.Cloud, vpcID, clusterName string) ([]*resources.Resou } } } - return true - }) - if getRoleErr != nil { - return nil, getRoleErr - } - if err != nil { - return nil, fmt.Errorf("error listing IAM roles: %v", err) } } @@ -1969,9 +1968,10 @@ func ListIAMRoles(cloud fi.Cloud, vpcID, clusterName string) ([]*resources.Resou } func DeleteIAMInstanceProfile(cloud fi.Cloud, r *resources.Resource) error { + ctx := context.TODO() c := cloud.(awsup.AWSCloud) - profile := r.Obj.(*iam.InstanceProfile) + profile := r.Obj.(iamtypes.InstanceProfile) name := aws.StringValue(profile.InstanceProfileName) // Remove roles @@ -1982,7 +1982,7 @@ func DeleteIAMInstanceProfile(cloud fi.Cloud, r *resources.Resource) error { InstanceProfileName: profile.InstanceProfileName, RoleName: role.RoleName, } - _, err := c.IAM().RemoveRoleFromInstanceProfile(request) + _, err := c.IAM().RemoveRoleFromInstanceProfile(ctx, request) if err != nil { return fmt.Errorf("error removing role %q from IAM instance profile %q: %v", aws.StringValue(role.RoleName), name, err) } @@ -1995,7 +1995,7 @@ func DeleteIAMInstanceProfile(cloud fi.Cloud, r *resources.Resource) error { request := &iam.DeleteInstanceProfileInput{ InstanceProfileName: profile.InstanceProfileName, } - _, err := c.IAM().DeleteInstanceProfile(request) + _, err := c.IAM().DeleteInstanceProfile(ctx, request) if err != nil { return fmt.Errorf("error deleting IAM instance profile %q: %v", name, err) } @@ -2005,28 +2005,34 @@ func DeleteIAMInstanceProfile(cloud fi.Cloud, r *resources.Resource) error { } func ListIAMInstanceProfiles(cloud fi.Cloud, vpcID, clusterName string) ([]*resources.Resource, error) { + ctx := context.TODO() c := cloud.(awsup.AWSCloud) - var getProfileErr error - var profiles []*iam.InstanceProfile + var profiles []iamtypes.InstanceProfile ownershipTag := "kubernetes.io/cluster/" + clusterName request := &iam.ListInstanceProfilesInput{} - err := c.IAM().ListInstanceProfilesPages(request, func(p *iam.ListInstanceProfilesOutput, lastPage bool) bool { - for _, p := range p.InstanceProfiles { + paginator := iam.NewListInstanceProfilesPaginator(c.IAM(), request) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + return nil, fmt.Errorf("error listing IAM instance profiles: %v", err) + } + for _, p := range page.InstanceProfiles { name := aws.StringValue(p.InstanceProfileName) getRequest := &iam.GetInstanceProfileInput{InstanceProfileName: p.InstanceProfileName} - profileOutput, err := c.IAM().GetInstanceProfile(getRequest) + profileOutput, err := c.IAM().GetInstanceProfile(ctx, getRequest) if err != nil { - if awserror, ok := err.(awserr.Error); ok { - if awserror.Code() == iam.ErrCodeNoSuchEntityException { - klog.Warningf("could not find instance profile %q. Resource may already have been deleted: %v", *p.InstanceProfileName, awserror) - continue - } + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.Warningf("could not find role %q. Resource may already have been deleted: %v", name, nse) + continue + } else if awserror, ok := err.(smithy.APIError); ok && awserror.ErrorCode() == "403" { + klog.Warningf("failed to determine ownership of %q: %v", *p.InstanceProfileName, awserror) + continue } - getProfileErr = fmt.Errorf("calling IAM GetInstanceProfile on %s: %w", name, err) - return false + return nil, fmt.Errorf("calling IAM GetInstanceProfile on %s: %w", name, err) } for _, tag := range profileOutput.InstanceProfile.Tags { if fi.ValueOf(tag.Key) == ownershipTag && fi.ValueOf(tag.Value) == "owned" { @@ -2034,13 +2040,6 @@ func ListIAMInstanceProfiles(cloud fi.Cloud, vpcID, clusterName string) ([]*reso } } } - return true - }) - if getProfileErr != nil { - return nil, getProfileErr - } - if err != nil { - return nil, fmt.Errorf("error listing IAM instance profiles: %v", err) } var resourceTrackers []*resources.Resource @@ -2063,13 +2062,14 @@ func ListIAMInstanceProfiles(cloud fi.Cloud, vpcID, clusterName string) ([]*reso } func ListIAMOIDCProviders(cloud fi.Cloud, vpcID, clusterName string) ([]*resources.Resource, error) { + ctx := context.TODO() c := cloud.(awsup.AWSCloud) tags := c.Tags() var providers []*string { request := &iam.ListOpenIDConnectProvidersInput{} - response, err := c.IAM().ListOpenIDConnectProviders(request) + response, err := c.IAM().ListOpenIDConnectProviders(ctx, request) if err != nil { return nil, fmt.Errorf("error listing IAM OIDC Providers: %v", err) } @@ -2078,11 +2078,17 @@ func ListIAMOIDCProviders(cloud fi.Cloud, vpcID, clusterName string) ([]*resourc descReq := &iam.GetOpenIDConnectProviderInput{ OpenIDConnectProviderArn: arn, } - resp, err := c.IAM().GetOpenIDConnectProvider(descReq) - if err != nil && awsup.AWSErrorCode(err) == iam.ErrCodeNoSuchEntityException { - continue - } else if err != nil { - return nil, fmt.Errorf("error getting IAM OIDC Provider: %v", err) + resp, err := c.IAM().GetOpenIDConnectProvider(ctx, descReq) + if err != nil { + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.Warningf("could not find IAM OIDC Provider %q. Resource may already have been deleted: %v", aws.StringValue(arn), nse) + continue + } else if awserror, ok := err.(smithy.APIError); ok && awserror.ErrorCode() == "403" { + klog.Warningf("failed to determine ownership of %q: %v", aws.StringValue(arn), awserror) + continue + } + return nil, fmt.Errorf("error getting IAM OIDC Provider %q: %w", aws.StringValue(arn), err) } if !matchesIAMTags(tags, resp.Tags) { continue @@ -2107,6 +2113,7 @@ func ListIAMOIDCProviders(cloud fi.Cloud, vpcID, clusterName string) ([]*resourc } func DeleteIAMOIDCProvider(cloud fi.Cloud, r *resources.Resource) error { + ctx := context.TODO() c := cloud.(awsup.AWSCloud) arn := fi.PtrTo(r.ID) { @@ -2114,13 +2121,13 @@ func DeleteIAMOIDCProvider(cloud fi.Cloud, r *resources.Resource) error { request := &iam.DeleteOpenIDConnectProviderInput{ OpenIDConnectProviderArn: arn, } - _, err := c.IAM().DeleteOpenIDConnectProvider(request) + _, err := c.IAM().DeleteOpenIDConnectProvider(ctx, request) if err != nil { - if awsup.AWSErrorCode(err) == iam.ErrCodeNoSuchEntityException { + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { klog.V(2).Infof("Got NoSuchEntity deleting IAM OIDC Provider %v; will treat as already-deleted", arn) return nil } - return fmt.Errorf("error deleting IAM OIDC Provider %v: %v", arn, err) } } diff --git a/pkg/resources/aws/aws_test.go b/pkg/resources/aws/aws_test.go index 5f466a38a0f29..fdd165a6d5364 100644 --- a/pkg/resources/aws/aws_test.go +++ b/pkg/resources/aws/aws_test.go @@ -21,10 +21,10 @@ import ( "sort" "testing" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elb" - "github.com/aws/aws-sdk-go/service/iam" "k8s.io/kops/cloudmock/aws/mockec2" "k8s.io/kops/cloudmock/aws/mockiam" "k8s.io/kops/pkg/resources" @@ -101,11 +101,11 @@ func TestListIAMInstanceProfiles(t *testing.T) { ownershipTagKey := "kubernetes.io/cluster/" + clusterName c := &mockiam.MockIAM{ - InstanceProfiles: make(map[string]*iam.InstanceProfile), + InstanceProfiles: make(map[string]*iamtypes.InstanceProfile), } cloud.MockIAM = c - tags := []*iam.Tag{ + tags := []iamtypes.Tag{ { Key: &ownershipTagKey, Value: fi.PtrTo("owned"), @@ -115,7 +115,7 @@ func TestListIAMInstanceProfiles(t *testing.T) { { name := "prefixed." + clusterName - c.InstanceProfiles[name] = &iam.InstanceProfile{ + c.InstanceProfiles[name] = &iamtypes.InstanceProfile{ InstanceProfileName: &name, Tags: tags, } @@ -124,7 +124,7 @@ func TestListIAMInstanceProfiles(t *testing.T) { name := clusterName + ".not-prefixed" - c.InstanceProfiles[name] = &iam.InstanceProfile{ + c.InstanceProfiles[name] = &iamtypes.InstanceProfile{ InstanceProfileName: &name, Tags: tags, } @@ -132,9 +132,9 @@ func TestListIAMInstanceProfiles(t *testing.T) { { name := "prefixed2." + clusterName owner := "kubernetes.io/cluster/foo." + clusterName - c.InstanceProfiles[name] = &iam.InstanceProfile{ + c.InstanceProfiles[name] = &iamtypes.InstanceProfile{ InstanceProfileName: &name, - Tags: []*iam.Tag{ + Tags: []iamtypes.Tag{ { Key: &owner, Value: fi.PtrTo("owned"), @@ -145,7 +145,7 @@ func TestListIAMInstanceProfiles(t *testing.T) { { name := "prefixed3." + clusterName - c.InstanceProfiles[name] = &iam.InstanceProfile{ + c.InstanceProfiles[name] = &iamtypes.InstanceProfile{ InstanceProfileName: &name, } } @@ -153,7 +153,7 @@ func TestListIAMInstanceProfiles(t *testing.T) { // This is a special entity that will appear in list, but not in get { name := "__no_entity__." + clusterName - c.InstanceProfiles[name] = &iam.InstanceProfile{ + c.InstanceProfiles[name] = &iamtypes.InstanceProfile{ InstanceProfileName: &name, } } @@ -175,11 +175,11 @@ func TestListIAMRoles(t *testing.T) { ownershipTagKey := "kubernetes.io/cluster/" + clusterName c := &mockiam.MockIAM{ - Roles: make(map[string]*iam.Role), + Roles: make(map[string]*iamtypes.Role), } cloud.MockIAM = c - tags := []*iam.Tag{ + tags := []iamtypes.Tag{ { Key: &ownershipTagKey, Value: fi.PtrTo("owned"), @@ -189,7 +189,7 @@ func TestListIAMRoles(t *testing.T) { { name := "prefixed." + clusterName - c.Roles[name] = &iam.Role{ + c.Roles[name] = &iamtypes.Role{ RoleName: &name, Tags: tags, } @@ -198,7 +198,7 @@ func TestListIAMRoles(t *testing.T) { name := clusterName + ".not-prefixed" - c.Roles[name] = &iam.Role{ + c.Roles[name] = &iamtypes.Role{ RoleName: &name, Tags: tags, } @@ -206,9 +206,9 @@ func TestListIAMRoles(t *testing.T) { { name := "prefixed2." + clusterName owner := "kubernetes.io/cluster/foo." + clusterName - c.Roles[name] = &iam.Role{ + c.Roles[name] = &iamtypes.Role{ RoleName: &name, - Tags: []*iam.Tag{ + Tags: []iamtypes.Tag{ { Key: &owner, Value: fi.PtrTo("owned"), @@ -219,7 +219,7 @@ func TestListIAMRoles(t *testing.T) { { name := "prefixed3." + clusterName - c.Roles[name] = &iam.Role{ + c.Roles[name] = &iamtypes.Role{ RoleName: &name, } } diff --git a/pkg/testutils/integrationtestharness.go b/pkg/testutils/integrationtestharness.go index 6750909732c89..6c39114c39e18 100644 --- a/pkg/testutils/integrationtestharness.go +++ b/pkg/testutils/integrationtestharness.go @@ -17,6 +17,7 @@ limitations under the License. package testutils import ( + "context" "os" "path" "path/filepath" @@ -26,10 +27,10 @@ import ( "k8s.io/kops/cloudmock/aws/mockeventbridge" "k8s.io/kops/cloudmock/aws/mocksqs" + "github.com/aws/aws-sdk-go-v2/service/iam" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elbv2" - "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/route53" "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors" "github.com/gophercloud/gophercloud/openstack/dns/v2/zones" @@ -132,6 +133,7 @@ func (h *IntegrationTestHarness) Close() { } func (h *IntegrationTestHarness) SetupMockAWS() *awsup.MockAWSCloud { + ctx := context.TODO() cloud := awsup.InstallMockAWSCloud("us-test-1", "abc") mockEC2 := &mockec2.MockEC2{} cloud.MockEC2 = mockEC2 @@ -265,13 +267,13 @@ func (h *IntegrationTestHarness) SetupMockAWS() *awsup.MockAWSCloud { Name: aws.String("my-external-tg-3"), }) - mockIAM.CreateRole(&iam.CreateRoleInput{ + mockIAM.CreateRole(ctx, &iam.CreateRoleInput{ RoleName: aws.String("kops-custom-node-role"), }) - mockIAM.CreateInstanceProfile(&iam.CreateInstanceProfileInput{ + mockIAM.CreateInstanceProfile(ctx, &iam.CreateInstanceProfileInput{ InstanceProfileName: aws.String("kops-custom-node-role"), }) - mockIAM.AddRoleToInstanceProfile(&iam.AddRoleToInstanceProfileInput{ + mockIAM.AddRoleToInstanceProfile(ctx, &iam.AddRoleToInstanceProfileInput{ InstanceProfileName: aws.String("kops-custom-node-role"), RoleName: aws.String("kops-custom-node-role"), }) diff --git a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go index 61d45ca5744cf..f99a15c2d1ce9 100644 --- a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go +++ b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go @@ -17,6 +17,8 @@ limitations under the License. package awstasks import ( + "context" + "errors" "fmt" "k8s.io/kops/upup/pkg/fi" @@ -24,9 +26,9 @@ import ( "k8s.io/kops/upup/pkg/fi/cloudup/terraform" "k8s.io/kops/upup/pkg/fi/cloudup/terraformWriter" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/klog/v2" ) @@ -49,14 +51,13 @@ func (e *IAMInstanceProfile) CompareWithID() *string { // findIAMInstanceProfile retrieves the InstanceProfile with specified name // It returns nil,nil if not found -func findIAMInstanceProfile(cloud awsup.AWSCloud, name string) (*iam.InstanceProfile, error) { +func findIAMInstanceProfile(ctx context.Context, cloud awsup.AWSCloud, name string) (*iamtypes.InstanceProfile, error) { request := &iam.GetInstanceProfileInput{InstanceProfileName: aws.String(name)} - response, err := cloud.IAM().GetInstanceProfile(request) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == iam.ErrCodeNoSuchEntityException { - return nil, nil - } + response, err := cloud.IAM().GetInstanceProfile(ctx, request) + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + return nil, nil } if err != nil { @@ -67,9 +68,10 @@ func findIAMInstanceProfile(cloud awsup.AWSCloud, name string) (*iam.InstancePro } func (e *IAMInstanceProfile) Find(c *fi.CloudupContext) (*IAMInstanceProfile, error) { + ctx := c.Context() cloud := c.T.Cloud.(awsup.AWSCloud) - p, err := findIAMInstanceProfile(cloud, *e.Name) + p, err := findIAMInstanceProfile(ctx, cloud, *e.Name) if err != nil { return nil, err } @@ -108,6 +110,7 @@ func (s *IAMInstanceProfile) CheckChanges(a, e, changes *IAMInstanceProfile) err } func (_ *IAMInstanceProfile) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMInstanceProfile) error { + ctx := context.TODO() if fi.ValueOf(e.Shared) { if a == nil { return fmt.Errorf("instance role profile with id %q not found", fi.ValueOf(e.ID)) @@ -119,7 +122,7 @@ func (_ *IAMInstanceProfile) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAM InstanceProfileName: e.Name, } - response, err := t.Cloud.IAM().CreateInstanceProfile(request) + response, err := t.Cloud.IAM().CreateInstanceProfile(ctx, request) if err != nil { return fmt.Errorf("error creating IAMInstanceProfile: %v", err) } @@ -128,7 +131,7 @@ func (_ *IAMInstanceProfile) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAM InstanceProfileName: e.Name, Tags: mapToIAMTags(e.Tags), } - _, err = t.Cloud.IAM().TagInstanceProfile(tagRequest) + _, err = t.Cloud.IAM().TagInstanceProfile(ctx, tagRequest) if err != nil { if awsup.AWSErrorCode(err) == awsup.AWSErrCodeInvalidAction { klog.Warningf("Ignoring unsupported IAMInstanceProfile tagging %v", *a.Name) @@ -142,15 +145,15 @@ func (_ *IAMInstanceProfile) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAM } else { if changes.Tags != nil { if len(a.Tags) > 0 { - existingTagKeys := make([]*string, 0) + existingTagKeys := make([]string, 0) for k := range a.Tags { - existingTagKeys = append(existingTagKeys, &k) + existingTagKeys = append(existingTagKeys, k) } untagRequest := &iam.UntagInstanceProfileInput{ InstanceProfileName: a.Name, TagKeys: existingTagKeys, } - _, err := t.Cloud.IAM().UntagInstanceProfile(untagRequest) + _, err := t.Cloud.IAM().UntagInstanceProfile(ctx, untagRequest) if err != nil { return fmt.Errorf("error untagging IAMInstanceProfile: %v", err) } @@ -160,7 +163,7 @@ func (_ *IAMInstanceProfile) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAM InstanceProfileName: a.Name, Tags: mapToIAMTags(e.Tags), } - _, err := t.Cloud.IAM().TagInstanceProfile(tagRequest) + _, err := t.Cloud.IAM().TagInstanceProfile(ctx, tagRequest) if err != nil { if awsup.AWSErrorCode(err) == awsup.AWSErrCodeInvalidAction { klog.Warningf("Ignoring unsupported IAMInstanceProfile tagging %v", *a.Name) diff --git a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go index 219af27a23295..9cfc999526c5e 100644 --- a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go +++ b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go @@ -17,11 +17,13 @@ limitations under the License. package awstasks import ( + "context" + "errors" "fmt" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/klog/v2" "k8s.io/kops/upup/pkg/fi" "k8s.io/kops/upup/pkg/fi/cloudup/awsup" @@ -39,6 +41,7 @@ type IAMInstanceProfileRole struct { } func (e *IAMInstanceProfileRole) Find(c *fi.CloudupContext) (*IAMInstanceProfileRole, error) { + ctx := c.Context() cloud := c.T.Cloud.(awsup.AWSCloud) if e.Role == nil || e.Role.ID == nil { @@ -49,11 +52,10 @@ func (e *IAMInstanceProfileRole) Find(c *fi.CloudupContext) (*IAMInstanceProfile request := &iam.GetInstanceProfileInput{InstanceProfileName: e.InstanceProfile.Name} - response, err := cloud.IAM().GetInstanceProfile(request) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == iam.ErrCodeNoSuchEntityException { - return nil, nil - } + response, err := cloud.IAM().GetInstanceProfile(ctx, request) + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + return nil, nil } if err != nil { @@ -62,7 +64,7 @@ func (e *IAMInstanceProfileRole) Find(c *fi.CloudupContext) (*IAMInstanceProfile ip := response.InstanceProfile for _, role := range ip.Roles { - if aws.StringValue(role.RoleId) != roleID { + if aws.ToString(role.RoleId) != roleID { continue } actual := &IAMInstanceProfileRole{} @@ -95,13 +97,14 @@ func (s *IAMInstanceProfileRole) CheckChanges(a, e, changes *IAMInstanceProfileR } func (_ *IAMInstanceProfileRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMInstanceProfileRole) error { + ctx := context.TODO() if a == nil { request := &iam.AddRoleToInstanceProfileInput{ InstanceProfileName: e.InstanceProfile.Name, RoleName: e.Role.Name, } - _, err := t.Cloud.IAM().AddRoleToInstanceProfile(request) + _, err := t.Cloud.IAM().AddRoleToInstanceProfile(ctx, request) if err != nil { return fmt.Errorf("error creating IAMInstanceProfileRole: %v", err) } diff --git a/upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go b/upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go index 5dc170f3a3637..940da074dbaea 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go +++ b/upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go @@ -17,11 +17,12 @@ limitations under the License. package awstasks import ( + "context" "fmt" "strings" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog/v2" "k8s.io/kops/upup/pkg/fi" @@ -34,8 +35,8 @@ import ( type IAMOIDCProvider struct { Lifecycle fi.Lifecycle - ClientIDs []*string - Thumbprints []*string + ClientIDs []string + Thumbprints []string URL *string Name *string @@ -51,9 +52,10 @@ func (e *IAMOIDCProvider) CompareWithID() *string { } func (e *IAMOIDCProvider) Find(c *fi.CloudupContext) (*IAMOIDCProvider, error) { + ctx := c.Context() cloud := c.T.Cloud.(awsup.AWSCloud) - response, err := cloud.IAM().ListOpenIDConnectProviders(&iam.ListOpenIDConnectProvidersInput{}) + response, err := cloud.IAM().ListOpenIDConnectProviders(ctx, &iam.ListOpenIDConnectProvidersInput{}) if err != nil { return nil, fmt.Errorf("error listing oidc providers: %v", err) } @@ -61,14 +63,14 @@ func (e *IAMOIDCProvider) Find(c *fi.CloudupContext) (*IAMOIDCProvider, error) { providers := response.OpenIDConnectProviderList for _, provider := range providers { arn := provider.Arn - descResp, err := cloud.IAM().GetOpenIDConnectProvider(&iam.GetOpenIDConnectProviderInput{ + descResp, err := cloud.IAM().GetOpenIDConnectProvider(ctx, &iam.GetOpenIDConnectProviderInput{ OpenIDConnectProviderArn: arn, }) if err != nil { return nil, fmt.Errorf("error describing oidc provider: %v", err) } // AWS does not return the https:// in the url - actualURL := aws.StringValue(descResp.Url) + actualURL := aws.ToString(descResp.Url) if !strings.Contains(actualURL, "://") { actualURL = "https://" + actualURL } @@ -86,7 +88,7 @@ func (e *IAMOIDCProvider) Find(c *fi.CloudupContext) (*IAMOIDCProvider, error) { actual.Lifecycle = e.Lifecycle actual.Name = e.Name - klog.V(2).Infof("found matching IAMOIDCProvider %q", aws.StringValue(arn)) + klog.V(2).Infof("found matching IAMOIDCProvider %q", aws.ToString(arn)) return actual, nil } } @@ -117,6 +119,7 @@ func (s *IAMOIDCProvider) CheckChanges(a, e, changes *IAMOIDCProvider) error { } func (p *IAMOIDCProvider) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMOIDCProvider) error { + ctx := context.TODO() thumbprints := e.Thumbprints if a == nil { @@ -129,7 +132,7 @@ func (p *IAMOIDCProvider) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMOID Tags: mapToIAMTags(e.Tags), } - response, err := t.Cloud.IAM().CreateOpenIDConnectProvider(request) + response, err := t.Cloud.IAM().CreateOpenIDConnectProvider(ctx, request) if err != nil { return fmt.Errorf("error creating IAMOIDCProvider: %v", err) } @@ -143,22 +146,22 @@ func (p *IAMOIDCProvider) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMOID request.OpenIDConnectProviderArn = a.arn request.ThumbprintList = thumbprints - _, err := t.Cloud.IAM().UpdateOpenIDConnectProviderThumbprint(request) + _, err := t.Cloud.IAM().UpdateOpenIDConnectProviderThumbprint(ctx, request) if err != nil { return fmt.Errorf("error updating IAMOIDCProvider Thumbprints: %v", err) } } if changes.Tags != nil { if len(a.Tags) > 0 { - existingTagKeys := make([]*string, 0) + existingTagKeys := make([]string, 0) for k := range a.Tags { - existingTagKeys = append(existingTagKeys, &k) + existingTagKeys = append(existingTagKeys, k) } untagRequest := &iam.UntagOpenIDConnectProviderInput{ OpenIDConnectProviderArn: a.arn, TagKeys: existingTagKeys, } - _, err := t.Cloud.IAM().UntagOpenIDConnectProvider(untagRequest) + _, err := t.Cloud.IAM().UntagOpenIDConnectProvider(ctx, untagRequest) if err != nil { return fmt.Errorf("error untagging IAMOIDCProvider: %v", err) } @@ -168,7 +171,7 @@ func (p *IAMOIDCProvider) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMOID OpenIDConnectProviderArn: a.arn, Tags: mapToIAMTags(e.Tags), } - _, err := t.Cloud.IAM().TagOpenIDConnectProvider(tagRequest) + _, err := t.Cloud.IAM().TagOpenIDConnectProvider(ctx, tagRequest) if err != nil { return fmt.Errorf("error tagging IAMOIDCProvider: %v", err) } @@ -177,11 +180,11 @@ func (p *IAMOIDCProvider) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMOID if changes.ClientIDs != nil { actual := sets.NewString() for _, aud := range a.ClientIDs { - actual.Insert(*aud) + actual.Insert(aud) } expected := sets.NewString() for _, aud := range e.ClientIDs { - expected.Insert(*aud) + expected.Insert(aud) } toRemove := actual.Difference(expected) for _, elem := range toRemove.List() { @@ -189,7 +192,7 @@ func (p *IAMOIDCProvider) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMOID OpenIDConnectProviderArn: a.arn, ClientID: &elem, } - _, err := t.Cloud.IAM().RemoveClientIDFromOpenIDConnectProvider(request) + _, err := t.Cloud.IAM().RemoveClientIDFromOpenIDConnectProvider(ctx, request) if err != nil { return fmt.Errorf("error removing audience %s to IAMOIDCProvider: %v", elem, err) } @@ -200,7 +203,7 @@ func (p *IAMOIDCProvider) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMOID OpenIDConnectProviderArn: a.arn, ClientID: &elem, } - _, err := t.Cloud.IAM().AddClientIDToOpenIDConnectProvider(request) + _, err := t.Cloud.IAM().AddClientIDToOpenIDConnectProvider(ctx, request) if err != nil { return fmt.Errorf("error adding audience %s to IAMOIDCProvider: %v", elem, err) } @@ -211,9 +214,9 @@ func (p *IAMOIDCProvider) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMOID } type terraformIAMOIDCProvider struct { - URL *string `cty:"url"` - ClientIDList []*string `cty:"client_id_list"` - ThumbprintList []*string `cty:"thumbprint_list"` + URL *string `cty:"url"` + ClientIDList []string `cty:"client_id_list"` + ThumbprintList []string `cty:"thumbprint_list"` AssumeRolePolicy *terraformWriter.Literal `cty:"assume_role_policy"` Tags map[string]string `cty:"tags"` @@ -225,7 +228,7 @@ func (p *IAMOIDCProvider) RenderTerraform(t *terraform.TerraformTarget, a, e, ch return err } - issuerSubs := strings.SplitAfter(aws.StringValue(e.URL), "://") + issuerSubs := strings.SplitAfter(aws.ToString(e.URL), "://") issuer := issuerSubs[len(issuerSubs)-1] err = t.AddOutputVariable("iam_openid_connect_provider_issuer", terraformWriter.LiteralFromStringValue(issuer)) if err != nil { diff --git a/upup/pkg/fi/cloudup/awstasks/iamrole.go b/upup/pkg/fi/cloudup/awstasks/iamrole.go index f7b0ae18612ff..54443103384c4 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamrole.go +++ b/upup/pkg/fi/cloudup/awstasks/iamrole.go @@ -17,14 +17,16 @@ limitations under the License. package awstasks import ( + "context" "encoding/json" + "errors" "fmt" "net/url" "reflect" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/klog/v2" "k8s.io/kops/pkg/diff" "k8s.io/kops/upup/pkg/fi" @@ -61,15 +63,15 @@ func (e *IAMRole) CompareWithID() *string { } func (e *IAMRole) Find(c *fi.CloudupContext) (*IAMRole, error) { + ctx := c.Context() cloud := c.T.Cloud.(awsup.AWSCloud) request := &iam.GetRoleInput{RoleName: e.Name} - response, err := cloud.IAM().GetRole(request) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == iam.ErrCodeNoSuchEntityException { - return nil, nil - } + response, err := cloud.IAM().GetRole(ctx, request) + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + return nil, nil } if err != nil { return nil, fmt.Errorf("error getting role: %v", err) @@ -95,17 +97,17 @@ func (e *IAMRole) Find(c *fi.CloudupContext) (*IAMRole, error) { if e.RolePolicyDocument != nil { expectedPolicy, err := fi.ResourceAsString(e.RolePolicyDocument) if err != nil { - return nil, fmt.Errorf("error reading expected RolePolicyDocument for IAMRole %q: %v", aws.StringValue(e.Name), err) + return nil, fmt.Errorf("error reading expected RolePolicyDocument for IAMRole %q: %v", aws.ToString(e.Name), err) } expectedJson := make(map[string]interface{}) err = json.Unmarshal([]byte(expectedPolicy), &expectedJson) if err != nil { - return nil, fmt.Errorf("error parsing expected RolePolicyDocument for IAMRole %q: %v", aws.StringValue(e.Name), err) + return nil, fmt.Errorf("error parsing expected RolePolicyDocument for IAMRole %q: %v", aws.ToString(e.Name), err) } actualJson := make(map[string]interface{}) err = json.Unmarshal([]byte(actualPolicy), &actualJson) if err != nil { - return nil, fmt.Errorf("error parsing actual RolePolicyDocument for IAMRole %q: %v", aws.StringValue(e.Name), err) + return nil, fmt.Errorf("error parsing actual RolePolicyDocument for IAMRole %q: %v", aws.ToString(e.Name), err) } if reflect.DeepEqual(actualJson, expectedJson) { @@ -118,7 +120,7 @@ func (e *IAMRole) Find(c *fi.CloudupContext) (*IAMRole, error) { } actual.Tags = mapIAMTagsToMap(r.Tags) - klog.V(2).Infof("found matching IAMRole %q", aws.StringValue(actual.ID)) + klog.V(2).Infof("found matching IAMRole %q", aws.ToString(actual.ID)) e.ID = actual.ID // Avoid spurious changes @@ -153,10 +155,11 @@ func (s *IAMRole) CheckChanges(a, e, changes *IAMRole) error { } func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error { + ctx := context.TODO() if e.RolePolicyDocument == nil { klog.V(2).Infof("Deleting IAM role %q", fi.ValueOf(a.Name)) - var attachedPolicies []*iam.AttachedPolicy + var attachedPolicies []iamtypes.AttachedPolicy var policyNames []string // List Inline policies @@ -164,19 +167,20 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error request := &iam.ListRolePoliciesInput{ RoleName: a.Name, } - err := t.Cloud.IAM().ListRolePoliciesPages(request, func(page *iam.ListRolePoliciesOutput, lastPage bool) bool { - for _, policy := range page.PolicyNames { - policyNames = append(policyNames, aws.StringValue(policy)) + paginator := iam.NewListRolePoliciesPaginator(t.Cloud.IAM(), request) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy; will treat as already-deleted") + return nil + } + return fmt.Errorf("error listing IAM role policies: %v", err) } - return true - }) - if err != nil { - if awsup.AWSErrorCode(err) == iam.ErrCodeNoSuchEntityException { - klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy; will treat as already-deleted") - return nil + for _, policy := range page.PolicyNames { + policyNames = append(policyNames, policy) } - - return fmt.Errorf("error listing IAM role policies: %v", err) } } @@ -185,17 +189,18 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error request := &iam.ListAttachedRolePoliciesInput{ RoleName: a.Name, } - err := t.Cloud.IAM().ListAttachedRolePoliciesPages(request, func(page *iam.ListAttachedRolePoliciesOutput, lastPage bool) bool { - attachedPolicies = append(attachedPolicies, page.AttachedPolicies...) - return true - }) - if err != nil { - if awsup.AWSErrorCode(err) == iam.ErrCodeNoSuchEntityException { - klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy; will treat as already-detached") - return nil + paginator := iam.NewListAttachedRolePoliciesPaginator(t.Cloud.IAM(), request) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy; will treat as already-deleted") + return nil + } + return fmt.Errorf("error listing IAM role policies for %v", err) } - - return fmt.Errorf("error listing IAM role policies for %v", err) + attachedPolicies = append(attachedPolicies, page.AttachedPolicies...) } } @@ -206,7 +211,7 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error RoleName: a.Name, PolicyName: aws.String(policyName), } - _, err := t.Cloud.IAM().DeleteRolePolicy(request) + _, err := t.Cloud.IAM().DeleteRolePolicy(ctx, request) if err != nil { return fmt.Errorf("error deleting IAM role policy %q: %v", policyName, err) } @@ -214,12 +219,12 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error // Detach Managed Policies for _, policy := range attachedPolicies { - klog.V(2).Infof("Detaching IAM role policy %q", policy) + klog.V(2).Infof("Detaching IAM role policy %v", policy) request := &iam.DetachRolePolicyInput{ RoleName: a.Name, PolicyArn: policy.PolicyArn, } - _, err := t.Cloud.IAM().DetachRolePolicy(request) + _, err := t.Cloud.IAM().DetachRolePolicy(ctx, request) if err != nil { return fmt.Errorf("error detaching IAM role policy %q: %v", *policy.PolicyArn, err) } @@ -228,7 +233,7 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error request := &iam.DeleteRoleInput{ RoleName: a.Name, } - if _, err := t.Cloud.IAM().DeleteRole(request); err != nil { + if _, err := t.Cloud.IAM().DeleteRole(ctx, request); err != nil { return fmt.Errorf("error deleting IAM role: %v", err) } return nil @@ -251,7 +256,7 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error request.PermissionsBoundary = e.PermissionsBoundary } - response, err := t.Cloud.IAM().CreateRole(request) + response, err := t.Cloud.IAM().CreateRole(ctx, request) if err != nil { klog.V(2).Infof("IAMRole policy: %s", policy) return fmt.Errorf("error creating IAMRole: %v", err) @@ -283,7 +288,7 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error request.PolicyDocument = aws.String(policy) request.RoleName = e.Name - _, err = t.Cloud.IAM().UpdateAssumeRolePolicy(request) + _, err = t.Cloud.IAM().UpdateAssumeRolePolicy(ctx, request) if err != nil { return fmt.Errorf("error updating IAMRole: %v", err) } @@ -295,28 +300,28 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error request.RoleName = e.Name request.PermissionsBoundary = e.PermissionsBoundary - if _, err := t.Cloud.IAM().PutRolePermissionsBoundary(request); err != nil { + if _, err := t.Cloud.IAM().PutRolePermissionsBoundary(ctx, request); err != nil { return fmt.Errorf("error updating IAMRole: %v", err) } } else if a.PermissionsBoundary != nil && e.PermissionsBoundary == nil { request := &iam.DeleteRolePermissionsBoundaryInput{} request.RoleName = e.Name - if _, err := t.Cloud.IAM().DeleteRolePermissionsBoundary(request); err != nil { + if _, err := t.Cloud.IAM().DeleteRolePermissionsBoundary(ctx, request); err != nil { return fmt.Errorf("error updating IAMRole: %v", err) } } if changes.Tags != nil { if len(a.Tags) > 0 { - existingTagKeys := make([]*string, 0) + existingTagKeys := make([]string, 0) for k := range a.Tags { - existingTagKeys = append(existingTagKeys, &k) + existingTagKeys = append(existingTagKeys, k) } untagRequest := &iam.UntagRoleInput{ RoleName: e.Name, TagKeys: existingTagKeys, } - _, err = t.Cloud.IAM().UntagRole(untagRequest) + _, err = t.Cloud.IAM().UntagRole(ctx, untagRequest) if err != nil { return fmt.Errorf("error untagging IAMRole: %v", err) } @@ -326,7 +331,7 @@ func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error RoleName: e.Name, Tags: mapToIAMTags(e.Tags), } - _, err = t.Cloud.IAM().TagRole(tagRequest) + _, err = t.Cloud.IAM().TagRole(ctx, tagRequest) if err != nil { return fmt.Errorf("error tagging IAMRole: %v", err) } diff --git a/upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go b/upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go index 1d7331be817d3..a33c4cebceaa6 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go +++ b/upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go @@ -17,16 +17,18 @@ limitations under the License. package awstasks import ( + "context" "encoding/json" + "errors" "fmt" "hash/fnv" "net/url" "sort" "strings" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/klog/v2" "k8s.io/kops/pkg/diff" "k8s.io/kops/upup/pkg/fi" @@ -53,6 +55,7 @@ type IAMRolePolicy struct { } func (e *IAMRolePolicy) Find(c *fi.CloudupContext) (*IAMRolePolicy, error) { + ctx := c.Context() var actual IAMRolePolicy cloud := c.T.Cloud.(awsup.AWSCloud) @@ -63,19 +66,21 @@ func (e *IAMRolePolicy) Find(c *fi.CloudupContext) (*IAMRolePolicy, error) { RoleName: e.Role.Name, } - response, err := cloud.IAM().ListAttachedRolePolicies(request) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == iam.ErrCodeNoSuchEntityException { + response, err := cloud.IAM().ListAttachedRolePolicies(ctx, request) + if err != nil { + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.V(2).Infof("Got NoSuchEntity describing IAM RolePolicy; will treat as already-deleted") return nil, nil } - return nil, fmt.Errorf("error getting policies for role: %v", err) + return nil, fmt.Errorf("error listing policies for role: %w", err) } var policies []string if response != nil && len(response.AttachedPolicies) > 0 { for _, policy := range response.AttachedPolicies { - policies = append(policies, aws.StringValue(policy.PolicyArn)) + policies = append(policies, aws.ToString(policy.PolicyArn)) } } sort.Strings(policies) @@ -95,19 +100,18 @@ func (e *IAMRolePolicy) Find(c *fi.CloudupContext) (*IAMRolePolicy, error) { PolicyName: e.Name, } - response, err := cloud.IAM().GetRolePolicy(request) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == iam.ErrCodeNoSuchEntityException { + response, err := cloud.IAM().GetRolePolicy(ctx, request) + if err != nil { + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { return nil, nil } - } - if err != nil { return nil, fmt.Errorf("error getting role: %v", err) } p := response actual.Role = &IAMRole{Name: p.RoleName} - if aws.StringValue(e.Role.Name) == aws.StringValue(p.RoleName) { + if aws.ToString(e.Role.Name) == aws.ToString(p.RoleName) { actual.Role.ID = e.Role.ID } if p.PolicyDocument != nil { @@ -115,7 +119,7 @@ func (e *IAMRolePolicy) Find(c *fi.CloudupContext) (*IAMRolePolicy, error) { policy := *p.PolicyDocument policy, err = url.QueryUnescape(policy) if err != nil { - return nil, fmt.Errorf("error parsing PolicyDocument for IAMRolePolicy %q: %v", aws.StringValue(e.Name), err) + return nil, fmt.Errorf("error parsing PolicyDocument for IAMRolePolicy %q: %v", aws.ToString(e.Name), err) } // Reformat the PolicyDocument by unmarshaling and re-marshaling to JSON. @@ -169,6 +173,7 @@ func (_ *IAMRolePolicy) ShouldCreate(a, e, changes *IAMRolePolicy) (bool, error) } func (_ *IAMRolePolicy) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRolePolicy) error { + ctx := context.TODO() policy, err := e.policyDocumentString() if err != nil { return fmt.Errorf("error rendering PolicyDocument: %v", err) @@ -190,7 +195,7 @@ func (_ *IAMRolePolicy) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRoleP PolicyArn: s(policy), } - _, err = t.Cloud.IAM().AttachRolePolicy(request) + _, err = t.Cloud.IAM().AttachRolePolicy(ctx, request) if err != nil { return fmt.Errorf("error attaching IAMRolePolicy: %v", err) } @@ -205,7 +210,7 @@ func (_ *IAMRolePolicy) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRoleP } } - klog.V(2).Infof("Detaching unused IAMRolePolicy %s/%s", aws.StringValue(e.Role.Name), cloudPolicy) + klog.V(2).Infof("Detaching unused IAMRolePolicy %s/%s", aws.ToString(e.Role.Name), cloudPolicy) // Detach policy request := &iam.DetachRolePolicyInput{ @@ -213,9 +218,9 @@ func (_ *IAMRolePolicy) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRoleP PolicyArn: s(cloudPolicy), } - _, err := t.Cloud.IAM().DetachRolePolicy(request) + _, err := t.Cloud.IAM().DetachRolePolicy(ctx, request) if err != nil { - klog.V(2).Infof("Unable to detach IAMRolePolicy %s/%s", aws.StringValue(e.Role.Name), cloudPolicy) + klog.V(2).Infof("Unable to detach IAMRolePolicy %s/%s", aws.ToString(e.Role.Name), cloudPolicy) return err } } @@ -230,12 +235,12 @@ func (_ *IAMRolePolicy) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRoleP request.RoleName = e.Role.Name request.PolicyName = e.Name - klog.V(2).Infof("Deleting role policy %s/%s", aws.StringValue(e.Role.Name), aws.StringValue(e.Name)) - _, err = t.Cloud.IAM().DeleteRolePolicy(request) + klog.V(2).Infof("Deleting role policy %s/%s", aws.ToString(e.Role.Name), aws.ToString(e.Name)) + _, err = t.Cloud.IAM().DeleteRolePolicy(ctx, request) if err != nil { - if awsup.AWSErrorCode(err) == iam.ErrCodeNoSuchEntityException { - // Already deleted - klog.V(2).Infof("Got NoSuchEntity deleting role policy %s/%s; assuming does not exist", aws.StringValue(e.Role.Name), aws.StringValue(e.Name)) + var nse *iamtypes.NoSuchEntityException + if errors.As(err, &nse) { + klog.V(2).Infof("Got NoSuchEntity deleting role policy %s/%s; assuming does not exist", aws.ToString(e.Role.Name), aws.ToString(e.Name)) return nil } return fmt.Errorf("error deleting IAMRolePolicy: %v", err) @@ -274,11 +279,11 @@ func (_ *IAMRolePolicy) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRoleP request.RoleName = e.Role.Name request.PolicyName = e.Name - klog.V(8).Infof("PutRolePolicy RoleName=%s PolicyName=%s: %s", aws.StringValue(e.Role.Name), aws.StringValue(e.Name), policy) + klog.V(8).Infof("PutRolePolicy RoleName=%s PolicyName=%s: %s", aws.ToString(e.Role.Name), aws.ToString(e.Name), policy) - _, err = t.Cloud.IAM().PutRolePolicy(request) + _, err = t.Cloud.IAM().PutRolePolicy(ctx, request) if err != nil { - klog.V(2).Infof("PutRolePolicy RoleName=%s PolicyName=%s: %s", aws.StringValue(e.Role.Name), aws.StringValue(e.Name), policy) + klog.V(2).Infof("PutRolePolicy RoleName=%s PolicyName=%s: %s", aws.ToString(e.Role.Name), aws.ToString(e.Name), policy) return fmt.Errorf("error creating/updating IAMRolePolicy: %v", err) } } diff --git a/upup/pkg/fi/cloudup/awstasks/tags.go b/upup/pkg/fi/cloudup/awstasks/tags.go index 5bc1ddc09c719..b0585d7092596 100644 --- a/upup/pkg/fi/cloudup/awstasks/tags.go +++ b/upup/pkg/fi/cloudup/awstasks/tags.go @@ -20,9 +20,9 @@ import ( "strings" eventbridgetypes "github.com/aws/aws-sdk-go-v2/service/eventbridge/types" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/iam" ) func mapEC2TagsToMap(tags []*ec2.Tag) map[string]string { @@ -39,7 +39,7 @@ func mapEC2TagsToMap(tags []*ec2.Tag) map[string]string { return m } -func mapIAMTagsToMap(tags []*iam.Tag) map[string]string { +func mapIAMTagsToMap(tags []iamtypes.Tag) map[string]string { if tags == nil { return nil } @@ -53,13 +53,13 @@ func mapIAMTagsToMap(tags []*iam.Tag) map[string]string { return m } -func mapToIAMTags(tags map[string]string) []*iam.Tag { +func mapToIAMTags(tags map[string]string) []iamtypes.Tag { if tags == nil { return nil } - m := make([]*iam.Tag, 0) + m := make([]iamtypes.Tag, 0) for k, v := range tags { - m = append(m, &iam.Tag{ + m = append(m, iamtypes.Tag{ Key: aws.String(k), Value: aws.String(v), }) diff --git a/upup/pkg/fi/cloudup/awsup/aws_cloud.go b/upup/pkg/fi/cloudup/awsup/aws_cloud.go index 358fb1c34ddba..9f6aecede2519 100644 --- a/upup/pkg/fi/cloudup/awsup/aws_cloud.go +++ b/upup/pkg/fi/cloudup/awsup/aws_cloud.go @@ -34,6 +34,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws/arn" "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/service/iam" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" @@ -47,8 +48,6 @@ import ( "github.com/aws/aws-sdk-go/service/elb/elbiface" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/elbv2/elbv2iface" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/aws/aws-sdk-go/service/iam/iamiface" "github.com/aws/aws-sdk-go/service/route53" "github.com/aws/aws-sdk-go/service/route53/route53iface" "github.com/aws/aws-sdk-go/service/sts" @@ -128,7 +127,7 @@ type AWSCloud interface { fi.Cloud Session() (*session.Session, error) EC2() ec2iface.EC2API - IAM() iamiface.IAMAPI + IAM() awsinterfaces.IAMAPI ELB() elbiface.ELBAPI ELBV2() elbv2iface.ELBV2API Autoscaling() autoscalingiface.AutoScalingAPI @@ -197,7 +196,7 @@ type AWSCloud interface { type awsCloudImplementation struct { ec2 *ec2.EC2 - iam *iam.IAM + iam *iam.Client elb *elb.ELB elbv2 *elbv2.ELBV2 autoscaling *autoscaling.AutoScaling @@ -333,16 +332,7 @@ func NewAWSCloud(region string, tags map[string]string) (AWSCloud, error) { c.ec2.Handlers.Send.PushFront(requestLogger) c.addHandlers(region, &c.ec2.Handlers) - sess, err = session.NewSessionWithOptions(session.Options{ - Config: *config, - SharedConfigState: session.SharedConfigEnable, - }) - if err != nil { - return c, err - } - c.iam = iam.New(sess, config) - c.iam.Handlers.Send.PushFront(requestLogger) - c.addHandlers(region, &c.iam.Handlers) + c.iam = iam.NewFromConfig(cfgV2) sess, err = session.NewSessionWithOptions(session.Options{ Config: *config, @@ -2187,7 +2177,7 @@ func (c *awsCloudImplementation) EC2() ec2iface.EC2API { return c.ec2 } -func (c *awsCloudImplementation) IAM() iamiface.IAMAPI { +func (c *awsCloudImplementation) IAM() awsinterfaces.IAMAPI { return c.iam } @@ -2457,7 +2447,7 @@ func (c *awsCloudImplementation) AccountInfo() (string, string, error) { // GetRolesInInstanceProfile return role names which are associated with the instance profile specified by profileName. func GetRolesInInstanceProfile(c AWSCloud, profileName string) ([]string, error) { - output, err := c.IAM().GetInstanceProfile(&iam.GetInstanceProfileInput{ + output, err := c.IAM().GetInstanceProfile(context.TODO(), &iam.GetInstanceProfileInput{ InstanceProfileName: aws.String(profileName), }) if err != nil { diff --git a/upup/pkg/fi/cloudup/awsup/mock_aws_cloud.go b/upup/pkg/fi/cloudup/awsup/mock_aws_cloud.go index 5d044ffb00fb8..54426c9e63c4d 100644 --- a/upup/pkg/fi/cloudup/awsup/mock_aws_cloud.go +++ b/upup/pkg/fi/cloudup/awsup/mock_aws_cloud.go @@ -30,7 +30,6 @@ import ( "github.com/aws/aws-sdk-go/service/elb/elbiface" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/elbv2/elbv2iface" - "github.com/aws/aws-sdk-go/service/iam/iamiface" "github.com/aws/aws-sdk-go/service/route53/route53iface" v1 "k8s.io/api/core/v1" "k8s.io/klog/v2" @@ -79,7 +78,7 @@ func BuildMockAWSCloud(region string, zoneLetters string) *MockAWSCloud { type MockCloud struct { MockAutoscaling autoscalingiface.AutoScalingAPI MockEC2 ec2iface.EC2API - MockIAM iamiface.IAMAPI + MockIAM awsinterfaces.IAMAPI MockRoute53 route53iface.Route53API MockELB elbiface.ELBAPI MockELBV2 elbv2iface.ELBV2API @@ -244,7 +243,7 @@ func (c *MockAWSCloud) EC2() ec2iface.EC2API { return c.MockEC2 } -func (c *MockAWSCloud) IAM() iamiface.IAMAPI { +func (c *MockAWSCloud) IAM() awsinterfaces.IAMAPI { if c.MockIAM == nil { klog.Fatalf("MockAWSCloud MockIAM not set") } diff --git a/util/pkg/awsinterfaces/iam.go b/util/pkg/awsinterfaces/iam.go new file mode 100644 index 0000000000000..213a813eeb5a8 --- /dev/null +++ b/util/pkg/awsinterfaces/iam.go @@ -0,0 +1,59 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package awsinterfaces + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/iam" +) + +type IAMAPI interface { + AddClientIDToOpenIDConnectProvider(ctx context.Context, params *iam.AddClientIDToOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.AddClientIDToOpenIDConnectProviderOutput, error) + AddRoleToInstanceProfile(ctx context.Context, params *iam.AddRoleToInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.AddRoleToInstanceProfileOutput, error) + AttachRolePolicy(ctx context.Context, params *iam.AttachRolePolicyInput, optFns ...func(*iam.Options)) (*iam.AttachRolePolicyOutput, error) + CreateRole(ctx context.Context, params *iam.CreateRoleInput, optFns ...func(*iam.Options)) (*iam.CreateRoleOutput, error) + CreateInstanceProfile(ctx context.Context, params *iam.CreateInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.CreateInstanceProfileOutput, error) + CreateOpenIDConnectProvider(ctx context.Context, params *iam.CreateOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.CreateOpenIDConnectProviderOutput, error) + DeleteInstanceProfile(ctx context.Context, params *iam.DeleteInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.DeleteInstanceProfileOutput, error) + DeleteOpenIDConnectProvider(ctx context.Context, params *iam.DeleteOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.DeleteOpenIDConnectProviderOutput, error) + DeleteRole(ctx context.Context, params *iam.DeleteRoleInput, optFns ...func(*iam.Options)) (*iam.DeleteRoleOutput, error) + DeleteRolePermissionsBoundary(ctx context.Context, params *iam.DeleteRolePermissionsBoundaryInput, optFns ...func(*iam.Options)) (*iam.DeleteRolePermissionsBoundaryOutput, error) + DeleteRolePolicy(ctx context.Context, params *iam.DeleteRolePolicyInput, optFns ...func(*iam.Options)) (*iam.DeleteRolePolicyOutput, error) + DetachRolePolicy(ctx context.Context, params *iam.DetachRolePolicyInput, optFns ...func(*iam.Options)) (*iam.DetachRolePolicyOutput, error) + GetInstanceProfile(ctx context.Context, params *iam.GetInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.GetInstanceProfileOutput, error) + GetOpenIDConnectProvider(ctx context.Context, params *iam.GetOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.GetOpenIDConnectProviderOutput, error) + GetRole(ctx context.Context, params *iam.GetRoleInput, optFns ...func(*iam.Options)) (*iam.GetRoleOutput, error) + GetRolePolicy(ctx context.Context, params *iam.GetRolePolicyInput, optFns ...func(*iam.Options)) (*iam.GetRolePolicyOutput, error) + ListAttachedRolePolicies(ctx context.Context, params *iam.ListAttachedRolePoliciesInput, optFns ...func(*iam.Options)) (*iam.ListAttachedRolePoliciesOutput, error) + ListInstanceProfiles(ctx context.Context, params *iam.ListInstanceProfilesInput, optFns ...func(*iam.Options)) (*iam.ListInstanceProfilesOutput, error) + ListOpenIDConnectProviders(ctx context.Context, params *iam.ListOpenIDConnectProvidersInput, optFns ...func(*iam.Options)) (*iam.ListOpenIDConnectProvidersOutput, error) + ListRolePolicies(ctx context.Context, params *iam.ListRolePoliciesInput, optFns ...func(*iam.Options)) (*iam.ListRolePoliciesOutput, error) + ListRoles(ctx context.Context, params *iam.ListRolesInput, optFns ...func(*iam.Options)) (*iam.ListRolesOutput, error) + PutRolePermissionsBoundary(ctx context.Context, params *iam.PutRolePermissionsBoundaryInput, optFns ...func(*iam.Options)) (*iam.PutRolePermissionsBoundaryOutput, error) + PutRolePolicy(ctx context.Context, params *iam.PutRolePolicyInput, optFns ...func(*iam.Options)) (*iam.PutRolePolicyOutput, error) + RemoveClientIDFromOpenIDConnectProvider(ctx context.Context, params *iam.RemoveClientIDFromOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.RemoveClientIDFromOpenIDConnectProviderOutput, error) + RemoveRoleFromInstanceProfile(ctx context.Context, params *iam.RemoveRoleFromInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.RemoveRoleFromInstanceProfileOutput, error) + TagInstanceProfile(ctx context.Context, params *iam.TagInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.TagInstanceProfileOutput, error) + TagOpenIDConnectProvider(ctx context.Context, params *iam.TagOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.TagOpenIDConnectProviderOutput, error) + TagRole(ctx context.Context, params *iam.TagRoleInput, optFns ...func(*iam.Options)) (*iam.TagRoleOutput, error) + UntagInstanceProfile(ctx context.Context, params *iam.UntagInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.UntagInstanceProfileOutput, error) + UntagOpenIDConnectProvider(ctx context.Context, params *iam.UntagOpenIDConnectProviderInput, optFns ...func(*iam.Options)) (*iam.UntagOpenIDConnectProviderOutput, error) + UpdateOpenIDConnectProviderThumbprint(ctx context.Context, params *iam.UpdateOpenIDConnectProviderThumbprintInput, optFns ...func(*iam.Options)) (*iam.UpdateOpenIDConnectProviderThumbprintOutput, error) + UntagRole(ctx context.Context, params *iam.UntagRoleInput, optFns ...func(*iam.Options)) (*iam.UntagRoleOutput, error) + UpdateAssumeRolePolicy(ctx context.Context, params *iam.UpdateAssumeRolePolicyInput, optFns ...func(*iam.Options)) (*iam.UpdateAssumeRolePolicyOutput, error) +} From 926bc56c749f79c4be8f2414d92f505fbd4d7cd8 Mon Sep 17 00:00:00 2001 From: Peter Rifel Date: Fri, 29 Mar 2024 20:59:18 -0500 Subject: [PATCH 2/2] make gomod --- go.mod | 1 + go.sum | 2 + .../aws-sdk-go-v2/service/iam/CHANGELOG.md | 437 + .../aws/aws-sdk-go-v2/service/iam/LICENSE.txt | 202 + .../aws-sdk-go-v2/service/iam/api_client.go | 538 + ...i_op_AddClientIDToOpenIDConnectProvider.go | 142 + .../iam/api_op_AddRoleToInstanceProfile.go | 154 + .../service/iam/api_op_AddUserToGroup.go | 142 + .../service/iam/api_op_AttachGroupPolicy.go | 148 + .../service/iam/api_op_AttachRolePolicy.go | 152 + .../service/iam/api_op_AttachUserPolicy.go | 148 + .../service/iam/api_op_ChangePassword.go | 152 + .../service/iam/api_op_CreateAccessKey.go | 150 + .../service/iam/api_op_CreateAccountAlias.go | 136 + .../service/iam/api_op_CreateGroup.go | 153 + .../iam/api_op_CreateInstanceProfile.go | 165 + .../service/iam/api_op_CreateLoginProfile.go | 166 + .../iam/api_op_CreateOpenIDConnectProvider.go | 217 + .../service/iam/api_op_CreatePolicy.go | 194 + .../service/iam/api_op_CreatePolicyVersion.go | 175 + .../service/iam/api_op_CreateRole.go | 212 + .../service/iam/api_op_CreateSAMLProvider.go | 180 + .../iam/api_op_CreateServiceLinkedRole.go | 164 + .../api_op_CreateServiceSpecificCredential.go | 160 + .../service/iam/api_op_CreateUser.go | 170 + .../iam/api_op_CreateVirtualMFADevice.go | 171 + .../service/iam/api_op_DeactivateMFADevice.go | 147 + .../service/iam/api_op_DeleteAccessKey.go | 145 + .../service/iam/api_op_DeleteAccountAlias.go | 137 + .../iam/api_op_DeleteAccountPasswordPolicy.go | 123 + .../service/iam/api_op_DeleteGroup.go | 135 + .../service/iam/api_op_DeleteGroupPolicy.go | 147 + .../iam/api_op_DeleteInstanceProfile.go | 140 + .../service/iam/api_op_DeleteLoginProfile.go | 143 + .../iam/api_op_DeleteOpenIDConnectProvider.go | 138 + .../service/iam/api_op_DeletePolicy.go | 149 + .../service/iam/api_op_DeletePolicyVersion.go | 149 + .../service/iam/api_op_DeleteRole.go | 147 + .../api_op_DeleteRolePermissionsBoundary.go | 135 + .../service/iam/api_op_DeleteRolePolicy.go | 147 + .../service/iam/api_op_DeleteSAMLProvider.go | 136 + .../service/iam/api_op_DeleteSSHPublicKey.go | 145 + .../iam/api_op_DeleteServerCertificate.go | 145 + .../iam/api_op_DeleteServiceLinkedRole.go | 154 + .../api_op_DeleteServiceSpecificCredential.go | 142 + .../iam/api_op_DeleteSigningCertificate.go | 144 + .../service/iam/api_op_DeleteUser.go | 148 + .../api_op_DeleteUserPermissionsBoundary.go | 134 + .../service/iam/api_op_DeleteUserPolicy.go | 147 + .../iam/api_op_DeleteVirtualMFADevice.go | 137 + .../service/iam/api_op_DetachGroupPolicy.go | 146 + .../service/iam/api_op_DetachRolePolicy.go | 146 + .../service/iam/api_op_DetachUserPolicy.go | 146 + .../service/iam/api_op_EnableMFADevice.go | 169 + .../iam/api_op_GenerateCredentialReport.go | 133 + ...pi_op_GenerateOrganizationsAccessReport.go | 239 + ...i_op_GenerateServiceLastAccessedDetails.go | 192 + .../iam/api_op_GetAccessKeyLastUsed.go | 147 + .../api_op_GetAccountAuthorizationDetails.go | 281 + .../iam/api_op_GetAccountPasswordPolicy.go | 134 + .../service/iam/api_op_GetAccountSummary.go | 130 + .../api_op_GetContextKeysForCustomPolicy.go | 156 + ...api_op_GetContextKeysForPrincipalPolicy.go | 170 + .../service/iam/api_op_GetCredentialReport.go | 138 + .../service/iam/api_op_GetGroup.go | 270 + .../service/iam/api_op_GetGroupPolicy.go | 173 + .../service/iam/api_op_GetInstanceProfile.go | 325 + .../service/iam/api_op_GetLoginProfile.go | 151 + .../service/iam/api_op_GetMFADevice.go | 156 + .../iam/api_op_GetOpenIDConnectProvider.go | 164 + .../api_op_GetOrganizationsAccessReport.go | 215 + .../service/iam/api_op_GetPolicy.go | 331 + .../service/iam/api_op_GetPolicyVersion.go | 161 + .../service/iam/api_op_GetRole.go | 332 + .../service/iam/api_op_GetRolePolicy.go | 174 + .../service/iam/api_op_GetSAMLProvider.go | 156 + .../service/iam/api_op_GetSSHPublicKey.go | 159 + .../iam/api_op_GetServerCertificate.go | 146 + .../api_op_GetServiceLastAccessedDetails.go | 229 + ...tServiceLastAccessedDetailsWithEntities.go | 219 + ...i_op_GetServiceLinkedRoleDeletionStatus.go | 146 + .../service/iam/api_op_GetUser.go | 337 + .../service/iam/api_op_GetUserPolicy.go | 173 + .../service/iam/api_op_ListAccessKeys.go | 271 + .../service/iam/api_op_ListAccountAliases.go | 259 + .../iam/api_op_ListAttachedGroupPolicies.go | 283 + .../iam/api_op_ListAttachedRolePolicies.go | 283 + .../iam/api_op_ListAttachedUserPolicies.go | 283 + .../iam/api_op_ListEntitiesForPolicy.go | 297 + .../service/iam/api_op_ListGroupPolicies.go | 273 + .../service/iam/api_op_ListGroups.go | 265 + .../service/iam/api_op_ListGroupsForUser.go | 266 + .../iam/api_op_ListInstanceProfileTags.go | 271 + .../iam/api_op_ListInstanceProfiles.go | 273 + .../iam/api_op_ListInstanceProfilesForRole.go | 272 + .../service/iam/api_op_ListMFADeviceTags.go | 270 + .../service/iam/api_op_ListMFADevices.go | 265 + .../api_op_ListOpenIDConnectProviderTags.go | 275 + .../iam/api_op_ListOpenIDConnectProviders.go | 134 + .../service/iam/api_op_ListPolicies.go | 292 + ...pi_op_ListPoliciesGrantingServiceAccess.go | 193 + .../service/iam/api_op_ListPolicyTags.go | 269 + .../service/iam/api_op_ListPolicyVersions.go | 268 + .../service/iam/api_op_ListRolePolicies.go | 270 + .../service/iam/api_op_ListRoleTags.go | 269 + .../service/iam/api_op_ListRoles.go | 274 + .../iam/api_op_ListSAMLProviderTags.go | 273 + .../service/iam/api_op_ListSAMLProviders.go | 134 + .../service/iam/api_op_ListSSHPublicKeys.go | 267 + .../iam/api_op_ListServerCertificateTags.go | 275 + .../iam/api_op_ListServerCertificates.go | 275 + .../api_op_ListServiceSpecificCredentials.go | 148 + .../iam/api_op_ListSigningCertificates.go | 271 + .../service/iam/api_op_ListUserPolicies.go | 270 + .../service/iam/api_op_ListUserTags.go | 268 + .../service/iam/api_op_ListUsers.go | 274 + .../iam/api_op_ListVirtualMFADevices.go | 268 + .../service/iam/api_op_PutGroupPolicy.go | 168 + .../iam/api_op_PutRolePermissionsBoundary.go | 154 + .../service/iam/api_op_PutRolePolicy.go | 173 + .../iam/api_op_PutUserPermissionsBoundary.go | 153 + .../service/iam/api_op_PutUserPolicy.go | 168 + ...RemoveClientIDFromOpenIDConnectProvider.go | 145 + .../api_op_RemoveRoleFromInstanceProfile.go | 149 + .../service/iam/api_op_RemoveUserFromGroup.go | 142 + .../api_op_ResetServiceSpecificCredential.go | 151 + .../service/iam/api_op_ResyncMFADevice.go | 157 + .../iam/api_op_SetDefaultPolicyVersion.go | 145 + ...i_op_SetSecurityTokenServicePreferences.go | 156 + .../iam/api_op_SimulateCustomPolicy.go | 410 + .../iam/api_op_SimulatePrincipalPolicy.go | 427 + .../service/iam/api_op_TagInstanceProfile.go | 164 + .../service/iam/api_op_TagMFADevice.go | 165 + .../iam/api_op_TagOpenIDConnectProvider.go | 166 + .../service/iam/api_op_TagPolicy.go | 164 + .../service/iam/api_op_TagRole.go | 171 + .../service/iam/api_op_TagSAMLProvider.go | 167 + .../iam/api_op_TagServerCertificate.go | 171 + .../service/iam/api_op_TagUser.go | 171 + .../iam/api_op_UntagInstanceProfile.go | 142 + .../service/iam/api_op_UntagMFADevice.go | 144 + .../iam/api_op_UntagOpenIDConnectProvider.go | 144 + .../service/iam/api_op_UntagPolicy.go | 143 + .../service/iam/api_op_UntagRole.go | 142 + .../service/iam/api_op_UntagSAMLProvider.go | 145 + .../iam/api_op_UntagServerCertificate.go | 146 + .../service/iam/api_op_UntagUser.go | 142 + .../service/iam/api_op_UpdateAccessKey.go | 157 + .../iam/api_op_UpdateAccountPasswordPolicy.go | 195 + .../iam/api_op_UpdateAssumeRolePolicy.go | 153 + .../service/iam/api_op_UpdateGroup.go | 158 + .../service/iam/api_op_UpdateLoginProfile.go | 157 + ...p_UpdateOpenIDConnectProviderThumbprint.go | 157 + .../service/iam/api_op_UpdateRole.go | 149 + .../iam/api_op_UpdateRoleDescription.go | 143 + .../service/iam/api_op_UpdateSAMLProvider.go | 149 + .../service/iam/api_op_UpdateSSHPublicKey.go | 156 + .../iam/api_op_UpdateServerCertificate.go | 164 + .../api_op_UpdateServiceSpecificCredential.go | 150 + .../iam/api_op_UpdateSigningCertificate.go | 154 + .../service/iam/api_op_UpdateUser.go | 158 + .../service/iam/api_op_UploadSSHPublicKey.go | 160 + .../iam/api_op_UploadServerCertificate.go | 229 + .../iam/api_op_UploadSigningCertificate.go | 170 + .../aws/aws-sdk-go-v2/service/iam/auth.go | 284 + .../service/iam/deserializers.go | 31645 ++++++++++++ .../aws/aws-sdk-go-v2/service/iam/doc.go | 14 + .../aws-sdk-go-v2/service/iam/endpoints.go | 823 + .../aws-sdk-go-v2/service/iam/generated.json | 191 + .../service/iam/go_module_metadata.go | 6 + .../iam/internal/endpoints/endpoints.go | 441 + .../aws/aws-sdk-go-v2/service/iam/options.go | 217 + .../aws-sdk-go-v2/service/iam/serializers.go | 13413 +++++ .../aws-sdk-go-v2/service/iam/types/enums.go | 466 + .../aws-sdk-go-v2/service/iam/types/errors.go | 752 + .../aws-sdk-go-v2/service/iam/types/types.go | 1726 + .../aws-sdk-go-v2/service/iam/validators.go | 5620 +++ .../aws/aws-sdk-go/service/iam/api.go | 41673 ---------------- .../aws/aws-sdk-go/service/iam/doc.go | 33 - .../aws/aws-sdk-go/service/iam/errors.go | 202 - .../service/iam/iamiface/interface.go | 814 - .../aws/aws-sdk-go/service/iam/service.go | 104 - .../aws/aws-sdk-go/service/iam/waiters.go | 214 - vendor/modules.txt | 7 +- 184 files changed, 86734 insertions(+), 43042 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/LICENSE.txt create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/generated.json create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/enums.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/iam/validators.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/iamiface/interface.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/waiters.go diff --git a/go.mod b/go.mod index c5ae44b0d7deb..452865b656ae6 100644 --- a/go.mod +++ b/go.mod @@ -24,6 +24,7 @@ require ( github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0 github.com/aws/aws-sdk-go-v2/service/ec2 v1.155.0 github.com/aws/aws-sdk-go-v2/service/eventbridge v1.30.3 + github.com/aws/aws-sdk-go-v2/service/iam v1.31.4 github.com/aws/aws-sdk-go-v2/service/kms v1.30.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.53.0 github.com/aws/aws-sdk-go-v2/service/sqs v1.31.4 diff --git a/go.sum b/go.sum index 3c6a3c1c2dbb0..b4be78182a1f5 100644 --- a/go.sum +++ b/go.sum @@ -95,6 +95,8 @@ github.com/aws/aws-sdk-go-v2/service/ec2 v1.155.0 h1:MuQr3lq2n/5lAdDcIYMANNpYNkF github.com/aws/aws-sdk-go-v2/service/ec2 v1.155.0/go.mod h1:TeZ9dVQzGaLG+SBIgdLIDbJ6WmfFvksLeG3EHGnNfZM= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.30.3 h1:XHY0q3eoA3d4YAm8AhUI1Swi79Io6rLEbKuIgkhCcqA= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.30.3/go.mod h1:z2ST+IAJHUpgqAPJPsDs44wypEizBT0kekjWNfjQJ6M= +github.com/aws/aws-sdk-go-v2/service/iam v1.31.4 h1:eVm30ZIDv//r6Aogat9I88b5YX1xASSLcEDqHYRPVl0= +github.com/aws/aws-sdk-go-v2/service/iam v1.31.4/go.mod h1:aXWImQV0uTW35LM0A/T4wEg6R1/ReXUu4SM6/lUHYK0= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.6 h1:NkHCgg0Ck86c5PTOzBZ0JRccI51suJDg5lgFtxBu1ek= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md new file mode 100644 index 0000000000000..ad364dd98fc83 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md @@ -0,0 +1,437 @@ +# v1.31.4 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.3 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.2 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.1 (2024-02-23) + +* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.30.2 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.1 (2024-02-20) + +* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. + +# v1.30.0 (2024-02-16) + +* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters. + +# v1.29.0 (2024-02-13) + +* **Feature**: Bump minimum Go version to 1.20 per our language support policy. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.7 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.6 (2023-12-26) + +* **Documentation**: Documentation updates for AWS Identity and Access Management (IAM). + +# v1.28.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.28.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.28.2 (2023-12-01) + +* **Bug Fix**: Correct wrapping of errors in authentication workflow. +* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.5 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.4 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + +# v1.27.3 (2023-11-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.2 (2023-11-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.1 (2023-11-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.0 (2023-11-06) + +* **Feature**: Add partitional endpoint for iso-e. + +# v1.26.0 (2023-11-01) + +* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.0 (2023-10-31) + +* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2023-10-25) + +* **Feature**: Updates to GetAccessKeyLastUsed action to replace NoSuchEntity error with AccessDeniedException error. + +# v1.23.0 (2023-10-24) + +* **Feature**: Add the partitional endpoint for IAM in iso-f. + +# v1.22.7 (2023-10-12) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.6 (2023-10-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.5 (2023-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.4 (2023-08-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.3 (2023-08-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.2 (2023-08-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.1 (2023-08-01) + +* No change notes available for this release. + +# v1.22.0 (2023-07-31) + +* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.2 (2023-07-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.1 (2023-07-13) + +* **Documentation**: Documentation updates for AWS Identity and Access Management (IAM). +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.0 (2023-06-26) + +* **Feature**: Support for a new API "GetMFADevice" to present MFA device metadata such as device certifications + +# v1.20.3 (2023-06-16) + +* **Documentation**: Documentation updates for AWS Identity and Access Management (IAM). + +# v1.20.2 (2023-06-15) + +* No change notes available for this release. + +# v1.20.1 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.0 (2023-06-06) + +* **Feature**: This release updates the AccountAlias regex pattern with the same length restrictions enforced by the length constraint. + +# v1.19.12 (2023-05-04) + +* No change notes available for this release. + +# v1.19.11 (2023-04-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.10 (2023-04-10) + +* No change notes available for this release. + +# v1.19.9 (2023-04-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.8 (2023-03-22) + +* **Documentation**: Documentation updates for AWS Identity and Access Management (IAM). + +# v1.19.7 (2023-03-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.6 (2023-03-14) + +* **Documentation**: Documentation only updates to correct customer-reported issues + +# v1.19.5 (2023-03-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.4 (2023-02-22) + +* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. + +# v1.19.3 (2023-02-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.2 (2023-02-03) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade smithy to 1.27.2 and correct empty query list serialization. + +# v1.19.1 (2023-02-01) + +* **Documentation**: Documentation updates for AWS Identity and Access Management (IAM). + +# v1.19.0 (2023-01-05) + +* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). + +# v1.18.25 (2022-12-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.24 (2022-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.23 (2022-10-26) + +* **Documentation**: Doc only update that corrects instances of CLI not using an entity. + +# v1.18.22 (2022-10-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.21 (2022-10-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.20 (2022-10-13) + +* **Documentation**: Documentation updates for the AWS Identity and Access Management API Reference. + +# v1.18.19 (2022-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.18 (2022-09-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.17 (2022-09-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.16 (2022-08-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.15 (2022-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.14 (2022-08-24) + +* **Documentation**: Documentation updates for AWS Identity and Access Management (IAM). + +# v1.18.13 (2022-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.12 (2022-08-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.11 (2022-08-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.10 (2022-08-01) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.9 (2022-07-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.8 (2022-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.7 (2022-06-08) + +* **Documentation**: Documentation updates for AWS Identity and Access Management (IAM). + +# v1.18.6 (2022-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.5 (2022-05-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.4 (2022-04-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.3 (2022-03-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.2 (2022-03-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.1 (2022-03-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.0 (2022-03-08) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.0 (2022-02-24) + +* **Feature**: API client updated +* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.0 (2022-01-14) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.0 (2022-01-07) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.14.0 (2021-12-21) + +* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. + +# v1.13.2 (2021-12-02) + +* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.1 (2021-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.0 (2021-11-12) + +* **Feature**: Service clients now support custom endpoints that have an initial URI path defined. +* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature. + +# v1.12.0 (2021-11-06) + +* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Feature**: Updated service to latest API model. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.0 (2021-10-21) + +* **Feature**: Updated to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.1 (2021-10-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.0 (2021-09-24) + +* **Feature**: API client updated + +# v1.9.1 (2021-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.0 (2021-08-27) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.1 (2021-08-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.0 (2021-08-04) + +* **Feature**: Updated to latest API model. +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.0 (2021-07-15) + +* **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model. +* **Documentation**: Updated service model to latest revision. +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.6.0 (2021-06-25) + +* **Feature**: API client updated +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.1 (2021-06-04) + +* **Documentation**: Updated service client to latest API model. + +# v1.5.0 (2021-05-20) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.0 (2021-05-14) + +* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. +* **Dependency Update**: Updated to the latest SDK module versions + diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/LICENSE.txt new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go new file mode 100644 index 0000000000000..af4dfbab0e9dd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go @@ -0,0 +1,538 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "time" +) + +const ServiceID = "IAM" +const ServiceAPIVersion = "2010-05-08" + +// Client provides the API client to make operations call for AWS Identity and +// Access Management. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveEndpointResolverV2(&options) + + resolveAuthSchemeResolver(&options) + + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttempts(&options) + + ignoreAnonymousAuth(&options) + + wrapWithAnonymousAuth(&options) + + resolveAuthSchemes(&options) + + client := &Client{ + options: options, + } + + return client +} + +// Options returns a copy of the client configuration. +// +// Callers SHOULD NOT perform mutations on any inner structures within client +// config. Config overrides should instead be made on a per-operation basis through +// functional options. +func (c *Client) Options() Options { + return c.options.Copy() +} + +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + + for _, fn := range optFns { + fn(&options) + } + + finalizeOperationRetryMaxAttempts(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type operationInputKey struct{} + +func setOperationInput(ctx context.Context, input interface{}) context.Context { + return middleware.WithStackValue(ctx, operationInputKey{}, input) +} + +func getOperationInput(ctx context.Context) interface{} { + return middleware.GetStackValue(ctx, operationInputKey{}) +} + +type setOperationInputMiddleware struct { +} + +func (*setOperationInputMiddleware) ID() string { + return "setOperationInput" +} + +func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + ctx = setOperationInput(ctx, in.Parameters) + return next.HandleSerialize(ctx, in) +} + +func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { + return fmt.Errorf("add ResolveAuthScheme: %w", err) + } + if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { + return fmt.Errorf("add GetIdentity: %v", err) + } + if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { + return fmt.Errorf("add ResolveEndpointV2: %v", err) + } + if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + return fmt.Errorf("add Signing: %w", err) + } + return nil +} +func resolveAuthSchemeResolver(options *Options) { + if options.AuthSchemeResolver == nil { + options.AuthSchemeResolver = &defaultAuthSchemeResolver{} + } +} + +func resolveAuthSchemes(options *Options) { + if options.AuthSchemes == nil { + options.AuthSchemes = []smithyhttp.AuthScheme{ + internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ + Signer: options.HTTPSignerV4, + Logger: options.Logger, + LogSigning: options.ClientLogMode.IsSigning(), + }), + } + } +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +type legacyEndpointContextSetter struct { + LegacyResolver EndpointResolver +} + +func (*legacyEndpointContextSetter) ID() string { + return "legacyEndpointContextSetter" +} + +func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.LegacyResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) + } + + return next.HandleInitialize(ctx, in) + +} +func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { + return stack.Initialize.Add(&legacyEndpointContextSetter{ + LegacyResolver: o.EndpointResolver, + }, middleware.Before) +} + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttempts(o *Options) { + if o.RetryMaxAttempts == 0 { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func finalizeOperationRetryMaxAttempts(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "iam", goModuleVersion) + if len(options.AppID) > 0 { + ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) + } + + return nil +} + +func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { + id := (*awsmiddleware.RequestUserAgent)(nil).ID() + mw, ok := stack.Build.Get(id) + if !ok { + mw = awsmiddleware.NewRequestUserAgent() + if err := stack.Build.Add(mw, middleware.After); err != nil { + return nil, err + } + } + + ua, ok := mw.(*awsmiddleware.RequestUserAgent) + if !ok { + return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) + } + + return ua, nil +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addClientRequestID(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) +} + +func addComputeContentLength(stack *middleware.Stack) error { + return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) +} + +func addRawResponseToMetadata(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) +} + +func addRecordResponseTiming(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) +} +func addStreamingEventsPayload(stack *middleware.Stack) error { + return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) +} + +func addUnsignedPayload(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) +} + +func addComputePayloadSHA256(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) +} + +func addContentSHA256Header(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) +} + +func addRetry(stack *middleware.Stack, o Options) error { + attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { + m.LogAttempts = o.ClientLogMode.IsRetries() + }) + if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { + return err + } + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} + +type disableHTTPSMiddleware struct { + DisableHTTPS bool +} + +func (*disableHTTPSMiddleware) ID() string { + return "disableHTTPS" +} + +func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { + req.URL.Scheme = "http" + } + + return next.HandleFinalize(ctx, in) +} + +func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { + return stack.Finalize.Insert(&disableHTTPSMiddleware{ + DisableHTTPS: o.EndpointOptions.DisableHTTPS, + }, "ResolveEndpointV2", middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go new file mode 100644 index 0000000000000..b38b1d456c96f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a new client ID (also known as audience) to the list of client IDs already +// registered for the specified IAM OpenID Connect (OIDC) provider resource. This +// operation is idempotent; it does not fail or return an error if you add an +// existing client ID to the provider. +func (c *Client) AddClientIDToOpenIDConnectProvider(ctx context.Context, params *AddClientIDToOpenIDConnectProviderInput, optFns ...func(*Options)) (*AddClientIDToOpenIDConnectProviderOutput, error) { + if params == nil { + params = &AddClientIDToOpenIDConnectProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddClientIDToOpenIDConnectProvider", params, optFns, c.addOperationAddClientIDToOpenIDConnectProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddClientIDToOpenIDConnectProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddClientIDToOpenIDConnectProviderInput struct { + + // The client ID (also known as audience) to add to the IAM OpenID Connect + // provider resource. + // + // This member is required. + ClientID *string + + // The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider + // resource to add the client ID to. You can get a list of OIDC provider ARNs by + // using the ListOpenIDConnectProviders operation. + // + // This member is required. + OpenIDConnectProviderArn *string + + noSmithyDocumentSerde +} + +type AddClientIDToOpenIDConnectProviderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAddClientIDToOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddClientIDToOpenIDConnectProvider"); 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 = 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 = addOpAddClientIDToOpenIDConnectProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddClientIDToOpenIDConnectProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opAddClientIDToOpenIDConnectProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddClientIDToOpenIDConnectProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go new file mode 100644 index 0000000000000..54c27cb4b4069 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds the specified IAM role to the specified instance profile. An instance +// profile can contain only one role, and this quota cannot be increased. You can +// remove the existing role and then add a different role to an instance profile. +// You must then wait for the change to appear across all of Amazon Web Services +// because of eventual consistency (https://en.wikipedia.org/wiki/Eventual_consistency) +// . To force the change, you must disassociate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html) +// and then associate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html) +// , or you can stop your instance and then restart it. The caller of this +// operation must be granted the PassRole permission on the IAM role by a +// permissions policy. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) +// in the IAM User Guide. For more information about instance profiles, see Using +// instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) +// in the IAM User Guide. +func (c *Client) AddRoleToInstanceProfile(ctx context.Context, params *AddRoleToInstanceProfileInput, optFns ...func(*Options)) (*AddRoleToInstanceProfileOutput, error) { + if params == nil { + params = &AddRoleToInstanceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddRoleToInstanceProfile", params, optFns, c.addOperationAddRoleToInstanceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddRoleToInstanceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddRoleToInstanceProfileInput struct { + + // The name of the instance profile to update. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + InstanceProfileName *string + + // The name of the role to add. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type AddRoleToInstanceProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpAddRoleToInstanceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAddRoleToInstanceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddRoleToInstanceProfile"); 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 = 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 = addOpAddRoleToInstanceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddRoleToInstanceProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opAddRoleToInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddRoleToInstanceProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go new file mode 100644 index 0000000000000..23c34433ad23f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds the specified user to the specified group. +func (c *Client) AddUserToGroup(ctx context.Context, params *AddUserToGroupInput, optFns ...func(*Options)) (*AddUserToGroupOutput, error) { + if params == nil { + params = &AddUserToGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddUserToGroup", params, optFns, c.addOperationAddUserToGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddUserToGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddUserToGroupInput struct { + + // The name of the group to update. This parameter allows (through its regex + // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // This member is required. + GroupName *string + + // The name of the user to add. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type AddUserToGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpAddUserToGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAddUserToGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddUserToGroup"); 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 = 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 = addOpAddUserToGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddUserToGroup(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 + } + return nil +} + +func newServiceMetadataMiddleware_opAddUserToGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddUserToGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go new file mode 100644 index 0000000000000..28063a7b902ec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Attaches the specified managed policy to the specified IAM group. You use this +// operation to attach a managed policy to a group. To embed an inline policy in a +// group, use PutGroupPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutGroupPolicy.html) +// . As a best practice, you can validate your IAM policies. To learn more, see +// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// in the IAM User Guide. For more information about policies, see Managed +// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) AttachGroupPolicy(ctx context.Context, params *AttachGroupPolicyInput, optFns ...func(*Options)) (*AttachGroupPolicyOutput, error) { + if params == nil { + params = &AttachGroupPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AttachGroupPolicy", params, optFns, c.addOperationAttachGroupPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AttachGroupPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AttachGroupPolicyInput struct { + + // The name (friendly name, not ARN) of the group to attach the policy to. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + GroupName *string + + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more + // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + noSmithyDocumentSerde +} + +type AttachGroupPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpAttachGroupPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAttachGroupPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AttachGroupPolicy"); 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 = 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 = addOpAttachGroupPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachGroupPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opAttachGroupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AttachGroupPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go new file mode 100644 index 0000000000000..649f7660924cb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Attaches the specified managed policy to the specified IAM role. When you +// attach a managed policy to a role, the managed policy becomes part of the role's +// permission (access) policy. You cannot use a managed policy as the role's trust +// policy. The role's trust policy is created at the same time as the role, using +// CreateRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html) +// . You can update a role's trust policy using UpdateAssumerolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html) +// . Use this operation to attach a managed policy to a role. To embed an inline +// policy in a role, use PutRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutRolePolicy.html) +// . For more information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. As a best practice, you can validate your IAM policies. +// To learn more, see Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// in the IAM User Guide. +func (c *Client) AttachRolePolicy(ctx context.Context, params *AttachRolePolicyInput, optFns ...func(*Options)) (*AttachRolePolicyOutput, error) { + if params == nil { + params = &AttachRolePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AttachRolePolicy", params, optFns, c.addOperationAttachRolePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AttachRolePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AttachRolePolicyInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more + // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // The name (friendly name, not ARN) of the role to attach the policy to. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type AttachRolePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpAttachRolePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAttachRolePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AttachRolePolicy"); 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 = 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 = addOpAttachRolePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachRolePolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opAttachRolePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AttachRolePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go new file mode 100644 index 0000000000000..52f4010a62f37 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Attaches the specified managed policy to the specified user. You use this +// operation to attach a managed policy to a user. To embed an inline policy in a +// user, use PutUserPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html) +// . As a best practice, you can validate your IAM policies. To learn more, see +// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// in the IAM User Guide. For more information about policies, see Managed +// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) AttachUserPolicy(ctx context.Context, params *AttachUserPolicyInput, optFns ...func(*Options)) (*AttachUserPolicyOutput, error) { + if params == nil { + params = &AttachUserPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AttachUserPolicy", params, optFns, c.addOperationAttachUserPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AttachUserPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AttachUserPolicyInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more + // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // The name (friendly name, not ARN) of the IAM user to attach the policy to. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type AttachUserPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpAttachUserPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAttachUserPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AttachUserPolicy"); 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 = 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 = addOpAttachUserPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachUserPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opAttachUserPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AttachUserPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go new file mode 100644 index 0000000000000..5999053d312c9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes the password of the IAM user who is calling this operation. This +// operation can be performed using the CLI, the Amazon Web Services API, or the My +// Security Credentials page in the Amazon Web Services Management Console. The +// Amazon Web Services account root user password is not affected by this +// operation. Use UpdateLoginProfile to use the CLI, the Amazon Web Services API, +// or the Users page in the IAM console to change the password for any IAM user. +// For more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) +// in the IAM User Guide. +func (c *Client) ChangePassword(ctx context.Context, params *ChangePasswordInput, optFns ...func(*Options)) (*ChangePasswordOutput, error) { + if params == nil { + params = &ChangePasswordInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ChangePassword", params, optFns, c.addOperationChangePasswordMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ChangePasswordOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ChangePasswordInput struct { + + // The new password. The new password must conform to the Amazon Web Services + // account's password policy, if one exists. The regex pattern (http://wikipedia.org/wiki/regex) + // that is used to validate this parameter is a string of characters. That string + // can include almost any printable ASCII character from the space ( \u0020 ) + // through the end of the ASCII character range ( \u00FF ). You can also include + // the tab ( \u0009 ), line feed ( \u000A ), and carriage return ( \u000D ) + // characters. Any of these characters are valid in a password. However, many + // tools, such as the Amazon Web Services Management Console, might restrict the + // ability to type certain characters because they have special meaning within that + // tool. + // + // This member is required. + NewPassword *string + + // The IAM user's current password. + // + // This member is required. + OldPassword *string + + noSmithyDocumentSerde +} + +type ChangePasswordOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpChangePassword{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpChangePassword{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ChangePassword"); 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 = 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 = addOpChangePasswordValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangePassword(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 + } + return nil +} + +func newServiceMetadataMiddleware_opChangePassword(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ChangePassword", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go new file mode 100644 index 0000000000000..03776db6779ae --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new Amazon Web Services secret access key and corresponding Amazon +// Web Services access key ID for the specified user. The default status for new +// keys is Active . If you do not specify a user name, IAM determines the user name +// implicitly based on the Amazon Web Services access key ID signing the request. +// This operation works for access keys under the Amazon Web Services account. +// Consequently, you can use this operation to manage Amazon Web Services account +// root user credentials. This is true even if the Amazon Web Services account has +// no associated users. For information about quotas on the number of keys you can +// create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. To ensure the security of your Amazon Web Services +// account, the secret access key is accessible only during key and user creation. +// You must save the key (for example, in a text file) if you want to be able to +// access it again. If a secret key is lost, you can delete the access keys for the +// associated user and then create new keys. +func (c *Client) CreateAccessKey(ctx context.Context, params *CreateAccessKeyInput, optFns ...func(*Options)) (*CreateAccessKeyOutput, error) { + if params == nil { + params = &CreateAccessKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAccessKey", params, optFns, c.addOperationCreateAccessKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAccessKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAccessKeyInput struct { + + // The name of the IAM user that the new key will belong to. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateAccessKey request. +type CreateAccessKeyOutput struct { + + // A structure with details about the access key. + // + // This member is required. + AccessKey *types.AccessKey + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateAccessKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateAccessKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAccessKey"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccessKey(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateAccessKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAccessKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go new file mode 100644 index 0000000000000..9306a0cd8e1d0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an alias for your Amazon Web Services account. For information about +// using an Amazon Web Services account alias, see Creating, deleting, and listing +// an Amazon Web Services account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) +// in the Amazon Web Services Sign-In User Guide. +func (c *Client) CreateAccountAlias(ctx context.Context, params *CreateAccountAliasInput, optFns ...func(*Options)) (*CreateAccountAliasOutput, error) { + if params == nil { + params = &CreateAccountAliasInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAccountAlias", params, optFns, c.addOperationCreateAccountAliasMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAccountAliasOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAccountAliasInput struct { + + // The account alias to create. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of lowercase letters, digits, and dashes. + // You cannot start or finish with a dash, nor can you have two dashes in a row. + // + // This member is required. + AccountAlias *string + + noSmithyDocumentSerde +} + +type CreateAccountAliasOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateAccountAlias{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateAccountAlias{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAccountAlias"); 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 = 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 = addOpCreateAccountAliasValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccountAlias(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateAccountAlias(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAccountAlias", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go new file mode 100644 index 0000000000000..91c330e05b403 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new group. For information about the number of groups you can create, +// see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. +func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optFns ...func(*Options)) (*CreateGroupOutput, error) { + if params == nil { + params = &CreateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateGroup", params, optFns, c.addOperationCreateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateGroupInput struct { + + // The name of the group to create. Do not include the path in this value. IAM + // user, group, role, and policy names must be unique within the account. Names are + // not distinguished by case. For example, you cannot create resources named both + // "MyResource" and "myresource". + // + // This member is required. + GroupName *string + + // The path to the group. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. This parameter is optional. If it is not included, it + // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + Path *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateGroup request. +type CreateGroupOutput struct { + + // A structure containing details about the new group. + // + // This member is required. + Group *types.Group + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateGroup"); 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 = 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 = addOpCreateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGroup(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go new file mode 100644 index 0000000000000..dde7912f4a5ac --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new instance profile. For information about instance profiles, see +// Using roles for applications on Amazon EC2 (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html) +// in the IAM User Guide, and Instance profiles (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile) +// in the Amazon EC2 User Guide. For information about the number of instance +// profiles you can create, see IAM object quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. +func (c *Client) CreateInstanceProfile(ctx context.Context, params *CreateInstanceProfileInput, optFns ...func(*Options)) (*CreateInstanceProfileOutput, error) { + if params == nil { + params = &CreateInstanceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateInstanceProfile", params, optFns, c.addOperationCreateInstanceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateInstanceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateInstanceProfileInput struct { + + // The name of the instance profile to create. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + InstanceProfileName *string + + // The path to the instance profile. For more information about paths, see IAM + // Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. This parameter is optional. If it is not included, it + // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + Path *string + + // A list of tags that you want to attach to the newly created IAM instance + // profile. Each tag consists of a key name and an associated value. For more + // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. If any one of the tags is invalid or if you exceed the + // allowed maximum number of tags, then the entire request fails and the resource + // is not created. + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateInstanceProfile request. +type CreateInstanceProfileOutput struct { + + // A structure containing details about the new instance profile. + // + // This member is required. + InstanceProfile *types.InstanceProfile + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateInstanceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateInstanceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateInstanceProfile"); 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 = 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 = addOpCreateInstanceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateInstanceProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go new file mode 100644 index 0000000000000..0e00a84da2ca7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a password for the specified IAM user. A password allows an IAM user to +// access Amazon Web Services services through the Amazon Web Services Management +// Console. You can use the CLI, the Amazon Web Services API, or the Users page in +// the IAM console to create a password for any IAM user. Use ChangePassword to +// update your own existing password in the My Security Credentials page in the +// Amazon Web Services Management Console. For more information about managing +// passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) +// in the IAM User Guide. +func (c *Client) CreateLoginProfile(ctx context.Context, params *CreateLoginProfileInput, optFns ...func(*Options)) (*CreateLoginProfileOutput, error) { + if params == nil { + params = &CreateLoginProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLoginProfile", params, optFns, c.addOperationCreateLoginProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLoginProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLoginProfileInput struct { + + // The new password for the user. The regex pattern (http://wikipedia.org/wiki/regex) + // that is used to validate this parameter is a string of characters. That string + // can include almost any printable ASCII character from the space ( \u0020 ) + // through the end of the ASCII character range ( \u00FF ). You can also include + // the tab ( \u0009 ), line feed ( \u000A ), and carriage return ( \u000D ) + // characters. Any of these characters are valid in a password. However, many + // tools, such as the Amazon Web Services Management Console, might restrict the + // ability to type certain characters because they have special meaning within that + // tool. + // + // This member is required. + Password *string + + // The name of the IAM user to create a password for. The user must already exist. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + UserName *string + + // Specifies whether the user is required to set a new password on next sign-in. + PasswordResetRequired bool + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateLoginProfile request. +type CreateLoginProfileOutput struct { + + // A structure containing the user name and password create date. + // + // This member is required. + LoginProfile *types.LoginProfile + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateLoginProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateLoginProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLoginProfile"); 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 = 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 = addOpCreateLoginProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLoginProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateLoginProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateLoginProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go new file mode 100644 index 0000000000000..e472d15f07fc4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go @@ -0,0 +1,217 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an IAM entity to describe an identity provider (IdP) that supports +// OpenID Connect (OIDC) (http://openid.net/connect/) . The OIDC provider that you +// create with this operation can be used as a principal in a role's trust policy. +// Such a policy establishes a trust relationship between Amazon Web Services and +// the OIDC provider. If you are using an OIDC identity provider from Google, +// Facebook, or Amazon Cognito, you don't need to create a separate IAM identity +// provider. These OIDC identity providers are already built-in to Amazon Web +// Services and are available for your use. Instead, you can move directly to +// creating new roles using your identity provider. To learn more, see Creating a +// role for web identity or OpenID connect federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html) +// in the IAM User Guide. When you create the IAM OIDC provider, you specify the +// following: +// - The URL of the OIDC identity provider (IdP) to trust +// - A list of client IDs (also known as audiences) that identify the +// application or applications allowed to authenticate using the OIDC provider +// - A list of tags that are attached to the specified IAM OIDC provider +// - A list of thumbprints of one or more server certificates that the IdP uses +// +// You get all of this information from the OIDC IdP you want to use to access +// Amazon Web Services. Amazon Web Services secures communication with some OIDC +// identity providers (IdPs) through our library of trusted root certificate +// authorities (CAs) instead of using a certificate thumbprint to verify your IdP +// server certificate. In these cases, your legacy thumbprint remains in your +// configuration, but is no longer used for validation. These OIDC IdPs include +// Auth0, GitHub, GitLab, Google, and those that use an Amazon S3 bucket to host a +// JSON Web Key Set (JWKS) endpoint. The trust for the OIDC provider is derived +// from the IAM provider that this operation creates. Therefore, it is best to +// limit access to the CreateOpenIDConnectProvider operation to highly privileged +// users. +func (c *Client) CreateOpenIDConnectProvider(ctx context.Context, params *CreateOpenIDConnectProviderInput, optFns ...func(*Options)) (*CreateOpenIDConnectProviderOutput, error) { + if params == nil { + params = &CreateOpenIDConnectProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOpenIDConnectProvider", params, optFns, c.addOperationCreateOpenIDConnectProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOpenIDConnectProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOpenIDConnectProviderInput struct { + + // A list of server certificate thumbprints for the OpenID Connect (OIDC) identity + // provider's server certificates. Typically this list includes only one entry. + // However, IAM lets you have up to five thumbprints for an OIDC provider. This + // lets you maintain multiple thumbprints if the identity provider is rotating + // certificates. The server certificate thumbprint is the hex-encoded SHA-1 hash + // value of the X.509 certificate used by the domain where the OpenID Connect + // provider makes its keys available. It is always a 40-character string. You must + // provide at least one thumbprint when creating an IAM OIDC provider. For example, + // assume that the OIDC provider is server.example.com and the provider stores its + // keys at https://keys.server.example.com/openid-connect. In that case, the + // thumbprint string would be the hex-encoded SHA-1 hash value of the certificate + // used by https://keys.server.example.com. For more information about obtaining + // the OIDC provider thumbprint, see Obtaining the thumbprint for an OpenID + // Connect provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html) + // in the IAM user Guide. + // + // This member is required. + ThumbprintList []string + + // The URL of the identity provider. The URL must begin with https:// and should + // correspond to the iss claim in the provider's OpenID Connect ID tokens. Per the + // OIDC standard, path components are allowed but query parameters are not. + // Typically the URL consists of only a hostname, like https://server.example.org + // or https://example.com . The URL should not contain a port number. You cannot + // register the same provider multiple times in a single Amazon Web Services + // account. If you try to submit a URL that has already been used for an OpenID + // Connect provider in the Amazon Web Services account, you will get an error. + // + // This member is required. + Url *string + + // Provides a list of client IDs, also known as audiences. When a mobile or web + // app registers with an OpenID Connect provider, they establish a value that + // identifies the application. This is the value that's sent as the client_id + // parameter on OAuth requests. You can register multiple client IDs with the same + // provider. For example, you might have multiple applications that use the same + // OIDC provider. You cannot register more than 100 client IDs with a single IAM + // OIDC provider. There is no defined format for a client ID. The + // CreateOpenIDConnectProviderRequest operation accepts client IDs up to 255 + // characters long. + ClientIDList []string + + // A list of tags that you want to attach to the new IAM OpenID Connect (OIDC) + // provider. Each tag consists of a key name and an associated value. For more + // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. If any one of the tags is invalid or if you exceed the + // allowed maximum number of tags, then the entire request fails and the resource + // is not created. + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateOpenIDConnectProvider request. +type CreateOpenIDConnectProviderOutput struct { + + // The Amazon Resource Name (ARN) of the new IAM OpenID Connect provider that is + // created. For more information, see OpenIDConnectProviderListEntry . + OpenIDConnectProviderArn *string + + // A list of tags that are attached to the new IAM OIDC provider. The returned + // list of tags is sorted by tag key. For more information about tagging, see + // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOpenIDConnectProvider"); 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 = 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 = addOpCreateOpenIDConnectProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOpenIDConnectProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateOpenIDConnectProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateOpenIDConnectProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go new file mode 100644 index 0000000000000..6aa86d58331a0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new managed policy for your Amazon Web Services account. This +// operation creates a policy version with a version identifier of v1 and sets v1 +// as the policy's default version. For more information about policy versions, see +// Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) +// in the IAM User Guide. As a best practice, you can validate your IAM policies. +// To learn more, see Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// in the IAM User Guide. For more information about managed policies in general, +// see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyInput, optFns ...func(*Options)) (*CreatePolicyOutput, error) { + if params == nil { + params = &CreatePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePolicy", params, optFns, c.addOperationCreatePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreatePolicyInput struct { + + // The JSON policy document that you want to use as the content for the new + // policy. You must provide policies in JSON format in IAM. However, for + // CloudFormation templates formatted in YAML, you can provide the policy in JSON + // or YAML format. CloudFormation always converts a YAML policy to JSON format + // before submitting it to IAM. The maximum length of the policy document that you + // can pass in this operation, including whitespace, is listed below. To view the + // maximum character counts of a managed policy with no whitespaces, see IAM and + // STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) + // . To learn more about JSON policy grammar, see Grammar of the IAM JSON policy + // language (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html) + // in the IAM User Guide. The regex pattern (http://wikipedia.org/wiki/regex) used + // to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PolicyDocument *string + + // The friendly name of the policy. IAM user, group, role, and policy names must + // be unique within the account. Names are not distinguished by case. For example, + // you cannot create resources named both "MyResource" and "myresource". + // + // This member is required. + PolicyName *string + + // A friendly description of the policy. Typically used to store information about + // the permissions defined in the policy. For example, "Grants access to production + // DynamoDB tables." The policy description is immutable. After a value is + // assigned, it cannot be changed. + Description *string + + // The path for the policy. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. This parameter is optional. If it is not included, it + // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + // You cannot use an asterisk (*) in the path name. + Path *string + + // A list of tags that you want to attach to the new IAM customer managed policy. + // Each tag consists of a key name and an associated value. For more information + // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. If any one of the tags is invalid or if you exceed the + // allowed maximum number of tags, then the entire request fails and the resource + // is not created. + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreatePolicy request. +type CreatePolicyOutput struct { + + // A structure containing details about the new policy. + Policy *types.Policy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreatePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreatePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePolicy"); 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 = 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 = addOpCreatePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreatePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreatePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go new file mode 100644 index 0000000000000..ac9ad2eb92de2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new version of the specified managed policy. To update a managed +// policy, you create a new policy version. A managed policy can have up to five +// versions. If the policy has five versions, you must delete an existing version +// using DeletePolicyVersion before you create a new version. Optionally, you can +// set the new version as the policy's default version. The default version is the +// version that is in effect for the IAM users, groups, and roles to which the +// policy is attached. For more information about managed policy versions, see +// Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) +// in the IAM User Guide. +func (c *Client) CreatePolicyVersion(ctx context.Context, params *CreatePolicyVersionInput, optFns ...func(*Options)) (*CreatePolicyVersionOutput, error) { + if params == nil { + params = &CreatePolicyVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePolicyVersion", params, optFns, c.addOperationCreatePolicyVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePolicyVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreatePolicyVersionInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new + // version. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // The JSON policy document that you want to use as the content for this new + // version of the policy. You must provide policies in JSON format in IAM. However, + // for CloudFormation templates formatted in YAML, you can provide the policy in + // JSON or YAML format. CloudFormation always converts a YAML policy to JSON format + // before submitting it to IAM. The maximum length of the policy document that you + // can pass in this operation, including whitespace, is listed below. To view the + // maximum character counts of a managed policy with no whitespaces, see IAM and + // STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) + // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this + // parameter is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PolicyDocument *string + + // Specifies whether to set this version as the policy's default version. When + // this parameter is true , the new policy version becomes the operative version. + // That is, it becomes the version that is in effect for the IAM users, groups, and + // roles that the policy is attached to. For more information about managed policy + // versions, see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) + // in the IAM User Guide. + SetAsDefault bool + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreatePolicyVersion request. +type CreatePolicyVersionOutput struct { + + // A structure containing details about the new policy version. + PolicyVersion *types.PolicyVersion + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreatePolicyVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreatePolicyVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePolicyVersion"); 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 = 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 = addOpCreatePolicyVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePolicyVersion(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreatePolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreatePolicyVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go new file mode 100644 index 0000000000000..3cf0102ca1076 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go @@ -0,0 +1,212 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new role for your Amazon Web Services account. For more information +// about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) +// in the IAM User Guide. For information about quotas for role names and the +// number of roles you can create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. +func (c *Client) CreateRole(ctx context.Context, params *CreateRoleInput, optFns ...func(*Options)) (*CreateRoleOutput, error) { + if params == nil { + params = &CreateRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRole", params, optFns, c.addOperationCreateRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRoleInput struct { + + // The trust relationship policy document that grants an entity permission to + // assume the role. In IAM, you must provide a JSON policy that has been converted + // to a string. However, for CloudFormation templates formatted in YAML, you can + // provide the policy in JSON or YAML format. CloudFormation always converts a YAML + // policy to JSON format before submitting it to IAM. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // Upon success, the response includes the same trust policy in JSON format. + // + // This member is required. + AssumeRolePolicyDocument *string + + // The name of the role to create. IAM user, group, role, and policy names must be + // unique within the account. Names are not distinguished by case. For example, you + // cannot create resources named both "MyResource" and "myresource". This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + // A description of the role. + Description *string + + // The maximum session duration (in seconds) that you want to set for the + // specified role. If you do not specify a value for this setting, the default + // value of one hour is applied. This setting can have a value from 1 hour to 12 + // hours. Anyone who assumes the role from the CLI or API can use the + // DurationSeconds API parameter or the duration-seconds CLI parameter to request + // a longer session. The MaxSessionDuration setting determines the maximum + // duration that can be requested using the DurationSeconds parameter. If users + // don't specify a value for the DurationSeconds parameter, their security + // credentials are valid for one hour by default. This applies when you use the + // AssumeRole* API operations or the assume-role* CLI operations but does not + // apply when you use those operations to create a console URL. For more + // information, see Using IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) + // in the IAM User Guide. + MaxSessionDuration *int32 + + // The path to the role. For more information about paths, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. This parameter is optional. If it is not included, it + // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + Path *string + + // The ARN of the managed policy that is used to set the permissions boundary for + // the role. A permissions boundary policy defines the maximum permissions that + // identity-based policies can grant to an entity, but does not grant permissions. + // Permissions boundaries do not define the maximum permissions that a + // resource-based policy can grant to an entity. To learn more, see Permissions + // boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. For more information about policy types, see Policy + // types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) + // in the IAM User Guide. + PermissionsBoundary *string + + // A list of tags that you want to attach to the new role. Each tag consists of a + // key name and an associated value. For more information about tagging, see + // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. If any one of the tags is invalid or if you exceed the + // allowed maximum number of tags, then the entire request fails and the resource + // is not created. + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateRole request. +type CreateRoleOutput struct { + + // A structure containing details about the new role. + // + // This member is required. + Role *types.Role + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateRole"); 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 = 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 = addOpCreateRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRole(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go new file mode 100644 index 0000000000000..e2d1720cad684 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go @@ -0,0 +1,180 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an IAM resource that describes an identity provider (IdP) that supports +// SAML 2.0. The SAML provider resource that you create with this operation can be +// used as a principal in an IAM role's trust policy. Such a policy can enable +// federated users who sign in using the SAML IdP to assume the role. You can +// create an IAM role that supports Web-based single sign-on (SSO) to the Amazon +// Web Services Management Console or one that supports API access to Amazon Web +// Services. When you create the SAML provider resource, you upload a SAML metadata +// document that you get from your IdP. That document includes the issuer's name, +// expiration information, and keys that can be used to validate the SAML +// authentication response (assertions) that the IdP sends. You must generate the +// metadata document using the identity management software that is used as your +// organization's IdP. This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) +// . For more information, see Enabling SAML 2.0 federated users to access the +// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html) +// and About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) +// in the IAM User Guide. +func (c *Client) CreateSAMLProvider(ctx context.Context, params *CreateSAMLProviderInput, optFns ...func(*Options)) (*CreateSAMLProviderOutput, error) { + if params == nil { + params = &CreateSAMLProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateSAMLProvider", params, optFns, c.addOperationCreateSAMLProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateSAMLProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateSAMLProviderInput struct { + + // The name of the provider to create. This parameter allows (through its regex + // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // This member is required. + Name *string + + // An XML document generated by an identity provider (IdP) that supports SAML 2.0. + // The document includes the issuer's name, expiration information, and keys that + // can be used to validate the SAML authentication response (assertions) that are + // received from the IdP. You must generate the metadata document using the + // identity management software that is used as your organization's IdP. For more + // information, see About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) + // in the IAM User Guide + // + // This member is required. + SAMLMetadataDocument *string + + // A list of tags that you want to attach to the new IAM SAML provider. Each tag + // consists of a key name and an associated value. For more information about + // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. If any one of the tags is invalid or if you exceed the + // allowed maximum number of tags, then the entire request fails and the resource + // is not created. + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateSAMLProvider request. +type CreateSAMLProviderOutput struct { + + // The Amazon Resource Name (ARN) of the new SAML provider resource in IAM. + SAMLProviderArn *string + + // A list of tags that are attached to the new IAM SAML provider. The returned + // list of tags is sorted by tag key. For more information about tagging, see + // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateSAMLProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateSAMLProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSAMLProvider"); 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 = 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 = addOpCreateSAMLProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSAMLProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateSAMLProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateSAMLProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go new file mode 100644 index 0000000000000..99cca536316d0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an IAM role that is linked to a specific Amazon Web Services service. +// The service controls the attached policies and when the role can be deleted. +// This helps ensure that the service is not broken by an unexpectedly changed or +// deleted role, which could put your Amazon Web Services resources into an unknown +// state. Allowing the service to control the role helps improve service stability +// and proper cleanup when a service and its role are no longer needed. For more +// information, see Using service-linked roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) +// in the IAM User Guide. To attach a policy to this service-linked role, you must +// make the request using the Amazon Web Services service that depends on this +// role. +func (c *Client) CreateServiceLinkedRole(ctx context.Context, params *CreateServiceLinkedRoleInput, optFns ...func(*Options)) (*CreateServiceLinkedRoleOutput, error) { + if params == nil { + params = &CreateServiceLinkedRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateServiceLinkedRole", params, optFns, c.addOperationCreateServiceLinkedRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateServiceLinkedRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateServiceLinkedRoleInput struct { + + // The service principal for the Amazon Web Services service to which this role is + // attached. You use a string similar to a URL but without the http:// in front. + // For example: elasticbeanstalk.amazonaws.com . Service principals are unique and + // case-sensitive. To find the exact service principal for your service-linked + // role, see Amazon Web Services services that work with IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) + // in the IAM User Guide. Look for the services that have Yes in the Service-Linked + // Role column. Choose the Yes link to view the service-linked role documentation + // for that service. + // + // This member is required. + AWSServiceName *string + + // A string that you provide, which is combined with the service-provided prefix + // to form the complete role name. If you make multiple requests for the same + // service, then you must supply a different CustomSuffix for each request. + // Otherwise the request fails with a duplicate role name error. For example, you + // could add -1 or -debug to the suffix. Some services do not support the + // CustomSuffix parameter. If you provide an optional suffix and the operation + // fails, try the operation again without the suffix. + CustomSuffix *string + + // The description of the role. + Description *string + + noSmithyDocumentSerde +} + +type CreateServiceLinkedRoleOutput struct { + + // A Role object that contains details about the newly created role. + Role *types.Role + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateServiceLinkedRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateServiceLinkedRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateServiceLinkedRole"); 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 = 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 = addOpCreateServiceLinkedRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateServiceLinkedRole(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateServiceLinkedRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateServiceLinkedRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go new file mode 100644 index 0000000000000..0b36b81f15839 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Generates a set of credentials consisting of a user name and password that can +// be used to access the service specified in the request. These credentials are +// generated by IAM, and can be used only for the specified service. You can have a +// maximum of two sets of service-specific credentials for each supported service +// per user. You can create service-specific credentials for CodeCommit and Amazon +// Keyspaces (for Apache Cassandra). You can reset the password to a new +// service-generated value by calling ResetServiceSpecificCredential . For more +// information about service-specific credentials, see Using IAM with CodeCommit: +// Git credentials, SSH keys, and Amazon Web Services access keys (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html) +// in the IAM User Guide. +func (c *Client) CreateServiceSpecificCredential(ctx context.Context, params *CreateServiceSpecificCredentialInput, optFns ...func(*Options)) (*CreateServiceSpecificCredentialOutput, error) { + if params == nil { + params = &CreateServiceSpecificCredentialInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateServiceSpecificCredential", params, optFns, c.addOperationCreateServiceSpecificCredentialMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateServiceSpecificCredentialOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateServiceSpecificCredentialInput struct { + + // The name of the Amazon Web Services service that is to be associated with the + // credentials. The service you specify here is the only service that can be + // accessed using these credentials. + // + // This member is required. + ServiceName *string + + // The name of the IAM user that is to be associated with the credentials. The new + // service-specific credentials have the same permissions as the associated user + // except that they can be used only to access the specified service. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type CreateServiceSpecificCredentialOutput struct { + + // A structure that contains information about the newly created service-specific + // credential. This is the only time that the password for this credential set is + // available. It cannot be recovered later. Instead, you must reset the password + // with ResetServiceSpecificCredential . + ServiceSpecificCredential *types.ServiceSpecificCredential + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateServiceSpecificCredential{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateServiceSpecificCredential{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateServiceSpecificCredential"); 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 = 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 = addOpCreateServiceSpecificCredentialValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateServiceSpecificCredential(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateServiceSpecificCredential(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateServiceSpecificCredential", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go new file mode 100644 index 0000000000000..6b8c403339fc3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new IAM user for your Amazon Web Services account. For information +// about quotas for the number of IAM users you can create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. +func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns ...func(*Options)) (*CreateUserOutput, error) { + if params == nil { + params = &CreateUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateUser", params, optFns, c.addOperationCreateUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateUserInput struct { + + // The name of the user to create. IAM user, group, role, and policy names must be + // unique within the account. Names are not distinguished by case. For example, you + // cannot create resources named both "MyResource" and "myresource". + // + // This member is required. + UserName *string + + // The path for the user name. For more information about paths, see IAM + // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. This parameter is optional. If it is not included, it + // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + Path *string + + // The ARN of the managed policy that is used to set the permissions boundary for + // the user. A permissions boundary policy defines the maximum permissions that + // identity-based policies can grant to an entity, but does not grant permissions. + // Permissions boundaries do not define the maximum permissions that a + // resource-based policy can grant to an entity. To learn more, see Permissions + // boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. For more information about policy types, see Policy + // types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) + // in the IAM User Guide. + PermissionsBoundary *string + + // A list of tags that you want to attach to the new user. Each tag consists of a + // key name and an associated value. For more information about tagging, see + // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. If any one of the tags is invalid or if you exceed the + // allowed maximum number of tags, then the entire request fails and the resource + // is not created. + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateUser request. +type CreateUserOutput struct { + + // A structure with details about the new IAM user. + User *types.User + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateUser{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateUser"); 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 = 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 = addOpCreateUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUser(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateUser", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go new file mode 100644 index 0000000000000..6d8e0d6867b80 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new virtual MFA device for the Amazon Web Services account. After +// creating the virtual MFA, use EnableMFADevice to attach the MFA device to an +// IAM user. For more information about creating and working with virtual MFA +// devices, see Using a virtual MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) +// in the IAM User Guide. For information about the maximum number of MFA devices +// you can create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. The seed information contained in the QR code and the +// Base32 string should be treated like any other secret access information. In +// other words, protect the seed information as you would your Amazon Web Services +// access keys or your passwords. After you provision your virtual device, you +// should ensure that the information is destroyed following secure procedures. +func (c *Client) CreateVirtualMFADevice(ctx context.Context, params *CreateVirtualMFADeviceInput, optFns ...func(*Options)) (*CreateVirtualMFADeviceOutput, error) { + if params == nil { + params = &CreateVirtualMFADeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateVirtualMFADevice", params, optFns, c.addOperationCreateVirtualMFADeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateVirtualMFADeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateVirtualMFADeviceInput struct { + + // The name of the virtual MFA device, which must be unique. Use with path to + // uniquely identify a virtual MFA device. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + VirtualMFADeviceName *string + + // The path for the virtual MFA device. For more information about paths, see IAM + // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. This parameter is optional. If it is not included, it + // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + Path *string + + // A list of tags that you want to attach to the new IAM virtual MFA device. Each + // tag consists of a key name and an associated value. For more information about + // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. If any one of the tags is invalid or if you exceed the + // allowed maximum number of tags, then the entire request fails and the resource + // is not created. + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Contains the response to a successful CreateVirtualMFADevice request. +type CreateVirtualMFADeviceOutput struct { + + // A structure containing details about the new virtual MFA device. + // + // This member is required. + VirtualMFADevice *types.VirtualMFADevice + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateVirtualMFADevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateVirtualMFADevice{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVirtualMFADevice"); 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 = 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 = addOpCreateVirtualMFADeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVirtualMFADevice(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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateVirtualMFADevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateVirtualMFADevice", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go new file mode 100644 index 0000000000000..be155c45d0e2a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deactivates the specified MFA device and removes it from association with the +// user name for which it was originally enabled. For more information about +// creating and working with virtual MFA devices, see Enabling a virtual +// multi-factor authentication (MFA) device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) +// in the IAM User Guide. +func (c *Client) DeactivateMFADevice(ctx context.Context, params *DeactivateMFADeviceInput, optFns ...func(*Options)) (*DeactivateMFADeviceOutput, error) { + if params == nil { + params = &DeactivateMFADeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeactivateMFADevice", params, optFns, c.addOperationDeactivateMFADeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeactivateMFADeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeactivateMFADeviceInput struct { + + // The serial number that uniquely identifies the MFA device. For virtual MFA + // devices, the serial number is the device ARN. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: =,.@:/- + // + // This member is required. + SerialNumber *string + + // The name of the user whose MFA device you want to deactivate. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type DeactivateMFADeviceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeactivateMFADevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeactivateMFADevice{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeactivateMFADevice"); 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 = 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 = addOpDeactivateMFADeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateMFADevice(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeactivateMFADevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeactivateMFADevice", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go new file mode 100644 index 0000000000000..600a6776052be --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the access key pair associated with the specified IAM user. If you do +// not specify a user name, IAM determines the user name implicitly based on the +// Amazon Web Services access key ID signing the request. This operation works for +// access keys under the Amazon Web Services account. Consequently, you can use +// this operation to manage Amazon Web Services account root user credentials even +// if the Amazon Web Services account has no associated users. +func (c *Client) DeleteAccessKey(ctx context.Context, params *DeleteAccessKeyInput, optFns ...func(*Options)) (*DeleteAccessKeyOutput, error) { + if params == nil { + params = &DeleteAccessKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAccessKey", params, optFns, c.addOperationDeleteAccessKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAccessKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAccessKeyInput struct { + + // The access key ID for the access key ID and secret access key you want to + // delete. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters that can consist of any upper or lowercased letter or + // digit. + // + // This member is required. + AccessKeyId *string + + // The name of the user whose access key pair you want to delete. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +type DeleteAccessKeyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteAccessKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteAccessKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAccessKey"); 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 = 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 = addOpDeleteAccessKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccessKey(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAccessKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAccessKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go new file mode 100644 index 0000000000000..0424523ca9d7c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified Amazon Web Services account alias. For information about +// using an Amazon Web Services account alias, see Creating, deleting, and listing +// an Amazon Web Services account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) +// in the Amazon Web Services Sign-In User Guide. +func (c *Client) DeleteAccountAlias(ctx context.Context, params *DeleteAccountAliasInput, optFns ...func(*Options)) (*DeleteAccountAliasOutput, error) { + if params == nil { + params = &DeleteAccountAliasInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAccountAlias", params, optFns, c.addOperationDeleteAccountAliasMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAccountAliasOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAccountAliasInput struct { + + // The name of the account alias to delete. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of lowercase letters, digits, and dashes. You cannot start or finish + // with a dash, nor can you have two dashes in a row. + // + // This member is required. + AccountAlias *string + + noSmithyDocumentSerde +} + +type DeleteAccountAliasOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteAccountAlias{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteAccountAlias{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAccountAlias"); 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 = 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 = addOpDeleteAccountAliasValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountAlias(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAccountAlias(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAccountAlias", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go new file mode 100644 index 0000000000000..a9edc762dd9f7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the password policy for the Amazon Web Services account. There are no +// parameters. +func (c *Client) DeleteAccountPasswordPolicy(ctx context.Context, params *DeleteAccountPasswordPolicyInput, optFns ...func(*Options)) (*DeleteAccountPasswordPolicyOutput, error) { + if params == nil { + params = &DeleteAccountPasswordPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAccountPasswordPolicy", params, optFns, c.addOperationDeleteAccountPasswordPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAccountPasswordPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAccountPasswordPolicyInput struct { + noSmithyDocumentSerde +} + +type DeleteAccountPasswordPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteAccountPasswordPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteAccountPasswordPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAccountPasswordPolicy"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountPasswordPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAccountPasswordPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAccountPasswordPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go new file mode 100644 index 0000000000000..c23bd792bdea7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified IAM group. The group must not contain any users or have +// any attached policies. +func (c *Client) DeleteGroup(ctx context.Context, params *DeleteGroupInput, optFns ...func(*Options)) (*DeleteGroupOutput, error) { + if params == nil { + params = &DeleteGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteGroup", params, optFns, c.addOperationDeleteGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteGroupInput struct { + + // The name of the IAM group to delete. This parameter allows (through its regex + // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // This member is required. + GroupName *string + + noSmithyDocumentSerde +} + +type DeleteGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteGroup"); 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 = 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 = addOpDeleteGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroup(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go new file mode 100644 index 0000000000000..cc3afbcc549c6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified inline policy that is embedded in the specified IAM +// group. A group can also have managed policies attached to it. To detach a +// managed policy from a group, use DetachGroupPolicy . For more information about +// policies, refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) DeleteGroupPolicy(ctx context.Context, params *DeleteGroupPolicyInput, optFns ...func(*Options)) (*DeleteGroupPolicyOutput, error) { + if params == nil { + params = &DeleteGroupPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteGroupPolicy", params, optFns, c.addOperationDeleteGroupPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteGroupPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteGroupPolicyInput struct { + + // The name (friendly name, not ARN) identifying the group that the policy is + // embedded in. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + GroupName *string + + // The name identifying the policy document to delete. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + noSmithyDocumentSerde +} + +type DeleteGroupPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteGroupPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteGroupPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteGroupPolicy"); 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 = 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 = addOpDeleteGroupPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroupPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteGroupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteGroupPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go new file mode 100644 index 0000000000000..732a2a0a58ca5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified instance profile. The instance profile must not have an +// associated role. Make sure that you do not have any Amazon EC2 instances running +// with the instance profile you are about to delete. Deleting a role or instance +// profile that is associated with a running instance will break any applications +// running on the instance. For more information about instance profiles, see +// Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) +// in the IAM User Guide. +func (c *Client) DeleteInstanceProfile(ctx context.Context, params *DeleteInstanceProfileInput, optFns ...func(*Options)) (*DeleteInstanceProfileOutput, error) { + if params == nil { + params = &DeleteInstanceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteInstanceProfile", params, optFns, c.addOperationDeleteInstanceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteInstanceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteInstanceProfileInput struct { + + // The name of the instance profile to delete. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + InstanceProfileName *string + + noSmithyDocumentSerde +} + +type DeleteInstanceProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteInstanceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteInstanceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteInstanceProfile"); 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 = 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 = addOpDeleteInstanceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInstanceProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteInstanceProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go new file mode 100644 index 0000000000000..fac350f819a26 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the password for the specified IAM user, For more information, see +// Managing passwords for IAM users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html) +// . You can use the CLI, the Amazon Web Services API, or the Users page in the IAM +// console to delete a password for any IAM user. You can use ChangePassword to +// update, but not delete, your own password in the My Security Credentials page in +// the Amazon Web Services Management Console. Deleting a user's password does not +// prevent a user from accessing Amazon Web Services through the command line +// interface or the API. To prevent all user access, you must also either make any +// access keys inactive or delete them. For more information about making keys +// inactive or deleting them, see UpdateAccessKey and DeleteAccessKey . +func (c *Client) DeleteLoginProfile(ctx context.Context, params *DeleteLoginProfileInput, optFns ...func(*Options)) (*DeleteLoginProfileOutput, error) { + if params == nil { + params = &DeleteLoginProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLoginProfile", params, optFns, c.addOperationDeleteLoginProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLoginProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLoginProfileInput struct { + + // The name of the user whose password you want to delete. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type DeleteLoginProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteLoginProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteLoginProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLoginProfile"); 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 = 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 = addOpDeleteLoginProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLoginProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLoginProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteLoginProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go new file mode 100644 index 0000000000000..37df78331da9b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go @@ -0,0 +1,138 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an OpenID Connect identity provider (IdP) resource object in IAM. +// Deleting an IAM OIDC provider resource does not update any roles that reference +// the provider as a principal in their trust policies. Any attempt to assume a +// role that references a deleted provider fails. This operation is idempotent; it +// does not fail or return an error if you call the operation for a provider that +// does not exist. +func (c *Client) DeleteOpenIDConnectProvider(ctx context.Context, params *DeleteOpenIDConnectProviderInput, optFns ...func(*Options)) (*DeleteOpenIDConnectProviderOutput, error) { + if params == nil { + params = &DeleteOpenIDConnectProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteOpenIDConnectProvider", params, optFns, c.addOperationDeleteOpenIDConnectProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteOpenIDConnectProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteOpenIDConnectProviderInput struct { + + // The Amazon Resource Name (ARN) of the IAM OpenID Connect provider resource + // object to delete. You can get a list of OpenID Connect provider resource ARNs by + // using the ListOpenIDConnectProviders operation. + // + // This member is required. + OpenIDConnectProviderArn *string + + noSmithyDocumentSerde +} + +type DeleteOpenIDConnectProviderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOpenIDConnectProvider"); 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 = 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 = addOpDeleteOpenIDConnectProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOpenIDConnectProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteOpenIDConnectProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteOpenIDConnectProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go new file mode 100644 index 0000000000000..3f6e7439791fe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified managed policy. Before you can delete a managed policy, +// you must first detach the policy from all users, groups, and roles that it is +// attached to. In addition, you must delete all the policy's versions. The +// following steps describe the process for deleting a managed policy: +// - Detach the policy from all users, groups, and roles that the policy is +// attached to, using DetachUserPolicy , DetachGroupPolicy , or DetachRolePolicy +// . To list all the users, groups, and roles that a policy is attached to, use +// ListEntitiesForPolicy . +// - Delete all versions of the policy using DeletePolicyVersion . To list the +// policy's versions, use ListPolicyVersions . You cannot use DeletePolicyVersion +// to delete the version that is marked as the default version. You delete the +// policy's default version in the next step of the process. +// - Delete the policy (this automatically deletes the policy's default version) +// using this operation. +// +// For information about managed policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, optFns ...func(*Options)) (*DeletePolicyOutput, error) { + if params == nil { + params = &DeletePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePolicy", params, optFns, c.addOperationDeletePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePolicyInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy you want to delete. For more + // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + noSmithyDocumentSerde +} + +type DeletePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeletePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeletePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePolicy"); 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 = 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 = addOpDeletePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeletePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeletePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go new file mode 100644 index 0000000000000..b470dc39bebe0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified version from the specified managed policy. You cannot +// delete the default version from a policy using this operation. To delete the +// default version from a policy, use DeletePolicy . To find out which version of a +// policy is marked as the default version, use ListPolicyVersions . For +// information about versions for managed policies, see Versioning for managed +// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) +// in the IAM User Guide. +func (c *Client) DeletePolicyVersion(ctx context.Context, params *DeletePolicyVersionInput, optFns ...func(*Options)) (*DeletePolicyVersionOutput, error) { + if params == nil { + params = &DeletePolicyVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePolicyVersion", params, optFns, c.addOperationDeletePolicyVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePolicyVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePolicyVersionInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy from which you want to delete + // a version. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // The policy version to delete. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters that consists of the lowercase letter 'v' followed by + // one or two digits, and optionally followed by a period '.' and a string of + // letters and digits. For more information about managed policy versions, see + // Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) + // in the IAM User Guide. + // + // This member is required. + VersionId *string + + noSmithyDocumentSerde +} + +type DeletePolicyVersionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeletePolicyVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeletePolicyVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePolicyVersion"); 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 = 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 = addOpDeletePolicyVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicyVersion(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeletePolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeletePolicyVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go new file mode 100644 index 0000000000000..67989ef86db83 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified role. Unlike the Amazon Web Services Management Console, +// when you delete a role programmatically, you must delete the items attached to +// the role manually, or the deletion fails. For more information, see Deleting an +// IAM role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_delete.html#roles-managingrole-deleting-cli) +// . Before attempting to delete a role, remove the following attached items: +// - Inline policies ( DeleteRolePolicy ) +// - Attached managed policies ( DetachRolePolicy ) +// - Instance profile ( RemoveRoleFromInstanceProfile ) +// - Optional – Delete instance profile after detaching from role for resource +// clean up ( DeleteInstanceProfile ) +// +// Make sure that you do not have any Amazon EC2 instances running with the role +// you are about to delete. Deleting a role or instance profile that is associated +// with a running instance will break any applications running on the instance. +func (c *Client) DeleteRole(ctx context.Context, params *DeleteRoleInput, optFns ...func(*Options)) (*DeleteRoleOutput, error) { + if params == nil { + params = &DeleteRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRole", params, optFns, c.addOperationDeleteRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRoleInput struct { + + // The name of the role to delete. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type DeleteRoleOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRole"); 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 = 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 = addOpDeleteRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRole(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go new file mode 100644 index 0000000000000..425bcfd33561a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the permissions boundary for the specified IAM role. You cannot set the +// boundary for a service-linked role. Deleting the permissions boundary for a role +// might increase its permissions. For example, it might allow anyone who assumes +// the role to perform all the actions granted in its permissions policies. +func (c *Client) DeleteRolePermissionsBoundary(ctx context.Context, params *DeleteRolePermissionsBoundaryInput, optFns ...func(*Options)) (*DeleteRolePermissionsBoundaryOutput, error) { + if params == nil { + params = &DeleteRolePermissionsBoundaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRolePermissionsBoundary", params, optFns, c.addOperationDeleteRolePermissionsBoundaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRolePermissionsBoundaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRolePermissionsBoundaryInput struct { + + // The name (friendly name, not ARN) of the IAM role from which you want to remove + // the permissions boundary. + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type DeleteRolePermissionsBoundaryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteRolePermissionsBoundary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteRolePermissionsBoundary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRolePermissionsBoundary"); 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 = 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 = addOpDeleteRolePermissionsBoundaryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRolePermissionsBoundary(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRolePermissionsBoundary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteRolePermissionsBoundary", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go new file mode 100644 index 0000000000000..41cc1bc772b82 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified inline policy that is embedded in the specified IAM role. +// A role can also have managed policies attached to it. To detach a managed policy +// from a role, use DetachRolePolicy . For more information about policies, refer +// to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) DeleteRolePolicy(ctx context.Context, params *DeleteRolePolicyInput, optFns ...func(*Options)) (*DeleteRolePolicyOutput, error) { + if params == nil { + params = &DeleteRolePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRolePolicy", params, optFns, c.addOperationDeleteRolePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRolePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRolePolicyInput struct { + + // The name of the inline policy to delete from the specified IAM role. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + // The name (friendly name, not ARN) identifying the role that the policy is + // embedded in. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type DeleteRolePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteRolePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteRolePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRolePolicy"); 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 = 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 = addOpDeleteRolePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRolePolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRolePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteRolePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go new file mode 100644 index 0000000000000..59cf5189eb6c6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a SAML provider resource in IAM. Deleting the provider resource from +// IAM does not update any roles that reference the SAML provider resource's ARN as +// a principal in their trust policies. Any attempt to assume a role that +// references a non-existent provider resource ARN fails. This operation requires +// Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) +// . +func (c *Client) DeleteSAMLProvider(ctx context.Context, params *DeleteSAMLProviderInput, optFns ...func(*Options)) (*DeleteSAMLProviderOutput, error) { + if params == nil { + params = &DeleteSAMLProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteSAMLProvider", params, optFns, c.addOperationDeleteSAMLProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteSAMLProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteSAMLProviderInput struct { + + // The Amazon Resource Name (ARN) of the SAML provider to delete. + // + // This member is required. + SAMLProviderArn *string + + noSmithyDocumentSerde +} + +type DeleteSAMLProviderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteSAMLProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteSAMLProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSAMLProvider"); 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 = 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 = addOpDeleteSAMLProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSAMLProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteSAMLProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteSAMLProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go new file mode 100644 index 0000000000000..6b90de1fa37f0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified SSH public key. The SSH public key deleted by this +// operation is used only for authenticating the associated IAM user to an +// CodeCommit repository. For more information about using SSH keys to authenticate +// to an CodeCommit repository, see Set up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) +// in the CodeCommit User Guide. +func (c *Client) DeleteSSHPublicKey(ctx context.Context, params *DeleteSSHPublicKeyInput, optFns ...func(*Options)) (*DeleteSSHPublicKeyOutput, error) { + if params == nil { + params = &DeleteSSHPublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteSSHPublicKey", params, optFns, c.addOperationDeleteSSHPublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteSSHPublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteSSHPublicKeyInput struct { + + // The unique identifier for the SSH public key. This parameter allows (through + // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // that can consist of any upper or lowercased letter or digit. + // + // This member is required. + SSHPublicKeyId *string + + // The name of the IAM user associated with the SSH public key. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type DeleteSSHPublicKeyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteSSHPublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteSSHPublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSSHPublicKey"); 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 = 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 = addOpDeleteSSHPublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSSHPublicKey(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteSSHPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteSSHPublicKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go new file mode 100644 index 0000000000000..f91110f6a2a43 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified server certificate. For more information about working +// with server certificates, see Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. This topic also includes a list of Amazon Web Services +// services that can use the server certificates that you manage with IAM. If you +// are using a server certificate with Elastic Load Balancing, deleting the +// certificate could have implications for your application. If Elastic Load +// Balancing doesn't detect the deletion of bound certificates, it may continue to +// use the certificates. This could cause Elastic Load Balancing to stop accepting +// traffic. We recommend that you remove the reference to the certificate from +// Elastic Load Balancing before using this command to delete the certificate. For +// more information, see DeleteLoadBalancerListeners (https://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html) +// in the Elastic Load Balancing API Reference. +func (c *Client) DeleteServerCertificate(ctx context.Context, params *DeleteServerCertificateInput, optFns ...func(*Options)) (*DeleteServerCertificateOutput, error) { + if params == nil { + params = &DeleteServerCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteServerCertificate", params, optFns, c.addOperationDeleteServerCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteServerCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteServerCertificateInput struct { + + // The name of the server certificate you want to delete. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + ServerCertificateName *string + + noSmithyDocumentSerde +} + +type DeleteServerCertificateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteServerCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteServerCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteServerCertificate"); 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 = 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 = addOpDeleteServerCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteServerCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteServerCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteServerCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go new file mode 100644 index 0000000000000..d4b7c69d7a45c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Submits a service-linked role deletion request and returns a DeletionTaskId , +// which you can use to check the status of the deletion. Before you call this +// operation, confirm that the role has no active sessions and that any resources +// used by the role in the linked service are deleted. If you call this operation +// more than once for the same service-linked role and an earlier deletion task is +// not complete, then the DeletionTaskId of the earlier request is returned. If +// you submit a deletion request for a service-linked role whose linked service is +// still accessing a resource, then the deletion task fails. If it fails, the +// GetServiceLinkedRoleDeletionStatus operation returns the reason for the failure, +// usually including the resources that must be deleted. To delete the +// service-linked role, you must first remove those resources from the linked +// service and then submit the deletion request again. Resources are specific to +// the service that is linked to the role. For more information about removing +// resources from a service, see the Amazon Web Services documentation (http://docs.aws.amazon.com/) +// for your service. For more information about service-linked roles, see Roles +// terms and concepts: Amazon Web Services service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role) +// in the IAM User Guide. +func (c *Client) DeleteServiceLinkedRole(ctx context.Context, params *DeleteServiceLinkedRoleInput, optFns ...func(*Options)) (*DeleteServiceLinkedRoleOutput, error) { + if params == nil { + params = &DeleteServiceLinkedRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteServiceLinkedRole", params, optFns, c.addOperationDeleteServiceLinkedRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteServiceLinkedRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteServiceLinkedRoleInput struct { + + // The name of the service-linked role to be deleted. + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type DeleteServiceLinkedRoleOutput struct { + + // The deletion task identifier that you can use to check the status of the + // deletion. This identifier is returned in the format task/aws-service-role/// . + // + // This member is required. + DeletionTaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteServiceLinkedRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteServiceLinkedRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteServiceLinkedRole"); 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 = 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 = addOpDeleteServiceLinkedRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteServiceLinkedRole(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteServiceLinkedRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteServiceLinkedRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go new file mode 100644 index 0000000000000..99aeb8e99266c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified service-specific credential. +func (c *Client) DeleteServiceSpecificCredential(ctx context.Context, params *DeleteServiceSpecificCredentialInput, optFns ...func(*Options)) (*DeleteServiceSpecificCredentialOutput, error) { + if params == nil { + params = &DeleteServiceSpecificCredentialInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteServiceSpecificCredential", params, optFns, c.addOperationDeleteServiceSpecificCredentialMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteServiceSpecificCredentialOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteServiceSpecificCredentialInput struct { + + // The unique identifier of the service-specific credential. You can get this + // value by calling ListServiceSpecificCredentials . This parameter allows (through + // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // that can consist of any upper or lowercased letter or digit. + // + // This member is required. + ServiceSpecificCredentialId *string + + // The name of the IAM user associated with the service-specific credential. If + // this value is not specified, then the operation assumes the user whose + // credentials are used to call the operation. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +type DeleteServiceSpecificCredentialOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteServiceSpecificCredential{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteServiceSpecificCredential{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteServiceSpecificCredential"); 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 = 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 = addOpDeleteServiceSpecificCredentialValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteServiceSpecificCredential(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteServiceSpecificCredential(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteServiceSpecificCredential", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go new file mode 100644 index 0000000000000..866433d1f010d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a signing certificate associated with the specified IAM user. If you do +// not specify a user name, IAM determines the user name implicitly based on the +// Amazon Web Services access key ID signing the request. This operation works for +// access keys under the Amazon Web Services account. Consequently, you can use +// this operation to manage Amazon Web Services account root user credentials even +// if the Amazon Web Services account has no associated IAM users. +func (c *Client) DeleteSigningCertificate(ctx context.Context, params *DeleteSigningCertificateInput, optFns ...func(*Options)) (*DeleteSigningCertificateOutput, error) { + if params == nil { + params = &DeleteSigningCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteSigningCertificate", params, optFns, c.addOperationDeleteSigningCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteSigningCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteSigningCertificateInput struct { + + // The ID of the signing certificate to delete. The format of this parameter, as + // described by its regex (http://wikipedia.org/wiki/regex) pattern, is a string + // of characters that can be upper- or lower-cased letters or digits. + // + // This member is required. + CertificateId *string + + // The name of the user the signing certificate belongs to. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +type DeleteSigningCertificateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteSigningCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteSigningCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSigningCertificate"); 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 = 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 = addOpDeleteSigningCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSigningCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteSigningCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteSigningCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go new file mode 100644 index 0000000000000..ec1a279b49cbb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified IAM user. Unlike the Amazon Web Services Management +// Console, when you delete a user programmatically, you must delete the items +// attached to the user manually, or the deletion fails. For more information, see +// Deleting an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_deleting_cli) +// . Before attempting to delete a user, remove the following items: +// - Password ( DeleteLoginProfile ) +// - Access keys ( DeleteAccessKey ) +// - Signing certificate ( DeleteSigningCertificate ) +// - SSH public key ( DeleteSSHPublicKey ) +// - Git credentials ( DeleteServiceSpecificCredential ) +// - Multi-factor authentication (MFA) device ( DeactivateMFADevice , +// DeleteVirtualMFADevice ) +// - Inline policies ( DeleteUserPolicy ) +// - Attached managed policies ( DetachUserPolicy ) +// - Group memberships ( RemoveUserFromGroup ) +func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns ...func(*Options)) (*DeleteUserOutput, error) { + if params == nil { + params = &DeleteUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteUser", params, optFns, c.addOperationDeleteUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteUserInput struct { + + // The name of the user to delete. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type DeleteUserOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteUser{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteUser"); 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 = 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 = addOpDeleteUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUser(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteUser", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go new file mode 100644 index 0000000000000..6cfceb1186a77 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the permissions boundary for the specified IAM user. Deleting the +// permissions boundary for a user might increase its permissions by allowing the +// user to perform all the actions granted in its permissions policies. +func (c *Client) DeleteUserPermissionsBoundary(ctx context.Context, params *DeleteUserPermissionsBoundaryInput, optFns ...func(*Options)) (*DeleteUserPermissionsBoundaryOutput, error) { + if params == nil { + params = &DeleteUserPermissionsBoundaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteUserPermissionsBoundary", params, optFns, c.addOperationDeleteUserPermissionsBoundaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteUserPermissionsBoundaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteUserPermissionsBoundaryInput struct { + + // The name (friendly name, not ARN) of the IAM user from which you want to remove + // the permissions boundary. + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type DeleteUserPermissionsBoundaryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteUserPermissionsBoundary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteUserPermissionsBoundary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteUserPermissionsBoundary"); 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 = 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 = addOpDeleteUserPermissionsBoundaryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUserPermissionsBoundary(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteUserPermissionsBoundary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteUserPermissionsBoundary", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go new file mode 100644 index 0000000000000..15213695b9509 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified inline policy that is embedded in the specified IAM user. +// A user can also have managed policies attached to it. To detach a managed policy +// from a user, use DetachUserPolicy . For more information about policies, refer +// to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) DeleteUserPolicy(ctx context.Context, params *DeleteUserPolicyInput, optFns ...func(*Options)) (*DeleteUserPolicyOutput, error) { + if params == nil { + params = &DeleteUserPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteUserPolicy", params, optFns, c.addOperationDeleteUserPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteUserPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteUserPolicyInput struct { + + // The name identifying the policy document to delete. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + // The name (friendly name, not ARN) identifying the user that the policy is + // embedded in. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type DeleteUserPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteUserPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteUserPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteUserPolicy"); 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 = 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 = addOpDeleteUserPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUserPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteUserPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteUserPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go new file mode 100644 index 0000000000000..5804cb4413bb4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a virtual MFA device. You must deactivate a user's virtual MFA device +// before you can delete it. For information about deactivating MFA devices, see +// DeactivateMFADevice . +func (c *Client) DeleteVirtualMFADevice(ctx context.Context, params *DeleteVirtualMFADeviceInput, optFns ...func(*Options)) (*DeleteVirtualMFADeviceOutput, error) { + if params == nil { + params = &DeleteVirtualMFADeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteVirtualMFADevice", params, optFns, c.addOperationDeleteVirtualMFADeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteVirtualMFADeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteVirtualMFADeviceInput struct { + + // The serial number that uniquely identifies the MFA device. For virtual MFA + // devices, the serial number is the same as the ARN. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: =,.@:/- + // + // This member is required. + SerialNumber *string + + noSmithyDocumentSerde +} + +type DeleteVirtualMFADeviceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteVirtualMFADevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteVirtualMFADevice{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVirtualMFADevice"); 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 = 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 = addOpDeleteVirtualMFADeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVirtualMFADevice(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteVirtualMFADevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteVirtualMFADevice", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go new file mode 100644 index 0000000000000..0189737930700 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified managed policy from the specified IAM group. A group can +// also have inline policies embedded with it. To delete an inline policy, use +// DeleteGroupPolicy . For information about policies, see Managed policies and +// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) DetachGroupPolicy(ctx context.Context, params *DetachGroupPolicyInput, optFns ...func(*Options)) (*DetachGroupPolicyOutput, error) { + if params == nil { + params = &DetachGroupPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DetachGroupPolicy", params, optFns, c.addOperationDetachGroupPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DetachGroupPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DetachGroupPolicyInput struct { + + // The name (friendly name, not ARN) of the IAM group to detach the policy from. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + GroupName *string + + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more + // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + noSmithyDocumentSerde +} + +type DetachGroupPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDetachGroupPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDetachGroupPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DetachGroupPolicy"); 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 = 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 = addOpDetachGroupPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachGroupPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDetachGroupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DetachGroupPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go new file mode 100644 index 0000000000000..3cf8d7fecb6eb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified managed policy from the specified role. A role can also +// have inline policies embedded with it. To delete an inline policy, use +// DeleteRolePolicy . For information about policies, see Managed policies and +// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) DetachRolePolicy(ctx context.Context, params *DetachRolePolicyInput, optFns ...func(*Options)) (*DetachRolePolicyOutput, error) { + if params == nil { + params = &DetachRolePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DetachRolePolicy", params, optFns, c.addOperationDetachRolePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DetachRolePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DetachRolePolicyInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more + // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // The name (friendly name, not ARN) of the IAM role to detach the policy from. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type DetachRolePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDetachRolePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDetachRolePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DetachRolePolicy"); 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 = 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 = addOpDetachRolePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachRolePolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDetachRolePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DetachRolePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go new file mode 100644 index 0000000000000..d9a608a79a97d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified managed policy from the specified user. A user can also +// have inline policies embedded with it. To delete an inline policy, use +// DeleteUserPolicy . For information about policies, see Managed policies and +// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) DetachUserPolicy(ctx context.Context, params *DetachUserPolicyInput, optFns ...func(*Options)) (*DetachUserPolicyOutput, error) { + if params == nil { + params = &DetachUserPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DetachUserPolicy", params, optFns, c.addOperationDetachUserPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DetachUserPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DetachUserPolicyInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more + // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // The name (friendly name, not ARN) of the IAM user to detach the policy from. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type DetachUserPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDetachUserPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDetachUserPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DetachUserPolicy"); 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 = 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 = addOpDetachUserPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachUserPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opDetachUserPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DetachUserPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go new file mode 100644 index 0000000000000..d9911cbb82ed8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables the specified MFA device and associates it with the specified IAM user. +// When enabled, the MFA device is required for every subsequent login by the IAM +// user associated with the device. +func (c *Client) EnableMFADevice(ctx context.Context, params *EnableMFADeviceInput, optFns ...func(*Options)) (*EnableMFADeviceOutput, error) { + if params == nil { + params = &EnableMFADeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "EnableMFADevice", params, optFns, c.addOperationEnableMFADeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*EnableMFADeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type EnableMFADeviceInput struct { + + // An authentication code emitted by the device. The format for this parameter is + // a string of six digits. Submit your request immediately after generating the + // authentication codes. If you generate the codes and then wait too long to submit + // the request, the MFA device successfully associates with the user but the MFA + // device becomes out of sync. This happens because time-based one-time passwords + // (TOTP) expire after a short period of time. If this happens, you can resync the + // device (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html) + // . + // + // This member is required. + AuthenticationCode1 *string + + // A subsequent authentication code emitted by the device. The format for this + // parameter is a string of six digits. Submit your request immediately after + // generating the authentication codes. If you generate the codes and then wait too + // long to submit the request, the MFA device successfully associates with the user + // but the MFA device becomes out of sync. This happens because time-based one-time + // passwords (TOTP) expire after a short period of time. If this happens, you can + // resync the device (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html) + // . + // + // This member is required. + AuthenticationCode2 *string + + // The serial number that uniquely identifies the MFA device. For virtual MFA + // devices, the serial number is the device ARN. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: =,.@:/- + // + // This member is required. + SerialNumber *string + + // The name of the IAM user for whom you want to enable the MFA device. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type EnableMFADeviceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpEnableMFADevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpEnableMFADevice{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "EnableMFADevice"); 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 = 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 = addOpEnableMFADeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableMFADevice(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 + } + return nil +} + +func newServiceMetadataMiddleware_opEnableMFADevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "EnableMFADevice", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go new file mode 100644 index 0000000000000..6ed0670cab3ca --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Generates a credential report for the Amazon Web Services account. For more +// information about the credential report, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) +// in the IAM User Guide. +func (c *Client) GenerateCredentialReport(ctx context.Context, params *GenerateCredentialReportInput, optFns ...func(*Options)) (*GenerateCredentialReportOutput, error) { + if params == nil { + params = &GenerateCredentialReportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GenerateCredentialReport", params, optFns, c.addOperationGenerateCredentialReportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GenerateCredentialReportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GenerateCredentialReportInput struct { + noSmithyDocumentSerde +} + +// Contains the response to a successful GenerateCredentialReport request. +type GenerateCredentialReportOutput struct { + + // Information about the credential report. + Description *string + + // Information about the state of the credential report. + State types.ReportStateType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGenerateCredentialReport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGenerateCredentialReport{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateCredentialReport"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateCredentialReport(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGenerateCredentialReport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GenerateCredentialReport", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go new file mode 100644 index 0000000000000..7998fcadf5a31 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go @@ -0,0 +1,239 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Generates a report for service last accessed data for Organizations. You can +// generate a report for any entities (organization root, organizational unit, or +// account) or policies in your organization. To call this operation, you must be +// signed in using your Organizations management account credentials. You can use +// your long-term IAM user or root user credentials, or temporary credentials from +// assuming an IAM role. SCPs must be enabled for your organization root. You must +// have the required IAM and Organizations permissions. For more information, see +// Refining permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) +// in the IAM User Guide. You can generate a service last accessed data report for +// entities by specifying only the entity's path. This data includes a list of +// services that are allowed by any service control policies (SCPs) that apply to +// the entity. You can generate a service last accessed data report for a policy by +// specifying an entity's path and an optional Organizations policy ID. This data +// includes a list of services that are allowed by the specified SCP. For each +// service in both report types, the data includes the most recent account activity +// that the policy allows to account principals in the entity or the entity's +// children. For important information about the data, reporting period, +// permissions required, troubleshooting, and supported Regions see Reducing +// permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) +// in the IAM User Guide. The data includes all attempts to access Amazon Web +// Services, not just the successful ones. This includes all attempts that were +// made using the Amazon Web Services Management Console, the Amazon Web Services +// API through any of the SDKs, or any of the command line tools. An unexpected +// entry in the service last accessed data does not mean that an account has been +// compromised, because the request might have been denied. Refer to your +// CloudTrail logs as the authoritative source for information about all API calls +// and whether they were successful or denied access. For more information, see +// Logging IAM events with CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) +// in the IAM User Guide. This operation returns a JobId . Use this parameter in +// the GetOrganizationsAccessReport operation to check the status of the report +// generation. To check the status of this request, use the JobId parameter in the +// GetOrganizationsAccessReport operation and test the JobStatus response +// parameter. When the job is complete, you can retrieve the report. To generate a +// service last accessed data report for entities, specify an entity path without +// specifying the optional Organizations policy ID. The type of entity that you +// specify determines the data returned in the report. +// - Root – When you specify the organizations root as the entity, the resulting +// report lists all of the services allowed by SCPs that are attached to your root. +// For each service, the report includes data for all accounts in your organization +// except the management account, because the management account is not limited by +// SCPs. +// - OU – When you specify an organizational unit (OU) as the entity, the +// resulting report lists all of the services allowed by SCPs that are attached to +// the OU and its parents. For each service, the report includes data for all +// accounts in the OU or its children. This data excludes the management account, +// because the management account is not limited by SCPs. +// - management account – When you specify the management account, the resulting +// report lists all Amazon Web Services services, because the management account is +// not limited by SCPs. For each service, the report includes data for only the +// management account. +// - Account – When you specify another account as the entity, the resulting +// report lists all of the services allowed by SCPs that are attached to the +// account and its parents. For each service, the report includes data for only the +// specified account. +// +// To generate a service last accessed data report for policies, specify an entity +// path and the optional Organizations policy ID. The type of entity that you +// specify determines the data returned for each service. +// - Root – When you specify the root entity and a policy ID, the resulting +// report lists all of the services that are allowed by the specified SCP. For each +// service, the report includes data for all accounts in your organization to which +// the SCP applies. This data excludes the management account, because the +// management account is not limited by SCPs. If the SCP is not attached to any +// entities in the organization, then the report will return a list of services +// with no data. +// - OU – When you specify an OU entity and a policy ID, the resulting report +// lists all of the services that are allowed by the specified SCP. For each +// service, the report includes data for all accounts in the OU or its children to +// which the SCP applies. This means that other accounts outside the OU that are +// affected by the SCP might not be included in the data. This data excludes the +// management account, because the management account is not limited by SCPs. If +// the SCP is not attached to the OU or one of its children, the report will return +// a list of services with no data. +// - management account – When you specify the management account, the resulting +// report lists all Amazon Web Services services, because the management account is +// not limited by SCPs. If you specify a policy ID in the CLI or API, the policy is +// ignored. For each service, the report includes data for only the management +// account. +// - Account – When you specify another account entity and a policy ID, the +// resulting report lists all of the services that are allowed by the specified +// SCP. For each service, the report includes data for only the specified account. +// This means that other accounts in the organization that are affected by the SCP +// might not be included in the data. If the SCP is not attached to the account, +// the report will return a list of services with no data. +// +// Service last accessed data does not use other policy types when determining +// whether a principal could access a service. These other policy types include +// identity-based policies, resource-based policies, access control lists, IAM +// permissions boundaries, and STS assume role policies. It only applies SCP logic. +// For more about the evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) +// in the IAM User Guide. For more information about service last accessed data, +// see Reducing policy scope by viewing user activity (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) +// in the IAM User Guide. +func (c *Client) GenerateOrganizationsAccessReport(ctx context.Context, params *GenerateOrganizationsAccessReportInput, optFns ...func(*Options)) (*GenerateOrganizationsAccessReportOutput, error) { + if params == nil { + params = &GenerateOrganizationsAccessReportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GenerateOrganizationsAccessReport", params, optFns, c.addOperationGenerateOrganizationsAccessReportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GenerateOrganizationsAccessReportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GenerateOrganizationsAccessReportInput struct { + + // The path of the Organizations entity (root, OU, or account). You can build an + // entity path using the known structure of your organization. For example, assume + // that your account ID is 123456789012 and its parent OU ID is ou-rge0-awsabcde . + // The organization root ID is r-f6g7h8i9j0example and your organization ID is + // o-a1b2c3d4e5 . Your entity path is + // o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-rge0-awsabcde/123456789012 . + // + // This member is required. + EntityPath *string + + // The identifier of the Organizations service control policy (SCP). This + // parameter is optional. This ID is used to generate information about when an + // account principal that is limited by the SCP attempted to access an Amazon Web + // Services service. + OrganizationsPolicyId *string + + noSmithyDocumentSerde +} + +type GenerateOrganizationsAccessReportOutput struct { + + // The job identifier that you can use in the GetOrganizationsAccessReport + // operation. + JobId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGenerateOrganizationsAccessReport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGenerateOrganizationsAccessReport{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateOrganizationsAccessReport"); 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 = 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 = addOpGenerateOrganizationsAccessReportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateOrganizationsAccessReport(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGenerateOrganizationsAccessReport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GenerateOrganizationsAccessReport", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go new file mode 100644 index 0000000000000..1afe4cd264204 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Generates a report that includes details about when an IAM resource (user, +// group, role, or policy) was last used in an attempt to access Amazon Web +// Services services. Recent activity usually appears within four hours. IAM +// reports activity for at least the last 400 days, or less if your Region began +// supporting this feature within the last year. For more information, see Regions +// where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) +// . For more information about services and actions for which action last accessed +// information is displayed, see IAM action last accessed information services and +// actions (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor-action-last-accessed.html) +// . The service last accessed data includes all attempts to access an Amazon Web +// Services API, not just the successful ones. This includes all attempts that were +// made using the Amazon Web Services Management Console, the Amazon Web Services +// API through any of the SDKs, or any of the command line tools. An unexpected +// entry in the service last accessed data does not mean that your account has been +// compromised, because the request might have been denied. Refer to your +// CloudTrail logs as the authoritative source for information about all API calls +// and whether they were successful or denied access. For more information, see +// Logging IAM events with CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) +// in the IAM User Guide. The GenerateServiceLastAccessedDetails operation returns +// a JobId . Use this parameter in the following operations to retrieve the +// following details from your report: +// - GetServiceLastAccessedDetails – Use this operation for users, groups, roles, +// or policies to list every Amazon Web Services service that the resource could +// access using permissions policies. For each service, the response includes +// information about the most recent access attempt. The JobId returned by +// GenerateServiceLastAccessedDetail must be used by the same role within a +// session, or by the same user when used to call GetServiceLastAccessedDetail . +// - GetServiceLastAccessedDetailsWithEntities – Use this operation for groups +// and policies to list information about the associated entities (users or roles) +// that attempted to access a specific Amazon Web Services service. +// +// To check the status of the GenerateServiceLastAccessedDetails request, use the +// JobId parameter in the same operations and test the JobStatus response +// parameter. For additional information about the permissions policies that allow +// an identity (user, group, or role) to access specific services, use the +// ListPoliciesGrantingServiceAccess operation. Service last accessed data does not +// use other policy types when determining whether a resource could access a +// service. These other policy types include resource-based policies, access +// control lists, Organizations policies, IAM permissions boundaries, and STS +// assume role policies. It only applies permissions policy logic. For more about +// the evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) +// in the IAM User Guide. For more information about service and action last +// accessed data, see Reducing permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) +// in the IAM User Guide. +func (c *Client) GenerateServiceLastAccessedDetails(ctx context.Context, params *GenerateServiceLastAccessedDetailsInput, optFns ...func(*Options)) (*GenerateServiceLastAccessedDetailsOutput, error) { + if params == nil { + params = &GenerateServiceLastAccessedDetailsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GenerateServiceLastAccessedDetails", params, optFns, c.addOperationGenerateServiceLastAccessedDetailsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GenerateServiceLastAccessedDetailsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GenerateServiceLastAccessedDetailsInput struct { + + // The ARN of the IAM resource (user, group, role, or managed policy) used to + // generate information about when the resource was last used in an attempt to + // access an Amazon Web Services service. + // + // This member is required. + Arn *string + + // The level of detail that you want to generate. You can specify whether you want + // to generate information about the last attempt to access services or actions. If + // you specify service-level granularity, this operation generates only service + // data. If you specify action-level granularity, it generates service and action + // data. If you don't include this optional parameter, the operation generates + // service data. + Granularity types.AccessAdvisorUsageGranularityType + + noSmithyDocumentSerde +} + +type GenerateServiceLastAccessedDetailsOutput struct { + + // The JobId that you can use in the GetServiceLastAccessedDetails or + // GetServiceLastAccessedDetailsWithEntities operations. The JobId returned by + // GenerateServiceLastAccessedDetail must be used by the same role within a + // session, or by the same user when used to call GetServiceLastAccessedDetail . + JobId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGenerateServiceLastAccessedDetails{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGenerateServiceLastAccessedDetails{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateServiceLastAccessedDetails"); 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 = 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 = addOpGenerateServiceLastAccessedDetailsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateServiceLastAccessedDetails(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGenerateServiceLastAccessedDetails(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GenerateServiceLastAccessedDetails", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go new file mode 100644 index 0000000000000..50ac658cd2331 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about when the specified access key was last used. The +// information includes the date and time of last use, along with the Amazon Web +// Services service and Region that were specified in the last request made with +// that key. +func (c *Client) GetAccessKeyLastUsed(ctx context.Context, params *GetAccessKeyLastUsedInput, optFns ...func(*Options)) (*GetAccessKeyLastUsedOutput, error) { + if params == nil { + params = &GetAccessKeyLastUsedInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAccessKeyLastUsed", params, optFns, c.addOperationGetAccessKeyLastUsedMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAccessKeyLastUsedOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAccessKeyLastUsedInput struct { + + // The identifier of an access key. This parameter allows (through its regex + // pattern (http://wikipedia.org/wiki/regex) ) a string of characters that can + // consist of any upper or lowercased letter or digit. + // + // This member is required. + AccessKeyId *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetAccessKeyLastUsed request. It is also +// returned as a member of the AccessKeyMetaData structure returned by the +// ListAccessKeys action. +type GetAccessKeyLastUsedOutput struct { + + // Contains information about the last time the access key was used. + AccessKeyLastUsed *types.AccessKeyLastUsed + + // The name of the IAM user that owns this access key. + UserName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccessKeyLastUsed{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetAccessKeyLastUsed{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccessKeyLastUsed"); 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 = 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 = addOpGetAccessKeyLastUsedValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyLastUsed(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetAccessKeyLastUsed(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAccessKeyLastUsed", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go new file mode 100644 index 0000000000000..565b0d9dfe152 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go @@ -0,0 +1,281 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about all IAM users, groups, roles, and policies in your +// Amazon Web Services account, including their relationships to one another. Use +// this operation to obtain a snapshot of the configuration of IAM permissions +// (users, groups, roles, and policies) in your account. Policies returned by this +// operation are URL-encoded compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) +// . You can use a URL decoding method to convert the policy back to plain JSON +// text. For example, if you use Java, you can use the decode method of the +// java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs +// provide similar functionality. You can optionally filter the results using the +// Filter parameter. You can paginate the results using the MaxItems and Marker +// parameters. +func (c *Client) GetAccountAuthorizationDetails(ctx context.Context, params *GetAccountAuthorizationDetailsInput, optFns ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) { + if params == nil { + params = &GetAccountAuthorizationDetailsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAccountAuthorizationDetails", params, optFns, c.addOperationGetAccountAuthorizationDetailsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAccountAuthorizationDetailsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAccountAuthorizationDetailsInput struct { + + // A list of entity types used to filter the results. Only the entities that match + // the types you specify are included in the output. Use the value + // LocalManagedPolicy to include customer managed policies. The format for this + // parameter is a comma-separated (if more than one) list of strings. Each string + // value in the list must be one of the valid values listed below. + Filter []types.EntityType + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetAccountAuthorizationDetails request. +type GetAccountAuthorizationDetailsOutput struct { + + // A list containing information about IAM groups. + GroupDetailList []types.GroupDetail + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // A list containing information about managed policies. + Policies []types.ManagedPolicyDetail + + // A list containing information about IAM roles. + RoleDetailList []types.RoleDetail + + // A list containing information about IAM users. + UserDetailList []types.UserDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccountAuthorizationDetails{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetAccountAuthorizationDetails{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccountAuthorizationDetails"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountAuthorizationDetails(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 + } + return nil +} + +// GetAccountAuthorizationDetailsAPIClient is a client that implements the +// GetAccountAuthorizationDetails operation. +type GetAccountAuthorizationDetailsAPIClient interface { + GetAccountAuthorizationDetails(context.Context, *GetAccountAuthorizationDetailsInput, ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) +} + +var _ GetAccountAuthorizationDetailsAPIClient = (*Client)(nil) + +// GetAccountAuthorizationDetailsPaginatorOptions is the paginator options for +// GetAccountAuthorizationDetails +type GetAccountAuthorizationDetailsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetAccountAuthorizationDetailsPaginator is a paginator for +// GetAccountAuthorizationDetails +type GetAccountAuthorizationDetailsPaginator struct { + options GetAccountAuthorizationDetailsPaginatorOptions + client GetAccountAuthorizationDetailsAPIClient + params *GetAccountAuthorizationDetailsInput + nextToken *string + firstPage bool +} + +// NewGetAccountAuthorizationDetailsPaginator returns a new +// GetAccountAuthorizationDetailsPaginator +func NewGetAccountAuthorizationDetailsPaginator(client GetAccountAuthorizationDetailsAPIClient, params *GetAccountAuthorizationDetailsInput, optFns ...func(*GetAccountAuthorizationDetailsPaginatorOptions)) *GetAccountAuthorizationDetailsPaginator { + if params == nil { + params = &GetAccountAuthorizationDetailsInput{} + } + + options := GetAccountAuthorizationDetailsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetAccountAuthorizationDetailsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetAccountAuthorizationDetailsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetAccountAuthorizationDetails page. +func (p *GetAccountAuthorizationDetailsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.GetAccountAuthorizationDetails(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opGetAccountAuthorizationDetails(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAccountAuthorizationDetails", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go new file mode 100644 index 0000000000000..88fca11ea8f42 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the password policy for the Amazon Web Services account. This tells +// you the complexity requirements and mandatory rotation periods for the IAM user +// passwords in your account. For more information about using a password policy, +// see Managing an IAM password policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html) +// . +func (c *Client) GetAccountPasswordPolicy(ctx context.Context, params *GetAccountPasswordPolicyInput, optFns ...func(*Options)) (*GetAccountPasswordPolicyOutput, error) { + if params == nil { + params = &GetAccountPasswordPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAccountPasswordPolicy", params, optFns, c.addOperationGetAccountPasswordPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAccountPasswordPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAccountPasswordPolicyInput struct { + noSmithyDocumentSerde +} + +// Contains the response to a successful GetAccountPasswordPolicy request. +type GetAccountPasswordPolicyOutput struct { + + // A structure that contains details about the account's password policy. + // + // This member is required. + PasswordPolicy *types.PasswordPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccountPasswordPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetAccountPasswordPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccountPasswordPolicy"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountPasswordPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetAccountPasswordPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAccountPasswordPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go new file mode 100644 index 0000000000000..0897618152b82 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about IAM entity usage and IAM quotas in the Amazon Web +// Services account. For information about IAM quotas, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. +func (c *Client) GetAccountSummary(ctx context.Context, params *GetAccountSummaryInput, optFns ...func(*Options)) (*GetAccountSummaryOutput, error) { + if params == nil { + params = &GetAccountSummaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAccountSummary", params, optFns, c.addOperationGetAccountSummaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAccountSummaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAccountSummaryInput struct { + noSmithyDocumentSerde +} + +// Contains the response to a successful GetAccountSummary request. +type GetAccountSummaryOutput struct { + + // A set of key–value pairs containing information about IAM entity usage and IAM + // quotas. + SummaryMap map[string]int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccountSummary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetAccountSummary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccountSummary"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSummary(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetAccountSummary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAccountSummary", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go new file mode 100644 index 0000000000000..0f71d4c2764d8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of all of the context keys referenced in the input policies. The +// policies are supplied as a list of one or more strings. To get the context keys +// from policies associated with an IAM user, group, or role, use +// GetContextKeysForPrincipalPolicy . Context keys are variables maintained by +// Amazon Web Services and its services that provide details about the context of +// an API query request. Context keys can be evaluated by testing against a value +// specified in an IAM policy. Use GetContextKeysForCustomPolicy to understand +// what key names and values you must supply when you call SimulateCustomPolicy . +// Note that all parameters are shown in unencoded form here for clarity but must +// be URL encoded to be included as a part of a real HTML request. +func (c *Client) GetContextKeysForCustomPolicy(ctx context.Context, params *GetContextKeysForCustomPolicyInput, optFns ...func(*Options)) (*GetContextKeysForCustomPolicyOutput, error) { + if params == nil { + params = &GetContextKeysForCustomPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetContextKeysForCustomPolicy", params, optFns, c.addOperationGetContextKeysForCustomPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetContextKeysForCustomPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetContextKeysForCustomPolicyInput struct { + + // A list of policies for which you want the list of context keys referenced in + // those policies. Each document is specified as a string containing the complete, + // valid JSON text of an IAM policy. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PolicyInputList []string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetContextKeysForPrincipalPolicy or +// GetContextKeysForCustomPolicy request. +type GetContextKeysForCustomPolicyOutput struct { + + // The list of context keys that are referenced in the input policies. + ContextKeyNames []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetContextKeysForCustomPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetContextKeysForCustomPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetContextKeysForCustomPolicy"); 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 = 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 = addOpGetContextKeysForCustomPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContextKeysForCustomPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetContextKeysForCustomPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetContextKeysForCustomPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go new file mode 100644 index 0000000000000..2383ee56acd37 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of all of the context keys referenced in all the IAM policies that +// are attached to the specified IAM entity. The entity can be an IAM user, group, +// or role. If you specify a user, then the request also includes all of the +// policies attached to groups that the user is a member of. You can optionally +// include a list of one or more additional policies, specified as strings. If you +// want to include only a list of policies by string, use +// GetContextKeysForCustomPolicy instead. Note: This operation discloses +// information about the permissions granted to other users. If you do not want +// users to see other user's permissions, then consider allowing them to use +// GetContextKeysForCustomPolicy instead. Context keys are variables maintained by +// Amazon Web Services and its services that provide details about the context of +// an API query request. Context keys can be evaluated by testing against a value +// in an IAM policy. Use GetContextKeysForPrincipalPolicy to understand what key +// names and values you must supply when you call SimulatePrincipalPolicy . +func (c *Client) GetContextKeysForPrincipalPolicy(ctx context.Context, params *GetContextKeysForPrincipalPolicyInput, optFns ...func(*Options)) (*GetContextKeysForPrincipalPolicyOutput, error) { + if params == nil { + params = &GetContextKeysForPrincipalPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetContextKeysForPrincipalPolicy", params, optFns, c.addOperationGetContextKeysForPrincipalPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetContextKeysForPrincipalPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetContextKeysForPrincipalPolicyInput struct { + + // The ARN of a user, group, or role whose policies contain the context keys that + // you want listed. If you specify a user, the list includes context keys that are + // found in all policies that are attached to the user. The list also includes all + // groups that the user is a member of. If you pick a group or a role, then it + // includes only those context keys that are found in policies attached to that + // entity. Note that all parameters are shown in unencoded form here for clarity, + // but must be URL encoded to be included as a part of a real HTML request. For + // more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicySourceArn *string + + // An optional list of additional policies for which you want the list of context + // keys that are referenced. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + PolicyInputList []string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetContextKeysForPrincipalPolicy or +// GetContextKeysForCustomPolicy request. +type GetContextKeysForPrincipalPolicyOutput struct { + + // The list of context keys that are referenced in the input policies. + ContextKeyNames []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetContextKeysForPrincipalPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetContextKeysForPrincipalPolicy"); 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 = 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 = addOpGetContextKeysForPrincipalPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContextKeysForPrincipalPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetContextKeysForPrincipalPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetContextKeysForPrincipalPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go new file mode 100644 index 0000000000000..c27fffc081c57 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go @@ -0,0 +1,138 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves a credential report for the Amazon Web Services account. For more +// information about the credential report, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) +// in the IAM User Guide. +func (c *Client) GetCredentialReport(ctx context.Context, params *GetCredentialReportInput, optFns ...func(*Options)) (*GetCredentialReportOutput, error) { + if params == nil { + params = &GetCredentialReportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCredentialReport", params, optFns, c.addOperationGetCredentialReportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCredentialReportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCredentialReportInput struct { + noSmithyDocumentSerde +} + +// Contains the response to a successful GetCredentialReport request. +type GetCredentialReportOutput struct { + + // Contains the credential report. The report is Base64-encoded. + Content []byte + + // The date and time when the credential report was created, in ISO 8601 date-time + // format (http://www.iso.org/iso/iso8601) . + GeneratedTime *time.Time + + // The format (MIME type) of the credential report. + ReportFormat types.ReportFormatType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetCredentialReport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetCredentialReport{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCredentialReport"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCredentialReport(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetCredentialReport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCredentialReport", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go new file mode 100644 index 0000000000000..5edf08a30b270 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of IAM users that are in the specified IAM group. You can +// paginate the results using the MaxItems and Marker parameters. +func (c *Client) GetGroup(ctx context.Context, params *GetGroupInput, optFns ...func(*Options)) (*GetGroupOutput, error) { + if params == nil { + params = &GetGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetGroup", params, optFns, c.addOperationGetGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetGroupInput struct { + + // The name of the group. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + GroupName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetGroup request. +type GetGroupOutput struct { + + // A structure that contains details about the group. + // + // This member is required. + Group *types.Group + + // A list of users in the group. + // + // This member is required. + Users []types.User + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetGroup"); 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 = 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 = addOpGetGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroup(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 + } + return nil +} + +// GetGroupAPIClient is a client that implements the GetGroup operation. +type GetGroupAPIClient interface { + GetGroup(context.Context, *GetGroupInput, ...func(*Options)) (*GetGroupOutput, error) +} + +var _ GetGroupAPIClient = (*Client)(nil) + +// GetGroupPaginatorOptions is the paginator options for GetGroup +type GetGroupPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetGroupPaginator is a paginator for GetGroup +type GetGroupPaginator struct { + options GetGroupPaginatorOptions + client GetGroupAPIClient + params *GetGroupInput + nextToken *string + firstPage bool +} + +// NewGetGroupPaginator returns a new GetGroupPaginator +func NewGetGroupPaginator(client GetGroupAPIClient, params *GetGroupInput, optFns ...func(*GetGroupPaginatorOptions)) *GetGroupPaginator { + if params == nil { + params = &GetGroupInput{} + } + + options := GetGroupPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetGroupPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetGroupPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetGroup page. +func (p *GetGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetGroupOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.GetGroup(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opGetGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go new file mode 100644 index 0000000000000..9f9386196f4ca --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the specified inline policy document that is embedded in the +// specified IAM group. Policies returned by this operation are URL-encoded +// compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a +// URL decoding method to convert the policy back to plain JSON text. For example, +// if you use Java, you can use the decode method of the java.net.URLDecoder +// utility class in the Java SDK. Other languages and SDKs provide similar +// functionality. An IAM group can also have managed policies attached to it. To +// retrieve a managed policy document that is attached to a group, use GetPolicy +// to determine the policy's default version, then use GetPolicyVersion to +// retrieve the policy document. For more information about policies, see Managed +// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) GetGroupPolicy(ctx context.Context, params *GetGroupPolicyInput, optFns ...func(*Options)) (*GetGroupPolicyOutput, error) { + if params == nil { + params = &GetGroupPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetGroupPolicy", params, optFns, c.addOperationGetGroupPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetGroupPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetGroupPolicyInput struct { + + // The name of the group the policy is associated with. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + GroupName *string + + // The name of the policy document to get. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetGroupPolicy request. +type GetGroupPolicyOutput struct { + + // The group the policy is associated with. + // + // This member is required. + GroupName *string + + // The policy document. IAM stores policies in JSON format. However, resources + // that were created using CloudFormation templates can be formatted in YAML. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. + // + // This member is required. + PolicyDocument *string + + // The name of the policy. + // + // This member is required. + PolicyName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetGroupPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetGroupPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetGroupPolicy"); 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 = 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 = addOpGetGroupPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetGroupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetGroupPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go new file mode 100644 index 0000000000000..d0da98ceb32d3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go @@ -0,0 +1,325 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "errors" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "time" +) + +// Retrieves information about the specified instance profile, including the +// instance profile's path, GUID, ARN, and role. For more information about +// instance profiles, see Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) +// in the IAM User Guide. +func (c *Client) GetInstanceProfile(ctx context.Context, params *GetInstanceProfileInput, optFns ...func(*Options)) (*GetInstanceProfileOutput, error) { + if params == nil { + params = &GetInstanceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetInstanceProfile", params, optFns, c.addOperationGetInstanceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetInstanceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetInstanceProfileInput struct { + + // The name of the instance profile to get information about. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + InstanceProfileName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetInstanceProfile request. +type GetInstanceProfileOutput struct { + + // A structure containing details about the instance profile. + // + // This member is required. + InstanceProfile *types.InstanceProfile + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetInstanceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetInstanceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetInstanceProfile"); 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 = 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 = addOpGetInstanceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInstanceProfile(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 + } + return nil +} + +// GetInstanceProfileAPIClient is a client that implements the GetInstanceProfile +// operation. +type GetInstanceProfileAPIClient interface { + GetInstanceProfile(context.Context, *GetInstanceProfileInput, ...func(*Options)) (*GetInstanceProfileOutput, error) +} + +var _ GetInstanceProfileAPIClient = (*Client)(nil) + +// InstanceProfileExistsWaiterOptions are waiter options for +// InstanceProfileExistsWaiter +type InstanceProfileExistsWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // InstanceProfileExistsWaiter will use default minimum delay of 1 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, InstanceProfileExistsWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetInstanceProfileInput, *GetInstanceProfileOutput, error) (bool, error) +} + +// InstanceProfileExistsWaiter defines the waiters for InstanceProfileExists +type InstanceProfileExistsWaiter struct { + client GetInstanceProfileAPIClient + + options InstanceProfileExistsWaiterOptions +} + +// NewInstanceProfileExistsWaiter constructs a InstanceProfileExistsWaiter. +func NewInstanceProfileExistsWaiter(client GetInstanceProfileAPIClient, optFns ...func(*InstanceProfileExistsWaiterOptions)) *InstanceProfileExistsWaiter { + options := InstanceProfileExistsWaiterOptions{} + options.MinDelay = 1 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = instanceProfileExistsStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &InstanceProfileExistsWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for InstanceProfileExists waiter. The maxWaitDur +// is the maximum wait duration the waiter will wait. The maxWaitDur is required +// and must be greater than zero. +func (w *InstanceProfileExistsWaiter) Wait(ctx context.Context, params *GetInstanceProfileInput, maxWaitDur time.Duration, optFns ...func(*InstanceProfileExistsWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for InstanceProfileExists waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *InstanceProfileExistsWaiter) WaitForOutput(ctx context.Context, params *GetInstanceProfileInput, maxWaitDur time.Duration, optFns ...func(*InstanceProfileExistsWaiterOptions)) (*GetInstanceProfileOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetInstanceProfile(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for InstanceProfileExists waiter") +} + +func instanceProfileExistsStateRetryable(ctx context.Context, input *GetInstanceProfileInput, output *GetInstanceProfileOutput, err error) (bool, error) { + + if err == nil { + return false, nil + } + + if err != nil { + var errorType *types.NoSuchEntityException + if errors.As(err, &errorType) { + return true, nil + } + } + + return true, nil +} + +func newServiceMetadataMiddleware_opGetInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetInstanceProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go new file mode 100644 index 0000000000000..b9e498b3e1bbf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the user name for the specified IAM user. A login profile is created +// when you create a password for the user to access the Amazon Web Services +// Management Console. If the user does not exist or does not have a password, the +// operation returns a 404 ( NoSuchEntity ) error. If you create an IAM user with +// access to the console, the CreateDate reflects the date you created the initial +// password for the user. If you create an IAM user with programmatic access, and +// then later add a password for the user to access the Amazon Web Services +// Management Console, the CreateDate reflects the initial password creation date. +// A user with programmatic access does not have a login profile unless you create +// a password for the user to access the Amazon Web Services Management Console. +func (c *Client) GetLoginProfile(ctx context.Context, params *GetLoginProfileInput, optFns ...func(*Options)) (*GetLoginProfileOutput, error) { + if params == nil { + params = &GetLoginProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLoginProfile", params, optFns, c.addOperationGetLoginProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLoginProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLoginProfileInput struct { + + // The name of the user whose login profile you want to retrieve. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetLoginProfile request. +type GetLoginProfileOutput struct { + + // A structure containing the user name and the profile creation date for the user. + // + // This member is required. + LoginProfile *types.LoginProfile + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetLoginProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetLoginProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLoginProfile"); 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 = 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 = addOpGetLoginProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoginProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetLoginProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLoginProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go new file mode 100644 index 0000000000000..d32d80f004c40 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves information about an MFA device for a specified user. +func (c *Client) GetMFADevice(ctx context.Context, params *GetMFADeviceInput, optFns ...func(*Options)) (*GetMFADeviceOutput, error) { + if params == nil { + params = &GetMFADeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMFADevice", params, optFns, c.addOperationGetMFADeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMFADeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMFADeviceInput struct { + + // Serial number that uniquely identifies the MFA device. For this API, we only + // accept FIDO security key ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html) + // . + // + // This member is required. + SerialNumber *string + + // The friendly name identifying the user. + UserName *string + + noSmithyDocumentSerde +} + +type GetMFADeviceOutput struct { + + // Serial number that uniquely identifies the MFA device. For this API, we only + // accept FIDO security key ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html) + // . + // + // This member is required. + SerialNumber *string + + // The certifications of a specified user's MFA device. We currently provide + // FIPS-140-2, FIPS-140-3, and FIDO certification levels obtained from FIDO + // Alliance Metadata Service (MDS) (https://fidoalliance.org/metadata/) . + Certifications map[string]string + + // The date that a specified user's MFA device was first enabled. + EnableDate *time.Time + + // The friendly name identifying the user. + UserName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetMFADevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetMFADevice{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMFADevice"); 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 = 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 = addOpGetMFADeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMFADevice(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetMFADevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMFADevice", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go new file mode 100644 index 0000000000000..81ed6e1bdc354 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns information about the specified OpenID Connect (OIDC) provider resource +// object in IAM. +func (c *Client) GetOpenIDConnectProvider(ctx context.Context, params *GetOpenIDConnectProviderInput, optFns ...func(*Options)) (*GetOpenIDConnectProviderOutput, error) { + if params == nil { + params = &GetOpenIDConnectProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOpenIDConnectProvider", params, optFns, c.addOperationGetOpenIDConnectProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOpenIDConnectProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOpenIDConnectProviderInput struct { + + // The Amazon Resource Name (ARN) of the OIDC provider resource object in IAM to + // get information for. You can get a list of OIDC provider resource ARNs by using + // the ListOpenIDConnectProviders operation. For more information about ARNs, see + // Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + OpenIDConnectProviderArn *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetOpenIDConnectProvider request. +type GetOpenIDConnectProviderOutput struct { + + // A list of client IDs (also known as audiences) that are associated with the + // specified IAM OIDC provider resource object. For more information, see + // CreateOpenIDConnectProvider . + ClientIDList []string + + // The date and time when the IAM OIDC provider resource object was created in the + // Amazon Web Services account. + CreateDate *time.Time + + // A list of tags that are attached to the specified IAM OIDC provider. The + // returned list of tags is sorted by tag key. For more information about tagging, + // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []types.Tag + + // A list of certificate thumbprints that are associated with the specified IAM + // OIDC provider resource object. For more information, see + // CreateOpenIDConnectProvider . + ThumbprintList []string + + // The URL that the IAM OIDC provider resource object is associated with. For more + // information, see CreateOpenIDConnectProvider . + Url *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOpenIDConnectProvider"); 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 = 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 = addOpGetOpenIDConnectProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpenIDConnectProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetOpenIDConnectProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOpenIDConnectProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go new file mode 100644 index 0000000000000..007b348cf679d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the service last accessed data report for Organizations that was +// previously generated using the GenerateOrganizationsAccessReport operation. +// This operation retrieves the status of your report job and the report contents. +// Depending on the parameters that you passed when you generated the report, the +// data returned could include different information. For details, see +// GenerateOrganizationsAccessReport . To call this operation, you must be signed +// in to the management account in your organization. SCPs must be enabled for your +// organization root. You must have permissions to perform this operation. For more +// information, see Refining permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) +// in the IAM User Guide. For each service that principals in an account (root +// user, IAM users, or IAM roles) could access using SCPs, the operation returns +// details about the most recent access attempt. If there was no attempt, the +// service is listed without details about the most recent attempt to access the +// service. If the operation fails, it returns the reason that it failed. By +// default, the list is sorted by service namespace. +func (c *Client) GetOrganizationsAccessReport(ctx context.Context, params *GetOrganizationsAccessReportInput, optFns ...func(*Options)) (*GetOrganizationsAccessReportOutput, error) { + if params == nil { + params = &GetOrganizationsAccessReportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOrganizationsAccessReport", params, optFns, c.addOperationGetOrganizationsAccessReportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOrganizationsAccessReportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOrganizationsAccessReportInput struct { + + // The identifier of the request generated by the GenerateOrganizationsAccessReport + // operation. + // + // This member is required. + JobId *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The key that is used to sort the results. If you choose the namespace key, the + // results are returned in alphabetical order. If you choose the time key, the + // results are sorted numerically by the date and time. + SortKey types.SortKeyType + + noSmithyDocumentSerde +} + +type GetOrganizationsAccessReportOutput struct { + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the report job was created. + // + // This member is required. + JobCreationDate *time.Time + + // The status of the job. + // + // This member is required. + JobStatus types.JobStatusType + + // An object that contains details about the most recent attempt to access the + // service. + AccessDetails []types.AccessDetail + + // Contains information about the reason that the operation failed. This data type + // is used as a response element in the GetOrganizationsAccessReport , + // GetServiceLastAccessedDetails , and GetServiceLastAccessedDetailsWithEntities + // operations. + ErrorDetails *types.ErrorDetails + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the generated report job was completed or failed. This field is null if + // the job is still in progress, as indicated by a job status value of IN_PROGRESS . + JobCompletionDate *time.Time + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // The number of services that the applicable SCPs allow account principals to + // access. + NumberOfServicesAccessible *int32 + + // The number of services that account principals are allowed but did not attempt + // to access. + NumberOfServicesNotAccessed *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetOrganizationsAccessReport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetOrganizationsAccessReport{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOrganizationsAccessReport"); 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 = 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 = addOpGetOrganizationsAccessReportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOrganizationsAccessReport(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetOrganizationsAccessReport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOrganizationsAccessReport", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go new file mode 100644 index 0000000000000..833b99532a32b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go @@ -0,0 +1,331 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "errors" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "time" +) + +// Retrieves information about the specified managed policy, including the +// policy's default version and the total number of IAM users, groups, and roles to +// which the policy is attached. To retrieve the list of the specific users, +// groups, and roles that the policy is attached to, use ListEntitiesForPolicy . +// This operation returns metadata about the policy. To retrieve the actual policy +// document for a specific version of the policy, use GetPolicyVersion . This +// operation retrieves information about managed policies. To retrieve information +// about an inline policy that is embedded with an IAM user, group, or role, use +// GetUserPolicy , GetGroupPolicy , or GetRolePolicy . For more information about +// policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) GetPolicy(ctx context.Context, params *GetPolicyInput, optFns ...func(*Options)) (*GetPolicyOutput, error) { + if params == nil { + params = &GetPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPolicy", params, optFns, c.addOperationGetPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPolicyInput struct { + + // The Amazon Resource Name (ARN) of the managed policy that you want information + // about. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetPolicy request. +type GetPolicyOutput struct { + + // A structure containing details about the policy. + Policy *types.Policy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPolicy"); 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 = 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 = addOpGetPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPolicy(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 + } + return nil +} + +// GetPolicyAPIClient is a client that implements the GetPolicy operation. +type GetPolicyAPIClient interface { + GetPolicy(context.Context, *GetPolicyInput, ...func(*Options)) (*GetPolicyOutput, error) +} + +var _ GetPolicyAPIClient = (*Client)(nil) + +// PolicyExistsWaiterOptions are waiter options for PolicyExistsWaiter +type PolicyExistsWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // PolicyExistsWaiter will use default minimum delay of 1 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, PolicyExistsWaiter will use default max delay of 120 seconds. Note + // that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetPolicyInput, *GetPolicyOutput, error) (bool, error) +} + +// PolicyExistsWaiter defines the waiters for PolicyExists +type PolicyExistsWaiter struct { + client GetPolicyAPIClient + + options PolicyExistsWaiterOptions +} + +// NewPolicyExistsWaiter constructs a PolicyExistsWaiter. +func NewPolicyExistsWaiter(client GetPolicyAPIClient, optFns ...func(*PolicyExistsWaiterOptions)) *PolicyExistsWaiter { + options := PolicyExistsWaiterOptions{} + options.MinDelay = 1 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = policyExistsStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &PolicyExistsWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for PolicyExists waiter. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *PolicyExistsWaiter) Wait(ctx context.Context, params *GetPolicyInput, maxWaitDur time.Duration, optFns ...func(*PolicyExistsWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for PolicyExists waiter and returns the +// output of the successful operation. The maxWaitDur is the maximum wait duration +// the waiter will wait. The maxWaitDur is required and must be greater than zero. +func (w *PolicyExistsWaiter) WaitForOutput(ctx context.Context, params *GetPolicyInput, maxWaitDur time.Duration, optFns ...func(*PolicyExistsWaiterOptions)) (*GetPolicyOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetPolicy(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for PolicyExists waiter") +} + +func policyExistsStateRetryable(ctx context.Context, input *GetPolicyInput, output *GetPolicyOutput, err error) (bool, error) { + + if err == nil { + return false, nil + } + + if err != nil { + var apiErr smithy.APIError + ok := errors.As(err, &apiErr) + if !ok { + return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) + } + + if "NoSuchEntity" == apiErr.ErrorCode() { + return true, nil + } + } + + return true, nil +} + +func newServiceMetadataMiddleware_opGetPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go new file mode 100644 index 0000000000000..9f6b731013952 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about the specified version of the specified managed +// policy, including the policy document. Policies returned by this operation are +// URL-encoded compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You +// can use a URL decoding method to convert the policy back to plain JSON text. For +// example, if you use Java, you can use the decode method of the +// java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs +// provide similar functionality. To list the available versions for a policy, use +// ListPolicyVersions . This operation retrieves information about managed +// policies. To retrieve information about an inline policy that is embedded in a +// user, group, or role, use GetUserPolicy , GetGroupPolicy , or GetRolePolicy . +// For more information about the types of policies, see Managed policies and +// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. For more information about managed policy versions, see +// Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) +// in the IAM User Guide. +func (c *Client) GetPolicyVersion(ctx context.Context, params *GetPolicyVersionInput, optFns ...func(*Options)) (*GetPolicyVersionOutput, error) { + if params == nil { + params = &GetPolicyVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPolicyVersion", params, optFns, c.addOperationGetPolicyVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPolicyVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPolicyVersionInput struct { + + // The Amazon Resource Name (ARN) of the managed policy that you want information + // about. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // Identifies the policy version to retrieve. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters that + // consists of the lowercase letter 'v' followed by one or two digits, and + // optionally followed by a period '.' and a string of letters and digits. + // + // This member is required. + VersionId *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetPolicyVersion request. +type GetPolicyVersionOutput struct { + + // A structure containing details about the policy version. + PolicyVersion *types.PolicyVersion + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetPolicyVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetPolicyVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPolicyVersion"); 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 = 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 = addOpGetPolicyVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPolicyVersion(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetPolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPolicyVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go new file mode 100644 index 0000000000000..b8e7667c2f6e1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go @@ -0,0 +1,332 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "errors" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "time" +) + +// Retrieves information about the specified role, including the role's path, +// GUID, ARN, and the role's trust policy that grants permission to assume the +// role. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) +// in the IAM User Guide. Policies returned by this operation are URL-encoded +// compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a +// URL decoding method to convert the policy back to plain JSON text. For example, +// if you use Java, you can use the decode method of the java.net.URLDecoder +// utility class in the Java SDK. Other languages and SDKs provide similar +// functionality. +func (c *Client) GetRole(ctx context.Context, params *GetRoleInput, optFns ...func(*Options)) (*GetRoleOutput, error) { + if params == nil { + params = &GetRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRole", params, optFns, c.addOperationGetRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRoleInput struct { + + // The name of the IAM role to get information about. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetRole request. +type GetRoleOutput struct { + + // A structure containing details about the IAM role. + // + // This member is required. + Role *types.Role + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetRole"); 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 = 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 = addOpGetRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRole(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 + } + return nil +} + +// GetRoleAPIClient is a client that implements the GetRole operation. +type GetRoleAPIClient interface { + GetRole(context.Context, *GetRoleInput, ...func(*Options)) (*GetRoleOutput, error) +} + +var _ GetRoleAPIClient = (*Client)(nil) + +// RoleExistsWaiterOptions are waiter options for RoleExistsWaiter +type RoleExistsWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // RoleExistsWaiter will use default minimum delay of 1 seconds. Note that MinDelay + // must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, RoleExistsWaiter will use default max delay of 120 seconds. Note + // that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetRoleInput, *GetRoleOutput, error) (bool, error) +} + +// RoleExistsWaiter defines the waiters for RoleExists +type RoleExistsWaiter struct { + client GetRoleAPIClient + + options RoleExistsWaiterOptions +} + +// NewRoleExistsWaiter constructs a RoleExistsWaiter. +func NewRoleExistsWaiter(client GetRoleAPIClient, optFns ...func(*RoleExistsWaiterOptions)) *RoleExistsWaiter { + options := RoleExistsWaiterOptions{} + options.MinDelay = 1 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = roleExistsStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &RoleExistsWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for RoleExists waiter. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *RoleExistsWaiter) Wait(ctx context.Context, params *GetRoleInput, maxWaitDur time.Duration, optFns ...func(*RoleExistsWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for RoleExists waiter and returns the +// output of the successful operation. The maxWaitDur is the maximum wait duration +// the waiter will wait. The maxWaitDur is required and must be greater than zero. +func (w *RoleExistsWaiter) WaitForOutput(ctx context.Context, params *GetRoleInput, maxWaitDur time.Duration, optFns ...func(*RoleExistsWaiterOptions)) (*GetRoleOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetRole(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for RoleExists waiter") +} + +func roleExistsStateRetryable(ctx context.Context, input *GetRoleInput, output *GetRoleOutput, err error) (bool, error) { + + if err == nil { + return false, nil + } + + if err != nil { + var apiErr smithy.APIError + ok := errors.As(err, &apiErr) + if !ok { + return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) + } + + if "NoSuchEntity" == apiErr.ErrorCode() { + return true, nil + } + } + + return true, nil +} + +func newServiceMetadataMiddleware_opGetRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go new file mode 100644 index 0000000000000..567b7f20795c6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the specified inline policy document that is embedded with the +// specified IAM role. Policies returned by this operation are URL-encoded +// compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a +// URL decoding method to convert the policy back to plain JSON text. For example, +// if you use Java, you can use the decode method of the java.net.URLDecoder +// utility class in the Java SDK. Other languages and SDKs provide similar +// functionality. An IAM role can also have managed policies attached to it. To +// retrieve a managed policy document that is attached to a role, use GetPolicy to +// determine the policy's default version, then use GetPolicyVersion to retrieve +// the policy document. For more information about policies, see Managed policies +// and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) +// in the IAM User Guide. +func (c *Client) GetRolePolicy(ctx context.Context, params *GetRolePolicyInput, optFns ...func(*Options)) (*GetRolePolicyOutput, error) { + if params == nil { + params = &GetRolePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRolePolicy", params, optFns, c.addOperationGetRolePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRolePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRolePolicyInput struct { + + // The name of the policy document to get. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + // The name of the role associated with the policy. This parameter allows (through + // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetRolePolicy request. +type GetRolePolicyOutput struct { + + // The policy document. IAM stores policies in JSON format. However, resources + // that were created using CloudFormation templates can be formatted in YAML. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. + // + // This member is required. + PolicyDocument *string + + // The name of the policy. + // + // This member is required. + PolicyName *string + + // The role the policy is associated with. + // + // This member is required. + RoleName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetRolePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetRolePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetRolePolicy"); 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 = 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 = addOpGetRolePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRolePolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetRolePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetRolePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go new file mode 100644 index 0000000000000..b5432021f7bc0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns the SAML provider metadocument that was uploaded when the IAM SAML +// provider resource object was created or updated. This operation requires +// Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) +// . +func (c *Client) GetSAMLProvider(ctx context.Context, params *GetSAMLProviderInput, optFns ...func(*Options)) (*GetSAMLProviderOutput, error) { + if params == nil { + params = &GetSAMLProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSAMLProvider", params, optFns, c.addOperationGetSAMLProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSAMLProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSAMLProviderInput struct { + + // The Amazon Resource Name (ARN) of the SAML provider resource object in IAM to + // get information about. For more information about ARNs, see Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + SAMLProviderArn *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetSAMLProvider request. +type GetSAMLProviderOutput struct { + + // The date and time when the SAML provider was created. + CreateDate *time.Time + + // The XML metadata document that includes information about an identity provider. + SAMLMetadataDocument *string + + // A list of tags that are attached to the specified IAM SAML provider. The + // returned list of tags is sorted by tag key. For more information about tagging, + // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []types.Tag + + // The expiration date and time for the SAML provider. + ValidUntil *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSAMLProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetSAMLProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetSAMLProvider"); 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 = 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 = addOpGetSAMLProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSAMLProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetSAMLProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetSAMLProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go new file mode 100644 index 0000000000000..5d9134b6dca30 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the specified SSH public key, including metadata about the key. The +// SSH public key retrieved by this operation is used only for authenticating the +// associated IAM user to an CodeCommit repository. For more information about +// using SSH keys to authenticate to an CodeCommit repository, see Set up +// CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) +// in the CodeCommit User Guide. +func (c *Client) GetSSHPublicKey(ctx context.Context, params *GetSSHPublicKeyInput, optFns ...func(*Options)) (*GetSSHPublicKeyOutput, error) { + if params == nil { + params = &GetSSHPublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSSHPublicKey", params, optFns, c.addOperationGetSSHPublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSSHPublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSSHPublicKeyInput struct { + + // Specifies the public key encoding format to use in the response. To retrieve + // the public key in ssh-rsa format, use SSH . To retrieve the public key in PEM + // format, use PEM . + // + // This member is required. + Encoding types.EncodingType + + // The unique identifier for the SSH public key. This parameter allows (through + // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // that can consist of any upper or lowercased letter or digit. + // + // This member is required. + SSHPublicKeyId *string + + // The name of the IAM user associated with the SSH public key. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetSSHPublicKey request. +type GetSSHPublicKeyOutput struct { + + // A structure containing details about the SSH public key. + SSHPublicKey *types.SSHPublicKey + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSSHPublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetSSHPublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetSSHPublicKey"); 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 = 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 = addOpGetSSHPublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSSHPublicKey(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetSSHPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetSSHPublicKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go new file mode 100644 index 0000000000000..94950e6735ff7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about the specified server certificate stored in IAM. For +// more information about working with server certificates, see Working with +// server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. This topic includes a list of Amazon Web Services +// services that can use the server certificates that you manage with IAM. +func (c *Client) GetServerCertificate(ctx context.Context, params *GetServerCertificateInput, optFns ...func(*Options)) (*GetServerCertificateOutput, error) { + if params == nil { + params = &GetServerCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetServerCertificate", params, optFns, c.addOperationGetServerCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetServerCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetServerCertificateInput struct { + + // The name of the server certificate you want to retrieve information about. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + ServerCertificateName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetServerCertificate request. +type GetServerCertificateOutput struct { + + // A structure containing details about the server certificate. + // + // This member is required. + ServerCertificate *types.ServerCertificate + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetServerCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetServerCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetServerCertificate"); 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 = 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 = addOpGetServerCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServerCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetServerCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetServerCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go new file mode 100644 index 0000000000000..7bc933caf2736 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go @@ -0,0 +1,229 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves a service last accessed report that was created using the +// GenerateServiceLastAccessedDetails operation. You can use the JobId parameter +// in GetServiceLastAccessedDetails to retrieve the status of your report job. +// When the report is complete, you can retrieve the generated report. The report +// includes a list of Amazon Web Services services that the resource (user, group, +// role, or managed policy) can access. Service last accessed data does not use +// other policy types when determining whether a resource could access a service. +// These other policy types include resource-based policies, access control lists, +// Organizations policies, IAM permissions boundaries, and STS assume role +// policies. It only applies permissions policy logic. For more about the +// evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) +// in the IAM User Guide. For each service that the resource could access using +// permissions policies, the operation returns details about the most recent access +// attempt. If there was no attempt, the service is listed without details about +// the most recent attempt to access the service. If the operation fails, the +// GetServiceLastAccessedDetails operation returns the reason that it failed. The +// GetServiceLastAccessedDetails operation returns a list of services. This list +// includes the number of entities that have attempted to access the service and +// the date and time of the last attempt. It also returns the ARN of the following +// entity, depending on the resource ARN that you used to generate the report: +// - User – Returns the user ARN that you used to generate the report +// - Group – Returns the ARN of the group member (user) that last attempted to +// access the service +// - Role – Returns the role ARN that you used to generate the report +// - Policy – Returns the ARN of the user or role that last used the policy to +// attempt to access the service +// +// By default, the list is sorted by service namespace. If you specified +// ACTION_LEVEL granularity when you generated the report, this operation returns +// service and action last accessed data. This includes the most recent access +// attempt for each tracked action within a service. Otherwise, this operation +// returns only service data. For more information about service and action last +// accessed data, see Reducing permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) +// in the IAM User Guide. +func (c *Client) GetServiceLastAccessedDetails(ctx context.Context, params *GetServiceLastAccessedDetailsInput, optFns ...func(*Options)) (*GetServiceLastAccessedDetailsOutput, error) { + if params == nil { + params = &GetServiceLastAccessedDetailsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetServiceLastAccessedDetails", params, optFns, c.addOperationGetServiceLastAccessedDetailsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetServiceLastAccessedDetailsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetServiceLastAccessedDetailsInput struct { + + // The ID of the request generated by the GenerateServiceLastAccessedDetails + // operation. The JobId returned by GenerateServiceLastAccessedDetail must be used + // by the same role within a session, or by the same user when used to call + // GetServiceLastAccessedDetail . + // + // This member is required. + JobId *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type GetServiceLastAccessedDetailsOutput struct { + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the generated report job was completed or failed. This field is null if + // the job is still in progress, as indicated by a job status value of IN_PROGRESS . + // + // This member is required. + JobCompletionDate *time.Time + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the report job was created. + // + // This member is required. + JobCreationDate *time.Time + + // The status of the job. + // + // This member is required. + JobStatus types.JobStatusType + + // A ServiceLastAccessed object that contains details about the most recent + // attempt to access the service. + // + // This member is required. + ServicesLastAccessed []types.ServiceLastAccessed + + // An object that contains details about the reason the operation failed. + Error *types.ErrorDetails + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // The type of job. Service jobs return information about when each service was + // last accessed. Action jobs also include information about when tracked actions + // within the service were last accessed. + JobType types.AccessAdvisorUsageGranularityType + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetServiceLastAccessedDetails{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetServiceLastAccessedDetails{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetServiceLastAccessedDetails"); 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 = 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 = addOpGetServiceLastAccessedDetailsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceLastAccessedDetails(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetServiceLastAccessedDetails(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetServiceLastAccessedDetails", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go new file mode 100644 index 0000000000000..7f48701d228a5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// After you generate a group or policy report using the +// GenerateServiceLastAccessedDetails operation, you can use the JobId parameter +// in GetServiceLastAccessedDetailsWithEntities . This operation retrieves the +// status of your report job and a list of entities that could have used group or +// policy permissions to access the specified service. +// - Group – For a group report, this operation returns a list of users in the +// group that could have used the group’s policies in an attempt to access the +// service. +// - Policy – For a policy report, this operation returns a list of entities +// (users or roles) that could have used the policy in an attempt to access the +// service. +// +// You can also use this operation for user or role reports to retrieve details +// about those entities. If the operation fails, the +// GetServiceLastAccessedDetailsWithEntities operation returns the reason that it +// failed. By default, the list of associated entities is sorted by date, with the +// most recent access listed first. +func (c *Client) GetServiceLastAccessedDetailsWithEntities(ctx context.Context, params *GetServiceLastAccessedDetailsWithEntitiesInput, optFns ...func(*Options)) (*GetServiceLastAccessedDetailsWithEntitiesOutput, error) { + if params == nil { + params = &GetServiceLastAccessedDetailsWithEntitiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetServiceLastAccessedDetailsWithEntities", params, optFns, c.addOperationGetServiceLastAccessedDetailsWithEntitiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetServiceLastAccessedDetailsWithEntitiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetServiceLastAccessedDetailsWithEntitiesInput struct { + + // The ID of the request generated by the GenerateServiceLastAccessedDetails + // operation. + // + // This member is required. + JobId *string + + // The service namespace for an Amazon Web Services service. Provide the service + // namespace to learn when the IAM entity last attempted to access the specified + // service. To learn the service namespace for a service, see Actions, resources, + // and condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) + // in the IAM User Guide. Choose the name of the service to view details for that + // service. In the first paragraph, find the service prefix. For example, (service + // prefix: a4b) . For more information about service namespaces, see Amazon Web + // Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + // + // This member is required. + ServiceNamespace *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type GetServiceLastAccessedDetailsWithEntitiesOutput struct { + + // An EntityDetailsList object that contains details about when an IAM entity + // (user or role) used group or policy permissions in an attempt to access the + // specified Amazon Web Services service. + // + // This member is required. + EntityDetailsList []types.EntityDetails + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the generated report job was completed or failed. This field is null if + // the job is still in progress, as indicated by a job status value of IN_PROGRESS . + // + // This member is required. + JobCompletionDate *time.Time + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the report job was created. + // + // This member is required. + JobCreationDate *time.Time + + // The status of the job. + // + // This member is required. + JobStatus types.JobStatusType + + // An object that contains details about the reason the operation failed. + Error *types.ErrorDetails + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetServiceLastAccessedDetailsWithEntities{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetServiceLastAccessedDetailsWithEntities"); 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 = 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 = addOpGetServiceLastAccessedDetailsWithEntitiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceLastAccessedDetailsWithEntities(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetServiceLastAccessedDetailsWithEntities(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetServiceLastAccessedDetailsWithEntities", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go new file mode 100644 index 0000000000000..2b3777c644013 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the status of your service-linked role deletion. After you use +// DeleteServiceLinkedRole to submit a service-linked role for deletion, you can +// use the DeletionTaskId parameter in GetServiceLinkedRoleDeletionStatus to check +// the status of the deletion. If the deletion fails, this operation returns the +// reason that it failed, if that information is returned by the service. +func (c *Client) GetServiceLinkedRoleDeletionStatus(ctx context.Context, params *GetServiceLinkedRoleDeletionStatusInput, optFns ...func(*Options)) (*GetServiceLinkedRoleDeletionStatusOutput, error) { + if params == nil { + params = &GetServiceLinkedRoleDeletionStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetServiceLinkedRoleDeletionStatus", params, optFns, c.addOperationGetServiceLinkedRoleDeletionStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetServiceLinkedRoleDeletionStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetServiceLinkedRoleDeletionStatusInput struct { + + // The deletion task identifier. This identifier is returned by the + // DeleteServiceLinkedRole operation in the format task/aws-service-role/// . + // + // This member is required. + DeletionTaskId *string + + noSmithyDocumentSerde +} + +type GetServiceLinkedRoleDeletionStatusOutput struct { + + // The status of the deletion. + // + // This member is required. + Status types.DeletionTaskStatusType + + // An object that contains details about the reason the deletion failed. + Reason *types.DeletionTaskFailureReasonType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetServiceLinkedRoleDeletionStatus{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetServiceLinkedRoleDeletionStatus"); 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 = 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 = addOpGetServiceLinkedRoleDeletionStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceLinkedRoleDeletionStatus(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetServiceLinkedRoleDeletionStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetServiceLinkedRoleDeletionStatus", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go new file mode 100644 index 0000000000000..8346bcf6ef094 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go @@ -0,0 +1,337 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "errors" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "time" +) + +// Retrieves information about the specified IAM user, including the user's +// creation date, path, unique ID, and ARN. If you do not specify a user name, IAM +// determines the user name implicitly based on the Amazon Web Services access key +// ID used to sign the request to this operation. +func (c *Client) GetUser(ctx context.Context, params *GetUserInput, optFns ...func(*Options)) (*GetUserOutput, error) { + if params == nil { + params = &GetUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetUser", params, optFns, c.addOperationGetUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetUserInput struct { + + // The name of the user to get information about. This parameter is optional. If + // it is not included, it defaults to the user making the request. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetUser request. +type GetUserOutput struct { + + // A structure containing details about the IAM user. Due to a service issue, + // password last used data does not include password use from May 3, 2018 22:50 PDT + // to May 23, 2018 14:08 PDT. This affects last sign-in (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html) + // dates shown in the IAM console and password last used dates in the IAM + // credential report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html) + // , and returned by this operation. If users signed in during the affected time, + // the password last used date that is returned is the date the user last signed in + // before May 3, 2018. For users that signed in after May 23, 2018 14:08 PDT, the + // returned password last used date is accurate. You can use password last used + // information to identify unused credentials for deletion. For example, you might + // delete users who did not sign in to Amazon Web Services in the last 90 days. In + // cases like this, we recommend that you adjust your evaluation window to include + // dates after May 23, 2018. Alternatively, if your users use access keys to access + // Amazon Web Services programmatically you can refer to access key last used + // information because it is accurate for all dates. + // + // This member is required. + User *types.User + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetUser{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetUser"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUser(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 + } + return nil +} + +// GetUserAPIClient is a client that implements the GetUser operation. +type GetUserAPIClient interface { + GetUser(context.Context, *GetUserInput, ...func(*Options)) (*GetUserOutput, error) +} + +var _ GetUserAPIClient = (*Client)(nil) + +// UserExistsWaiterOptions are waiter options for UserExistsWaiter +type UserExistsWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // UserExistsWaiter will use default minimum delay of 1 seconds. Note that MinDelay + // must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, UserExistsWaiter will use default max delay of 120 seconds. Note + // that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetUserInput, *GetUserOutput, error) (bool, error) +} + +// UserExistsWaiter defines the waiters for UserExists +type UserExistsWaiter struct { + client GetUserAPIClient + + options UserExistsWaiterOptions +} + +// NewUserExistsWaiter constructs a UserExistsWaiter. +func NewUserExistsWaiter(client GetUserAPIClient, optFns ...func(*UserExistsWaiterOptions)) *UserExistsWaiter { + options := UserExistsWaiterOptions{} + options.MinDelay = 1 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = userExistsStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &UserExistsWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for UserExists waiter. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *UserExistsWaiter) Wait(ctx context.Context, params *GetUserInput, maxWaitDur time.Duration, optFns ...func(*UserExistsWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for UserExists waiter and returns the +// output of the successful operation. The maxWaitDur is the maximum wait duration +// the waiter will wait. The maxWaitDur is required and must be greater than zero. +func (w *UserExistsWaiter) WaitForOutput(ctx context.Context, params *GetUserInput, maxWaitDur time.Duration, optFns ...func(*UserExistsWaiterOptions)) (*GetUserOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetUser(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for UserExists waiter") +} + +func userExistsStateRetryable(ctx context.Context, input *GetUserInput, output *GetUserOutput, err error) (bool, error) { + + if err == nil { + return false, nil + } + + if err != nil { + var apiErr smithy.APIError + ok := errors.As(err, &apiErr) + if !ok { + return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) + } + + if "NoSuchEntity" == apiErr.ErrorCode() { + return true, nil + } + } + + return true, nil +} + +func newServiceMetadataMiddleware_opGetUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetUser", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go new file mode 100644 index 0000000000000..22854dda97457 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the specified inline policy document that is embedded in the +// specified IAM user. Policies returned by this operation are URL-encoded +// compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a +// URL decoding method to convert the policy back to plain JSON text. For example, +// if you use Java, you can use the decode method of the java.net.URLDecoder +// utility class in the Java SDK. Other languages and SDKs provide similar +// functionality. An IAM user can also have managed policies attached to it. To +// retrieve a managed policy document that is attached to a user, use GetPolicy to +// determine the policy's default version. Then use GetPolicyVersion to retrieve +// the policy document. For more information about policies, see Managed policies +// and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) GetUserPolicy(ctx context.Context, params *GetUserPolicyInput, optFns ...func(*Options)) (*GetUserPolicyOutput, error) { + if params == nil { + params = &GetUserPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetUserPolicy", params, optFns, c.addOperationGetUserPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetUserPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetUserPolicyInput struct { + + // The name of the policy document to get. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + // The name of the user who the policy is associated with. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful GetUserPolicy request. +type GetUserPolicyOutput struct { + + // The policy document. IAM stores policies in JSON format. However, resources + // that were created using CloudFormation templates can be formatted in YAML. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. + // + // This member is required. + PolicyDocument *string + + // The name of the policy. + // + // This member is required. + PolicyName *string + + // The user the policy is associated with. + // + // This member is required. + UserName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetUserPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetUserPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetUserPolicy"); 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 = 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 = addOpGetUserPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUserPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetUserPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetUserPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go new file mode 100644 index 0000000000000..fa23681079551 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about the access key IDs associated with the specified IAM +// user. If there is none, the operation returns an empty list. Although each user +// is limited to a small number of keys, you can still paginate the results using +// the MaxItems and Marker parameters. If the UserName is not specified, the user +// name is determined implicitly based on the Amazon Web Services access key ID +// used to sign the request. If a temporary access key is used, then UserName is +// required. If a long-term key is assigned to the user, then UserName is not +// required. This operation works for access keys under the Amazon Web Services +// account. If the Amazon Web Services account has no associated users, the root +// user returns it's own access key IDs by running this command. To ensure the +// security of your Amazon Web Services account, the secret access key is +// accessible only during key and user creation. +func (c *Client) ListAccessKeys(ctx context.Context, params *ListAccessKeysInput, optFns ...func(*Options)) (*ListAccessKeysOutput, error) { + if params == nil { + params = &ListAccessKeysInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAccessKeys", params, optFns, c.addOperationListAccessKeysMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAccessKeysOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAccessKeysInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The name of the user. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListAccessKeys request. +type ListAccessKeysOutput struct { + + // A list of objects containing metadata about the access keys. + // + // This member is required. + AccessKeyMetadata []types.AccessKeyMetadata + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListAccessKeys{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListAccessKeys{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccessKeys"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessKeys(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 + } + return nil +} + +// ListAccessKeysAPIClient is a client that implements the ListAccessKeys +// operation. +type ListAccessKeysAPIClient interface { + ListAccessKeys(context.Context, *ListAccessKeysInput, ...func(*Options)) (*ListAccessKeysOutput, error) +} + +var _ ListAccessKeysAPIClient = (*Client)(nil) + +// ListAccessKeysPaginatorOptions is the paginator options for ListAccessKeys +type ListAccessKeysPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAccessKeysPaginator is a paginator for ListAccessKeys +type ListAccessKeysPaginator struct { + options ListAccessKeysPaginatorOptions + client ListAccessKeysAPIClient + params *ListAccessKeysInput + nextToken *string + firstPage bool +} + +// NewListAccessKeysPaginator returns a new ListAccessKeysPaginator +func NewListAccessKeysPaginator(client ListAccessKeysAPIClient, params *ListAccessKeysInput, optFns ...func(*ListAccessKeysPaginatorOptions)) *ListAccessKeysPaginator { + if params == nil { + params = &ListAccessKeysInput{} + } + + options := ListAccessKeysPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAccessKeysPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAccessKeysPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAccessKeys page. +func (p *ListAccessKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccessKeysOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListAccessKeys(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAccessKeys(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAccessKeys", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go new file mode 100644 index 0000000000000..b8c2c0c231ac0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go @@ -0,0 +1,259 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the account alias associated with the Amazon Web Services account (Note: +// you can have only one). For information about using an Amazon Web Services +// account alias, see Creating, deleting, and listing an Amazon Web Services +// account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) +// in the Amazon Web Services Sign-In User Guide. +func (c *Client) ListAccountAliases(ctx context.Context, params *ListAccountAliasesInput, optFns ...func(*Options)) (*ListAccountAliasesOutput, error) { + if params == nil { + params = &ListAccountAliasesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAccountAliases", params, optFns, c.addOperationListAccountAliasesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAccountAliasesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAccountAliasesInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListAccountAliases request. +type ListAccountAliasesOutput struct { + + // A list of aliases associated with the account. Amazon Web Services supports + // only one alias per account. + // + // This member is required. + AccountAliases []string + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListAccountAliases{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListAccountAliases{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccountAliases"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAliases(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 + } + return nil +} + +// ListAccountAliasesAPIClient is a client that implements the ListAccountAliases +// operation. +type ListAccountAliasesAPIClient interface { + ListAccountAliases(context.Context, *ListAccountAliasesInput, ...func(*Options)) (*ListAccountAliasesOutput, error) +} + +var _ ListAccountAliasesAPIClient = (*Client)(nil) + +// ListAccountAliasesPaginatorOptions is the paginator options for +// ListAccountAliases +type ListAccountAliasesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAccountAliasesPaginator is a paginator for ListAccountAliases +type ListAccountAliasesPaginator struct { + options ListAccountAliasesPaginatorOptions + client ListAccountAliasesAPIClient + params *ListAccountAliasesInput + nextToken *string + firstPage bool +} + +// NewListAccountAliasesPaginator returns a new ListAccountAliasesPaginator +func NewListAccountAliasesPaginator(client ListAccountAliasesAPIClient, params *ListAccountAliasesInput, optFns ...func(*ListAccountAliasesPaginatorOptions)) *ListAccountAliasesPaginator { + if params == nil { + params = &ListAccountAliasesInput{} + } + + options := ListAccountAliasesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAccountAliasesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAccountAliasesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAccountAliases page. +func (p *ListAccountAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountAliasesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListAccountAliases(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAccountAliases(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAccountAliases", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go new file mode 100644 index 0000000000000..638e893df2385 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go @@ -0,0 +1,283 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all managed policies that are attached to the specified IAM group. An IAM +// group can also have inline policies embedded with it. To list the inline +// policies for a group, use ListGroupPolicies . For information about policies, +// see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. You can paginate the results using the MaxItems and +// Marker parameters. You can use the PathPrefix parameter to limit the list of +// policies to only those matching the specified path prefix. If there are no +// policies attached to the specified group (or none that match the specified path +// prefix), the operation returns an empty list. +func (c *Client) ListAttachedGroupPolicies(ctx context.Context, params *ListAttachedGroupPoliciesInput, optFns ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) { + if params == nil { + params = &ListAttachedGroupPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAttachedGroupPolicies", params, optFns, c.addOperationListAttachedGroupPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAttachedGroupPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAttachedGroupPoliciesInput struct { + + // The name (friendly name, not ARN) of the group to list attached policies for. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + GroupName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. This parameter is optional. If it is + // not included, it defaults to a slash (/), listing all policies. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of either a forward slash (/) by itself or a string + // that must begin and end with forward slashes. In addition, it can contain any + // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListAttachedGroupPolicies request. +type ListAttachedGroupPoliciesOutput struct { + + // A list of the attached policies. + AttachedPolicies []types.AttachedPolicy + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListAttachedGroupPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListAttachedGroupPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAttachedGroupPolicies"); 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 = 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 = addOpListAttachedGroupPoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttachedGroupPolicies(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 + } + return nil +} + +// ListAttachedGroupPoliciesAPIClient is a client that implements the +// ListAttachedGroupPolicies operation. +type ListAttachedGroupPoliciesAPIClient interface { + ListAttachedGroupPolicies(context.Context, *ListAttachedGroupPoliciesInput, ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) +} + +var _ ListAttachedGroupPoliciesAPIClient = (*Client)(nil) + +// ListAttachedGroupPoliciesPaginatorOptions is the paginator options for +// ListAttachedGroupPolicies +type ListAttachedGroupPoliciesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAttachedGroupPoliciesPaginator is a paginator for ListAttachedGroupPolicies +type ListAttachedGroupPoliciesPaginator struct { + options ListAttachedGroupPoliciesPaginatorOptions + client ListAttachedGroupPoliciesAPIClient + params *ListAttachedGroupPoliciesInput + nextToken *string + firstPage bool +} + +// NewListAttachedGroupPoliciesPaginator returns a new +// ListAttachedGroupPoliciesPaginator +func NewListAttachedGroupPoliciesPaginator(client ListAttachedGroupPoliciesAPIClient, params *ListAttachedGroupPoliciesInput, optFns ...func(*ListAttachedGroupPoliciesPaginatorOptions)) *ListAttachedGroupPoliciesPaginator { + if params == nil { + params = &ListAttachedGroupPoliciesInput{} + } + + options := ListAttachedGroupPoliciesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAttachedGroupPoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAttachedGroupPoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAttachedGroupPolicies page. +func (p *ListAttachedGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListAttachedGroupPolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAttachedGroupPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAttachedGroupPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go new file mode 100644 index 0000000000000..e99a3990f614c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go @@ -0,0 +1,283 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all managed policies that are attached to the specified IAM role. An IAM +// role can also have inline policies embedded with it. To list the inline policies +// for a role, use ListRolePolicies . For information about policies, see Managed +// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. You can paginate the results using the MaxItems and +// Marker parameters. You can use the PathPrefix parameter to limit the list of +// policies to only those matching the specified path prefix. If there are no +// policies attached to the specified role (or none that match the specified path +// prefix), the operation returns an empty list. +func (c *Client) ListAttachedRolePolicies(ctx context.Context, params *ListAttachedRolePoliciesInput, optFns ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) { + if params == nil { + params = &ListAttachedRolePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAttachedRolePolicies", params, optFns, c.addOperationListAttachedRolePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAttachedRolePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAttachedRolePoliciesInput struct { + + // The name (friendly name, not ARN) of the role to list attached policies for. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + RoleName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. This parameter is optional. If it is + // not included, it defaults to a slash (/), listing all policies. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of either a forward slash (/) by itself or a string + // that must begin and end with forward slashes. In addition, it can contain any + // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListAttachedRolePolicies request. +type ListAttachedRolePoliciesOutput struct { + + // A list of the attached policies. + AttachedPolicies []types.AttachedPolicy + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListAttachedRolePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListAttachedRolePolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAttachedRolePolicies"); 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 = 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 = addOpListAttachedRolePoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttachedRolePolicies(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 + } + return nil +} + +// ListAttachedRolePoliciesAPIClient is a client that implements the +// ListAttachedRolePolicies operation. +type ListAttachedRolePoliciesAPIClient interface { + ListAttachedRolePolicies(context.Context, *ListAttachedRolePoliciesInput, ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) +} + +var _ ListAttachedRolePoliciesAPIClient = (*Client)(nil) + +// ListAttachedRolePoliciesPaginatorOptions is the paginator options for +// ListAttachedRolePolicies +type ListAttachedRolePoliciesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAttachedRolePoliciesPaginator is a paginator for ListAttachedRolePolicies +type ListAttachedRolePoliciesPaginator struct { + options ListAttachedRolePoliciesPaginatorOptions + client ListAttachedRolePoliciesAPIClient + params *ListAttachedRolePoliciesInput + nextToken *string + firstPage bool +} + +// NewListAttachedRolePoliciesPaginator returns a new +// ListAttachedRolePoliciesPaginator +func NewListAttachedRolePoliciesPaginator(client ListAttachedRolePoliciesAPIClient, params *ListAttachedRolePoliciesInput, optFns ...func(*ListAttachedRolePoliciesPaginatorOptions)) *ListAttachedRolePoliciesPaginator { + if params == nil { + params = &ListAttachedRolePoliciesInput{} + } + + options := ListAttachedRolePoliciesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAttachedRolePoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAttachedRolePoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAttachedRolePolicies page. +func (p *ListAttachedRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListAttachedRolePolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAttachedRolePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAttachedRolePolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go new file mode 100644 index 0000000000000..70623156233db --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go @@ -0,0 +1,283 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all managed policies that are attached to the specified IAM user. An IAM +// user can also have inline policies embedded with it. To list the inline policies +// for a user, use ListUserPolicies . For information about policies, see Managed +// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. You can paginate the results using the MaxItems and +// Marker parameters. You can use the PathPrefix parameter to limit the list of +// policies to only those matching the specified path prefix. If there are no +// policies attached to the specified group (or none that match the specified path +// prefix), the operation returns an empty list. +func (c *Client) ListAttachedUserPolicies(ctx context.Context, params *ListAttachedUserPoliciesInput, optFns ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) { + if params == nil { + params = &ListAttachedUserPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAttachedUserPolicies", params, optFns, c.addOperationListAttachedUserPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAttachedUserPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAttachedUserPoliciesInput struct { + + // The name (friendly name, not ARN) of the user to list attached policies for. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + UserName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. This parameter is optional. If it is + // not included, it defaults to a slash (/), listing all policies. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of either a forward slash (/) by itself or a string + // that must begin and end with forward slashes. In addition, it can contain any + // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListAttachedUserPolicies request. +type ListAttachedUserPoliciesOutput struct { + + // A list of the attached policies. + AttachedPolicies []types.AttachedPolicy + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListAttachedUserPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListAttachedUserPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAttachedUserPolicies"); 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 = 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 = addOpListAttachedUserPoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttachedUserPolicies(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 + } + return nil +} + +// ListAttachedUserPoliciesAPIClient is a client that implements the +// ListAttachedUserPolicies operation. +type ListAttachedUserPoliciesAPIClient interface { + ListAttachedUserPolicies(context.Context, *ListAttachedUserPoliciesInput, ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) +} + +var _ ListAttachedUserPoliciesAPIClient = (*Client)(nil) + +// ListAttachedUserPoliciesPaginatorOptions is the paginator options for +// ListAttachedUserPolicies +type ListAttachedUserPoliciesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAttachedUserPoliciesPaginator is a paginator for ListAttachedUserPolicies +type ListAttachedUserPoliciesPaginator struct { + options ListAttachedUserPoliciesPaginatorOptions + client ListAttachedUserPoliciesAPIClient + params *ListAttachedUserPoliciesInput + nextToken *string + firstPage bool +} + +// NewListAttachedUserPoliciesPaginator returns a new +// ListAttachedUserPoliciesPaginator +func NewListAttachedUserPoliciesPaginator(client ListAttachedUserPoliciesAPIClient, params *ListAttachedUserPoliciesInput, optFns ...func(*ListAttachedUserPoliciesPaginatorOptions)) *ListAttachedUserPoliciesPaginator { + if params == nil { + params = &ListAttachedUserPoliciesInput{} + } + + options := ListAttachedUserPoliciesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAttachedUserPoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAttachedUserPoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAttachedUserPolicies page. +func (p *ListAttachedUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListAttachedUserPolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAttachedUserPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAttachedUserPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go new file mode 100644 index 0000000000000..2fcc45b069b66 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go @@ -0,0 +1,297 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all IAM users, groups, and roles that the specified managed policy is +// attached to. You can use the optional EntityFilter parameter to limit the +// results to a particular type of entity (users, groups, or roles). For example, +// to list only the roles that are attached to the specified policy, set +// EntityFilter to Role . You can paginate the results using the MaxItems and +// Marker parameters. +func (c *Client) ListEntitiesForPolicy(ctx context.Context, params *ListEntitiesForPolicyInput, optFns ...func(*Options)) (*ListEntitiesForPolicyOutput, error) { + if params == nil { + params = &ListEntitiesForPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEntitiesForPolicy", params, optFns, c.addOperationListEntitiesForPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEntitiesForPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEntitiesForPolicyInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy for which you want the + // versions. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // The entity type to use for filtering the results. For example, when EntityFilter + // is Role , only the roles that are attached to the specified policy are returned. + // This parameter is optional. If it is not included, all attached entities (users, + // groups, and roles) are returned. The argument for this parameter must be one of + // the valid values listed below. + EntityFilter types.EntityType + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. This parameter is optional. If it is + // not included, it defaults to a slash (/), listing all entities. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of either a forward slash (/) by itself or a string + // that must begin and end with forward slashes. In addition, it can contain any + // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + // The policy usage method to use for filtering the results. To list only + // permissions policies, set PolicyUsageFilter to PermissionsPolicy . To list only + // the policies used to set permissions boundaries, set the value to + // PermissionsBoundary . This parameter is optional. If it is not included, all + // policies are returned. + PolicyUsageFilter types.PolicyUsageType + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListEntitiesForPolicy request. +type ListEntitiesForPolicyOutput struct { + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // A list of IAM groups that the policy is attached to. + PolicyGroups []types.PolicyGroup + + // A list of IAM roles that the policy is attached to. + PolicyRoles []types.PolicyRole + + // A list of IAM users that the policy is attached to. + PolicyUsers []types.PolicyUser + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListEntitiesForPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListEntitiesForPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEntitiesForPolicy"); 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 = 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 = addOpListEntitiesForPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntitiesForPolicy(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 + } + return nil +} + +// ListEntitiesForPolicyAPIClient is a client that implements the +// ListEntitiesForPolicy operation. +type ListEntitiesForPolicyAPIClient interface { + ListEntitiesForPolicy(context.Context, *ListEntitiesForPolicyInput, ...func(*Options)) (*ListEntitiesForPolicyOutput, error) +} + +var _ ListEntitiesForPolicyAPIClient = (*Client)(nil) + +// ListEntitiesForPolicyPaginatorOptions is the paginator options for +// ListEntitiesForPolicy +type ListEntitiesForPolicyPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListEntitiesForPolicyPaginator is a paginator for ListEntitiesForPolicy +type ListEntitiesForPolicyPaginator struct { + options ListEntitiesForPolicyPaginatorOptions + client ListEntitiesForPolicyAPIClient + params *ListEntitiesForPolicyInput + nextToken *string + firstPage bool +} + +// NewListEntitiesForPolicyPaginator returns a new ListEntitiesForPolicyPaginator +func NewListEntitiesForPolicyPaginator(client ListEntitiesForPolicyAPIClient, params *ListEntitiesForPolicyInput, optFns ...func(*ListEntitiesForPolicyPaginatorOptions)) *ListEntitiesForPolicyPaginator { + if params == nil { + params = &ListEntitiesForPolicyInput{} + } + + options := ListEntitiesForPolicyPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEntitiesForPolicyPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEntitiesForPolicyPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEntitiesForPolicy page. +func (p *ListEntitiesForPolicyPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEntitiesForPolicyOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListEntitiesForPolicy(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListEntitiesForPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEntitiesForPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go new file mode 100644 index 0000000000000..e13340e8f98ab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the names of the inline policies that are embedded in the specified IAM +// group. An IAM group can also have managed policies attached to it. To list the +// managed policies that are attached to a group, use ListAttachedGroupPolicies . +// For more information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. You can paginate the results using the MaxItems and +// Marker parameters. If there are no inline policies embedded with the specified +// group, the operation returns an empty list. +func (c *Client) ListGroupPolicies(ctx context.Context, params *ListGroupPoliciesInput, optFns ...func(*Options)) (*ListGroupPoliciesOutput, error) { + if params == nil { + params = &ListGroupPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListGroupPolicies", params, optFns, c.addOperationListGroupPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListGroupPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListGroupPoliciesInput struct { + + // The name of the group to list policies for. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + GroupName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListGroupPolicies request. +type ListGroupPoliciesOutput struct { + + // A list of policy names. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + PolicyNames []string + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListGroupPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListGroupPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListGroupPolicies"); 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 = 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 = addOpListGroupPoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupPolicies(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 + } + return nil +} + +// ListGroupPoliciesAPIClient is a client that implements the ListGroupPolicies +// operation. +type ListGroupPoliciesAPIClient interface { + ListGroupPolicies(context.Context, *ListGroupPoliciesInput, ...func(*Options)) (*ListGroupPoliciesOutput, error) +} + +var _ ListGroupPoliciesAPIClient = (*Client)(nil) + +// ListGroupPoliciesPaginatorOptions is the paginator options for ListGroupPolicies +type ListGroupPoliciesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListGroupPoliciesPaginator is a paginator for ListGroupPolicies +type ListGroupPoliciesPaginator struct { + options ListGroupPoliciesPaginatorOptions + client ListGroupPoliciesAPIClient + params *ListGroupPoliciesInput + nextToken *string + firstPage bool +} + +// NewListGroupPoliciesPaginator returns a new ListGroupPoliciesPaginator +func NewListGroupPoliciesPaginator(client ListGroupPoliciesAPIClient, params *ListGroupPoliciesInput, optFns ...func(*ListGroupPoliciesPaginatorOptions)) *ListGroupPoliciesPaginator { + if params == nil { + params = &ListGroupPoliciesInput{} + } + + options := ListGroupPoliciesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListGroupPoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListGroupPoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListGroupPolicies page. +func (p *ListGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupPoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListGroupPolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListGroupPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListGroupPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go new file mode 100644 index 0000000000000..069df2c0a9a0a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the IAM groups that have the specified path prefix. You can paginate the +// results using the MaxItems and Marker parameters. +func (c *Client) ListGroups(ctx context.Context, params *ListGroupsInput, optFns ...func(*Options)) (*ListGroupsOutput, error) { + if params == nil { + params = &ListGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListGroups", params, optFns, c.addOperationListGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListGroupsInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. For example, the prefix + // /division_abc/subdivision_xyz/ gets all groups whose path starts with + // /division_abc/subdivision_xyz/ . This parameter is optional. If it is not + // included, it defaults to a slash (/), listing all groups. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of either a forward slash (/) by itself or a string that + // must begin and end with forward slashes. In addition, it can contain any ASCII + // character from the ! ( \u0021 ) through the DEL character ( \u007F ), including + // most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListGroups request. +type ListGroupsOutput struct { + + // A list of groups. + // + // This member is required. + Groups []types.Group + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListGroups"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(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 + } + return nil +} + +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + +// ListGroupsPaginatorOptions is the paginator options for ListGroups +type ListGroupsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListGroupsPaginator is a paginator for ListGroups +type ListGroupsPaginator struct { + options ListGroupsPaginatorOptions + client ListGroupsAPIClient + params *ListGroupsInput + nextToken *string + firstPage bool +} + +// NewListGroupsPaginator returns a new ListGroupsPaginator +func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, optFns ...func(*ListGroupsPaginatorOptions)) *ListGroupsPaginator { + if params == nil { + params = &ListGroupsInput{} + } + + options := ListGroupsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListGroups page. +func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListGroups(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go new file mode 100644 index 0000000000000..003c5595159d4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go @@ -0,0 +1,266 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the IAM groups that the specified IAM user belongs to. You can paginate +// the results using the MaxItems and Marker parameters. +func (c *Client) ListGroupsForUser(ctx context.Context, params *ListGroupsForUserInput, optFns ...func(*Options)) (*ListGroupsForUserOutput, error) { + if params == nil { + params = &ListGroupsForUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListGroupsForUser", params, optFns, c.addOperationListGroupsForUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListGroupsForUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListGroupsForUserInput struct { + + // The name of the user to list groups for. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListGroupsForUser request. +type ListGroupsForUserOutput struct { + + // A list of groups. + // + // This member is required. + Groups []types.Group + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListGroupsForUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListGroupsForUser{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListGroupsForUser"); 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 = 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 = addOpListGroupsForUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupsForUser(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 + } + return nil +} + +// ListGroupsForUserAPIClient is a client that implements the ListGroupsForUser +// operation. +type ListGroupsForUserAPIClient interface { + ListGroupsForUser(context.Context, *ListGroupsForUserInput, ...func(*Options)) (*ListGroupsForUserOutput, error) +} + +var _ ListGroupsForUserAPIClient = (*Client)(nil) + +// ListGroupsForUserPaginatorOptions is the paginator options for ListGroupsForUser +type ListGroupsForUserPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListGroupsForUserPaginator is a paginator for ListGroupsForUser +type ListGroupsForUserPaginator struct { + options ListGroupsForUserPaginatorOptions + client ListGroupsForUserAPIClient + params *ListGroupsForUserInput + nextToken *string + firstPage bool +} + +// NewListGroupsForUserPaginator returns a new ListGroupsForUserPaginator +func NewListGroupsForUserPaginator(client ListGroupsForUserAPIClient, params *ListGroupsForUserInput, optFns ...func(*ListGroupsForUserPaginatorOptions)) *ListGroupsForUserPaginator { + if params == nil { + params = &ListGroupsForUserInput{} + } + + options := ListGroupsForUserPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListGroupsForUserPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListGroupsForUserPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListGroupsForUser page. +func (p *ListGroupsForUserPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupsForUserOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListGroupsForUser(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListGroupsForUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListGroupsForUser", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go new file mode 100644 index 0000000000000..a5a2c758e6381 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags that are attached to the specified IAM instance profile. The +// returned list of tags is sorted by tag key. For more information about tagging, +// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) ListInstanceProfileTags(ctx context.Context, params *ListInstanceProfileTagsInput, optFns ...func(*Options)) (*ListInstanceProfileTagsOutput, error) { + if params == nil { + params = &ListInstanceProfileTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListInstanceProfileTags", params, optFns, c.addOperationListInstanceProfileTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListInstanceProfileTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListInstanceProfileTagsInput struct { + + // The name of the IAM instance profile whose tags you want to see. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + InstanceProfileName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListInstanceProfileTagsOutput struct { + + // The list of tags that are currently attached to the IAM instance profile. Each + // tag consists of a key name and an associated value. If no tags are attached to + // the specified resource, the response contains an empty list. + // + // This member is required. + Tags []types.Tag + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListInstanceProfileTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListInstanceProfileTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListInstanceProfileTags"); 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 = 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 = addOpListInstanceProfileTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfileTags(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 + } + return nil +} + +// ListInstanceProfileTagsAPIClient is a client that implements the +// ListInstanceProfileTags operation. +type ListInstanceProfileTagsAPIClient interface { + ListInstanceProfileTags(context.Context, *ListInstanceProfileTagsInput, ...func(*Options)) (*ListInstanceProfileTagsOutput, error) +} + +var _ ListInstanceProfileTagsAPIClient = (*Client)(nil) + +// ListInstanceProfileTagsPaginatorOptions is the paginator options for +// ListInstanceProfileTags +type ListInstanceProfileTagsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListInstanceProfileTagsPaginator is a paginator for ListInstanceProfileTags +type ListInstanceProfileTagsPaginator struct { + options ListInstanceProfileTagsPaginatorOptions + client ListInstanceProfileTagsAPIClient + params *ListInstanceProfileTagsInput + nextToken *string + firstPage bool +} + +// NewListInstanceProfileTagsPaginator returns a new +// ListInstanceProfileTagsPaginator +func NewListInstanceProfileTagsPaginator(client ListInstanceProfileTagsAPIClient, params *ListInstanceProfileTagsInput, optFns ...func(*ListInstanceProfileTagsPaginatorOptions)) *ListInstanceProfileTagsPaginator { + if params == nil { + params = &ListInstanceProfileTagsInput{} + } + + options := ListInstanceProfileTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListInstanceProfileTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListInstanceProfileTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListInstanceProfileTags page. +func (p *ListInstanceProfileTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListInstanceProfileTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListInstanceProfileTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListInstanceProfileTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListInstanceProfileTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go new file mode 100644 index 0000000000000..beeeebea415a4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the instance profiles that have the specified path prefix. If there are +// none, the operation returns an empty list. For more information about instance +// profiles, see Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) +// in the IAM User Guide. IAM resource-listing operations return a subset of the +// available attributes for the resource. For example, this operation does not +// return tags, even though they are an attribute of the returned object. To view +// all of the information for an instance profile, see GetInstanceProfile . You can +// paginate the results using the MaxItems and Marker parameters. +func (c *Client) ListInstanceProfiles(ctx context.Context, params *ListInstanceProfilesInput, optFns ...func(*Options)) (*ListInstanceProfilesOutput, error) { + if params == nil { + params = &ListInstanceProfilesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListInstanceProfiles", params, optFns, c.addOperationListInstanceProfilesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListInstanceProfilesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListInstanceProfilesInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. For example, the prefix + // /application_abc/component_xyz/ gets all instance profiles whose path starts + // with /application_abc/component_xyz/ . This parameter is optional. If it is not + // included, it defaults to a slash (/), listing all instance profiles. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListInstanceProfiles request. +type ListInstanceProfilesOutput struct { + + // A list of instance profiles. + // + // This member is required. + InstanceProfiles []types.InstanceProfile + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListInstanceProfiles{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListInstanceProfiles{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListInstanceProfiles"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfiles(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 + } + return nil +} + +// ListInstanceProfilesAPIClient is a client that implements the +// ListInstanceProfiles operation. +type ListInstanceProfilesAPIClient interface { + ListInstanceProfiles(context.Context, *ListInstanceProfilesInput, ...func(*Options)) (*ListInstanceProfilesOutput, error) +} + +var _ ListInstanceProfilesAPIClient = (*Client)(nil) + +// ListInstanceProfilesPaginatorOptions is the paginator options for +// ListInstanceProfiles +type ListInstanceProfilesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListInstanceProfilesPaginator is a paginator for ListInstanceProfiles +type ListInstanceProfilesPaginator struct { + options ListInstanceProfilesPaginatorOptions + client ListInstanceProfilesAPIClient + params *ListInstanceProfilesInput + nextToken *string + firstPage bool +} + +// NewListInstanceProfilesPaginator returns a new ListInstanceProfilesPaginator +func NewListInstanceProfilesPaginator(client ListInstanceProfilesAPIClient, params *ListInstanceProfilesInput, optFns ...func(*ListInstanceProfilesPaginatorOptions)) *ListInstanceProfilesPaginator { + if params == nil { + params = &ListInstanceProfilesInput{} + } + + options := ListInstanceProfilesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListInstanceProfilesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListInstanceProfilesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListInstanceProfiles page. +func (p *ListInstanceProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListInstanceProfilesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListInstanceProfiles(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListInstanceProfiles(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListInstanceProfiles", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go new file mode 100644 index 0000000000000..d79f1f89d35ac --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go @@ -0,0 +1,272 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the instance profiles that have the specified associated IAM role. If +// there are none, the operation returns an empty list. For more information about +// instance profiles, go to Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) +// in the IAM User Guide. You can paginate the results using the MaxItems and +// Marker parameters. +func (c *Client) ListInstanceProfilesForRole(ctx context.Context, params *ListInstanceProfilesForRoleInput, optFns ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) { + if params == nil { + params = &ListInstanceProfilesForRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListInstanceProfilesForRole", params, optFns, c.addOperationListInstanceProfilesForRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListInstanceProfilesForRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListInstanceProfilesForRoleInput struct { + + // The name of the role to list instance profiles for. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListInstanceProfilesForRole request. +type ListInstanceProfilesForRoleOutput struct { + + // A list of instance profiles. + // + // This member is required. + InstanceProfiles []types.InstanceProfile + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListInstanceProfilesForRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListInstanceProfilesForRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListInstanceProfilesForRole"); 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 = 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 = addOpListInstanceProfilesForRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfilesForRole(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 + } + return nil +} + +// ListInstanceProfilesForRoleAPIClient is a client that implements the +// ListInstanceProfilesForRole operation. +type ListInstanceProfilesForRoleAPIClient interface { + ListInstanceProfilesForRole(context.Context, *ListInstanceProfilesForRoleInput, ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) +} + +var _ ListInstanceProfilesForRoleAPIClient = (*Client)(nil) + +// ListInstanceProfilesForRolePaginatorOptions is the paginator options for +// ListInstanceProfilesForRole +type ListInstanceProfilesForRolePaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListInstanceProfilesForRolePaginator is a paginator for +// ListInstanceProfilesForRole +type ListInstanceProfilesForRolePaginator struct { + options ListInstanceProfilesForRolePaginatorOptions + client ListInstanceProfilesForRoleAPIClient + params *ListInstanceProfilesForRoleInput + nextToken *string + firstPage bool +} + +// NewListInstanceProfilesForRolePaginator returns a new +// ListInstanceProfilesForRolePaginator +func NewListInstanceProfilesForRolePaginator(client ListInstanceProfilesForRoleAPIClient, params *ListInstanceProfilesForRoleInput, optFns ...func(*ListInstanceProfilesForRolePaginatorOptions)) *ListInstanceProfilesForRolePaginator { + if params == nil { + params = &ListInstanceProfilesForRoleInput{} + } + + options := ListInstanceProfilesForRolePaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListInstanceProfilesForRolePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListInstanceProfilesForRolePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListInstanceProfilesForRole page. +func (p *ListInstanceProfilesForRolePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListInstanceProfilesForRole(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListInstanceProfilesForRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListInstanceProfilesForRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go new file mode 100644 index 0000000000000..72b824eb397f8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags that are attached to the specified IAM virtual multi-factor +// authentication (MFA) device. The returned list of tags is sorted by tag key. For +// more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) ListMFADeviceTags(ctx context.Context, params *ListMFADeviceTagsInput, optFns ...func(*Options)) (*ListMFADeviceTagsOutput, error) { + if params == nil { + params = &ListMFADeviceTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListMFADeviceTags", params, optFns, c.addOperationListMFADeviceTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListMFADeviceTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListMFADeviceTagsInput struct { + + // The unique identifier for the IAM virtual MFA device whose tags you want to + // see. For virtual MFA devices, the serial number is the same as the ARN. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + SerialNumber *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListMFADeviceTagsOutput struct { + + // The list of tags that are currently attached to the virtual MFA device. Each + // tag consists of a key name and an associated value. If no tags are attached to + // the specified resource, the response contains an empty list. + // + // This member is required. + Tags []types.Tag + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListMFADeviceTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListMFADeviceTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListMFADeviceTags"); 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 = 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 = addOpListMFADeviceTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMFADeviceTags(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 + } + return nil +} + +// ListMFADeviceTagsAPIClient is a client that implements the ListMFADeviceTags +// operation. +type ListMFADeviceTagsAPIClient interface { + ListMFADeviceTags(context.Context, *ListMFADeviceTagsInput, ...func(*Options)) (*ListMFADeviceTagsOutput, error) +} + +var _ ListMFADeviceTagsAPIClient = (*Client)(nil) + +// ListMFADeviceTagsPaginatorOptions is the paginator options for ListMFADeviceTags +type ListMFADeviceTagsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListMFADeviceTagsPaginator is a paginator for ListMFADeviceTags +type ListMFADeviceTagsPaginator struct { + options ListMFADeviceTagsPaginatorOptions + client ListMFADeviceTagsAPIClient + params *ListMFADeviceTagsInput + nextToken *string + firstPage bool +} + +// NewListMFADeviceTagsPaginator returns a new ListMFADeviceTagsPaginator +func NewListMFADeviceTagsPaginator(client ListMFADeviceTagsAPIClient, params *ListMFADeviceTagsInput, optFns ...func(*ListMFADeviceTagsPaginatorOptions)) *ListMFADeviceTagsPaginator { + if params == nil { + params = &ListMFADeviceTagsInput{} + } + + options := ListMFADeviceTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListMFADeviceTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListMFADeviceTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListMFADeviceTags page. +func (p *ListMFADeviceTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMFADeviceTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListMFADeviceTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListMFADeviceTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListMFADeviceTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go new file mode 100644 index 0000000000000..50d499562ab8c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the MFA devices for an IAM user. If the request includes a IAM user name, +// then this operation lists all the MFA devices associated with the specified +// user. If you do not specify a user name, IAM determines the user name implicitly +// based on the Amazon Web Services access key ID signing the request for this +// operation. You can paginate the results using the MaxItems and Marker +// parameters. +func (c *Client) ListMFADevices(ctx context.Context, params *ListMFADevicesInput, optFns ...func(*Options)) (*ListMFADevicesOutput, error) { + if params == nil { + params = &ListMFADevicesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListMFADevices", params, optFns, c.addOperationListMFADevicesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListMFADevicesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListMFADevicesInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The name of the user whose MFA devices you want to list. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListMFADevices request. +type ListMFADevicesOutput struct { + + // A list of MFA devices. + // + // This member is required. + MFADevices []types.MFADevice + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListMFADevices{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListMFADevices{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListMFADevices"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMFADevices(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 + } + return nil +} + +// ListMFADevicesAPIClient is a client that implements the ListMFADevices +// operation. +type ListMFADevicesAPIClient interface { + ListMFADevices(context.Context, *ListMFADevicesInput, ...func(*Options)) (*ListMFADevicesOutput, error) +} + +var _ ListMFADevicesAPIClient = (*Client)(nil) + +// ListMFADevicesPaginatorOptions is the paginator options for ListMFADevices +type ListMFADevicesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListMFADevicesPaginator is a paginator for ListMFADevices +type ListMFADevicesPaginator struct { + options ListMFADevicesPaginatorOptions + client ListMFADevicesAPIClient + params *ListMFADevicesInput + nextToken *string + firstPage bool +} + +// NewListMFADevicesPaginator returns a new ListMFADevicesPaginator +func NewListMFADevicesPaginator(client ListMFADevicesAPIClient, params *ListMFADevicesInput, optFns ...func(*ListMFADevicesPaginatorOptions)) *ListMFADevicesPaginator { + if params == nil { + params = &ListMFADevicesInput{} + } + + options := ListMFADevicesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListMFADevicesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListMFADevicesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListMFADevices page. +func (p *ListMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMFADevicesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListMFADevices(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListMFADevices(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListMFADevices", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go new file mode 100644 index 0000000000000..fc7f9d2bc411b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags that are attached to the specified OpenID Connect +// (OIDC)-compatible identity provider. The returned list of tags is sorted by tag +// key. For more information, see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html) +// . For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) ListOpenIDConnectProviderTags(ctx context.Context, params *ListOpenIDConnectProviderTagsInput, optFns ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) { + if params == nil { + params = &ListOpenIDConnectProviderTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOpenIDConnectProviderTags", params, optFns, c.addOperationListOpenIDConnectProviderTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOpenIDConnectProviderTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOpenIDConnectProviderTagsInput struct { + + // The ARN of the OpenID Connect (OIDC) identity provider whose tags you want to + // see. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + OpenIDConnectProviderArn *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListOpenIDConnectProviderTagsOutput struct { + + // The list of tags that are currently attached to the OpenID Connect (OIDC) + // identity provider. Each tag consists of a key name and an associated value. If + // no tags are attached to the specified resource, the response contains an empty + // list. + // + // This member is required. + Tags []types.Tag + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListOpenIDConnectProviderTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListOpenIDConnectProviderTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOpenIDConnectProviderTags"); 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 = 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 = addOpListOpenIDConnectProviderTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpenIDConnectProviderTags(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 + } + return nil +} + +// ListOpenIDConnectProviderTagsAPIClient is a client that implements the +// ListOpenIDConnectProviderTags operation. +type ListOpenIDConnectProviderTagsAPIClient interface { + ListOpenIDConnectProviderTags(context.Context, *ListOpenIDConnectProviderTagsInput, ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) +} + +var _ ListOpenIDConnectProviderTagsAPIClient = (*Client)(nil) + +// ListOpenIDConnectProviderTagsPaginatorOptions is the paginator options for +// ListOpenIDConnectProviderTags +type ListOpenIDConnectProviderTagsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListOpenIDConnectProviderTagsPaginator is a paginator for +// ListOpenIDConnectProviderTags +type ListOpenIDConnectProviderTagsPaginator struct { + options ListOpenIDConnectProviderTagsPaginatorOptions + client ListOpenIDConnectProviderTagsAPIClient + params *ListOpenIDConnectProviderTagsInput + nextToken *string + firstPage bool +} + +// NewListOpenIDConnectProviderTagsPaginator returns a new +// ListOpenIDConnectProviderTagsPaginator +func NewListOpenIDConnectProviderTagsPaginator(client ListOpenIDConnectProviderTagsAPIClient, params *ListOpenIDConnectProviderTagsInput, optFns ...func(*ListOpenIDConnectProviderTagsPaginatorOptions)) *ListOpenIDConnectProviderTagsPaginator { + if params == nil { + params = &ListOpenIDConnectProviderTagsInput{} + } + + options := ListOpenIDConnectProviderTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOpenIDConnectProviderTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOpenIDConnectProviderTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListOpenIDConnectProviderTags page. +func (p *ListOpenIDConnectProviderTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListOpenIDConnectProviderTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListOpenIDConnectProviderTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOpenIDConnectProviderTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go new file mode 100644 index 0000000000000..d735e308d2421 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists information about the IAM OpenID Connect (OIDC) provider resource objects +// defined in the Amazon Web Services account. IAM resource-listing operations +// return a subset of the available attributes for the resource. For example, this +// operation does not return tags, even though they are an attribute of the +// returned object. To view all of the information for an OIDC provider, see +// GetOpenIDConnectProvider . +func (c *Client) ListOpenIDConnectProviders(ctx context.Context, params *ListOpenIDConnectProvidersInput, optFns ...func(*Options)) (*ListOpenIDConnectProvidersOutput, error) { + if params == nil { + params = &ListOpenIDConnectProvidersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOpenIDConnectProviders", params, optFns, c.addOperationListOpenIDConnectProvidersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOpenIDConnectProvidersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOpenIDConnectProvidersInput struct { + noSmithyDocumentSerde +} + +// Contains the response to a successful ListOpenIDConnectProviders request. +type ListOpenIDConnectProvidersOutput struct { + + // The list of IAM OIDC provider resource objects defined in the Amazon Web + // Services account. + OpenIDConnectProviderList []types.OpenIDConnectProviderListEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListOpenIDConnectProviders{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListOpenIDConnectProviders{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOpenIDConnectProviders"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpenIDConnectProviders(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 + } + return nil +} + +func newServiceMetadataMiddleware_opListOpenIDConnectProviders(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOpenIDConnectProviders", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go new file mode 100644 index 0000000000000..bc1506af19e07 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go @@ -0,0 +1,292 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the managed policies that are available in your Amazon Web Services +// account, including your own customer-defined managed policies and all Amazon Web +// Services managed policies. You can filter the list of policies that is returned +// using the optional OnlyAttached , Scope , and PathPrefix parameters. For +// example, to list only the customer managed policies in your Amazon Web Services +// account, set Scope to Local . To list only Amazon Web Services managed policies, +// set Scope to AWS . You can paginate the results using the MaxItems and Marker +// parameters. For more information about managed policies, see Managed policies +// and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. IAM resource-listing operations return a subset of the +// available attributes for the resource. For example, this operation does not +// return tags, even though they are an attribute of the returned object. To view +// all of the information for a customer manged policy, see GetPolicy . +func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesInput, optFns ...func(*Options)) (*ListPoliciesOutput, error) { + if params == nil { + params = &ListPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPolicies", params, optFns, c.addOperationListPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPoliciesInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // A flag to filter the results to only the attached policies. When OnlyAttached + // is true , the returned list contains only the policies that are attached to an + // IAM user, group, or role. When OnlyAttached is false , or when the parameter is + // not included, all policies are returned. + OnlyAttached bool + + // The path prefix for filtering the results. This parameter is optional. If it is + // not included, it defaults to a slash (/), listing all policies. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of either a forward slash (/) by itself or a string + // that must begin and end with forward slashes. In addition, it can contain any + // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + // The policy usage method to use for filtering the results. To list only + // permissions policies, set PolicyUsageFilter to PermissionsPolicy . To list only + // the policies used to set permissions boundaries, set the value to + // PermissionsBoundary . This parameter is optional. If it is not included, all + // policies are returned. + PolicyUsageFilter types.PolicyUsageType + + // The scope to use for filtering the results. To list only Amazon Web Services + // managed policies, set Scope to AWS . To list only the customer managed policies + // in your Amazon Web Services account, set Scope to Local . This parameter is + // optional. If it is not included, or if it is set to All , all policies are + // returned. + Scope types.PolicyScopeType + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListPolicies request. +type ListPoliciesOutput struct { + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // A list of policies. + Policies []types.Policy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListPolicies"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicies(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 + } + return nil +} + +// ListPoliciesAPIClient is a client that implements the ListPolicies operation. +type ListPoliciesAPIClient interface { + ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) +} + +var _ ListPoliciesAPIClient = (*Client)(nil) + +// ListPoliciesPaginatorOptions is the paginator options for ListPolicies +type ListPoliciesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListPoliciesPaginator is a paginator for ListPolicies +type ListPoliciesPaginator struct { + options ListPoliciesPaginatorOptions + client ListPoliciesAPIClient + params *ListPoliciesInput + nextToken *string + firstPage bool +} + +// NewListPoliciesPaginator returns a new ListPoliciesPaginator +func NewListPoliciesPaginator(client ListPoliciesAPIClient, params *ListPoliciesInput, optFns ...func(*ListPoliciesPaginatorOptions)) *ListPoliciesPaginator { + if params == nil { + params = &ListPoliciesInput{} + } + + options := ListPoliciesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListPolicies page. +func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go new file mode 100644 index 0000000000000..8ad9b16f08ba5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of policies that the IAM identity (user, group, or role) can +// use to access each specified service. This operation does not use other policy +// types when determining whether a resource could access a service. These other +// policy types include resource-based policies, access control lists, +// Organizations policies, IAM permissions boundaries, and STS assume role +// policies. It only applies permissions policy logic. For more about the +// evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) +// in the IAM User Guide. The list of policies returned by the operation depends on +// the ARN of the identity that you provide. +// - User – The list of policies includes the managed and inline policies that +// are attached to the user directly. The list also includes any additional managed +// and inline policies that are attached to the group to which the user belongs. +// - Group – The list of policies includes only the managed and inline policies +// that are attached to the group directly. Policies that are attached to the +// group’s user are not included. +// - Role – The list of policies includes only the managed and inline policies +// that are attached to the role. +// +// For each managed policy, this operation returns the ARN and policy name. For +// each inline policy, it returns the policy name and the entity to which it is +// attached. Inline policies do not have an ARN. For more information about these +// policy types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) +// in the IAM User Guide. Policies that are attached to users and roles as +// permissions boundaries are not returned. To view which managed policy is +// currently used to set the permissions boundary for a user or role, use the +// GetUser or GetRole operations. +func (c *Client) ListPoliciesGrantingServiceAccess(ctx context.Context, params *ListPoliciesGrantingServiceAccessInput, optFns ...func(*Options)) (*ListPoliciesGrantingServiceAccessOutput, error) { + if params == nil { + params = &ListPoliciesGrantingServiceAccessInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPoliciesGrantingServiceAccess", params, optFns, c.addOperationListPoliciesGrantingServiceAccessMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPoliciesGrantingServiceAccessOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPoliciesGrantingServiceAccessInput struct { + + // The ARN of the IAM identity (user, group, or role) whose policies you want to + // list. + // + // This member is required. + Arn *string + + // The service namespace for the Amazon Web Services services whose policies you + // want to list. To learn the service namespace for a service, see Actions, + // resources, and condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) + // in the IAM User Guide. Choose the name of the service to view details for that + // service. In the first paragraph, find the service prefix. For example, (service + // prefix: a4b) . For more information about service namespaces, see Amazon Web + // Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + // + // This member is required. + ServiceNamespaces []string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + noSmithyDocumentSerde +} + +type ListPoliciesGrantingServiceAccessOutput struct { + + // A ListPoliciesGrantingServiceAccess object that contains details about the + // permissions policies attached to the specified identity (user, group, or role). + // + // This member is required. + PoliciesGrantingServiceAccess []types.ListPoliciesGrantingServiceAccessEntry + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. We recommend that you check + // IsTruncated after every call to ensure that you receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListPoliciesGrantingServiceAccess{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListPoliciesGrantingServiceAccess{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListPoliciesGrantingServiceAccess"); 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 = 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 = addOpListPoliciesGrantingServiceAccessValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPoliciesGrantingServiceAccess(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 + } + return nil +} + +func newServiceMetadataMiddleware_opListPoliciesGrantingServiceAccess(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListPoliciesGrantingServiceAccess", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go new file mode 100644 index 0000000000000..621216fd8453d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go @@ -0,0 +1,269 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags that are attached to the specified IAM customer managed policy. +// The returned list of tags is sorted by tag key. For more information about +// tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) ListPolicyTags(ctx context.Context, params *ListPolicyTagsInput, optFns ...func(*Options)) (*ListPolicyTagsOutput, error) { + if params == nil { + params = &ListPolicyTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPolicyTags", params, optFns, c.addOperationListPolicyTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPolicyTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPolicyTagsInput struct { + + // The ARN of the IAM customer managed policy whose tags you want to see. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + PolicyArn *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListPolicyTagsOutput struct { + + // The list of tags that are currently attached to the IAM customer managed + // policy. Each tag consists of a key name and an associated value. If no tags are + // attached to the specified resource, the response contains an empty list. + // + // This member is required. + Tags []types.Tag + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListPolicyTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListPolicyTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListPolicyTags"); 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 = 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 = addOpListPolicyTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicyTags(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 + } + return nil +} + +// ListPolicyTagsAPIClient is a client that implements the ListPolicyTags +// operation. +type ListPolicyTagsAPIClient interface { + ListPolicyTags(context.Context, *ListPolicyTagsInput, ...func(*Options)) (*ListPolicyTagsOutput, error) +} + +var _ ListPolicyTagsAPIClient = (*Client)(nil) + +// ListPolicyTagsPaginatorOptions is the paginator options for ListPolicyTags +type ListPolicyTagsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListPolicyTagsPaginator is a paginator for ListPolicyTags +type ListPolicyTagsPaginator struct { + options ListPolicyTagsPaginatorOptions + client ListPolicyTagsAPIClient + params *ListPolicyTagsInput + nextToken *string + firstPage bool +} + +// NewListPolicyTagsPaginator returns a new ListPolicyTagsPaginator +func NewListPolicyTagsPaginator(client ListPolicyTagsAPIClient, params *ListPolicyTagsInput, optFns ...func(*ListPolicyTagsPaginatorOptions)) *ListPolicyTagsPaginator { + if params == nil { + params = &ListPolicyTagsInput{} + } + + options := ListPolicyTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPolicyTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPolicyTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListPolicyTags page. +func (p *ListPolicyTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPolicyTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListPolicyTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListPolicyTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListPolicyTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go new file mode 100644 index 0000000000000..5cdb73481b412 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists information about the versions of the specified managed policy, including +// the version that is currently set as the policy's default version. For more +// information about managed policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) ListPolicyVersions(ctx context.Context, params *ListPolicyVersionsInput, optFns ...func(*Options)) (*ListPolicyVersionsOutput, error) { + if params == nil { + params = &ListPolicyVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPolicyVersions", params, optFns, c.addOperationListPolicyVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPolicyVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPolicyVersionsInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy for which you want the + // versions. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListPolicyVersions request. +type ListPolicyVersionsOutput struct { + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // A list of policy versions. For more information about managed policy versions, + // see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) + // in the IAM User Guide. + Versions []types.PolicyVersion + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListPolicyVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListPolicyVersions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListPolicyVersions"); 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 = 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 = addOpListPolicyVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicyVersions(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 + } + return nil +} + +// ListPolicyVersionsAPIClient is a client that implements the ListPolicyVersions +// operation. +type ListPolicyVersionsAPIClient interface { + ListPolicyVersions(context.Context, *ListPolicyVersionsInput, ...func(*Options)) (*ListPolicyVersionsOutput, error) +} + +var _ ListPolicyVersionsAPIClient = (*Client)(nil) + +// ListPolicyVersionsPaginatorOptions is the paginator options for +// ListPolicyVersions +type ListPolicyVersionsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListPolicyVersionsPaginator is a paginator for ListPolicyVersions +type ListPolicyVersionsPaginator struct { + options ListPolicyVersionsPaginatorOptions + client ListPolicyVersionsAPIClient + params *ListPolicyVersionsInput + nextToken *string + firstPage bool +} + +// NewListPolicyVersionsPaginator returns a new ListPolicyVersionsPaginator +func NewListPolicyVersionsPaginator(client ListPolicyVersionsAPIClient, params *ListPolicyVersionsInput, optFns ...func(*ListPolicyVersionsPaginatorOptions)) *ListPolicyVersionsPaginator { + if params == nil { + params = &ListPolicyVersionsInput{} + } + + options := ListPolicyVersionsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPolicyVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPolicyVersionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListPolicyVersions page. +func (p *ListPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPolicyVersionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListPolicyVersions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListPolicyVersions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go new file mode 100644 index 0000000000000..0729bda627d2e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the names of the inline policies that are embedded in the specified IAM +// role. An IAM role can also have managed policies attached to it. To list the +// managed policies that are attached to a role, use ListAttachedRolePolicies . For +// more information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. You can paginate the results using the MaxItems and +// Marker parameters. If there are no inline policies embedded with the specified +// role, the operation returns an empty list. +func (c *Client) ListRolePolicies(ctx context.Context, params *ListRolePoliciesInput, optFns ...func(*Options)) (*ListRolePoliciesOutput, error) { + if params == nil { + params = &ListRolePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRolePolicies", params, optFns, c.addOperationListRolePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRolePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRolePoliciesInput struct { + + // The name of the role to list policies for. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListRolePolicies request. +type ListRolePoliciesOutput struct { + + // A list of policy names. + // + // This member is required. + PolicyNames []string + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListRolePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListRolePolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListRolePolicies"); 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 = 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 = addOpListRolePoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRolePolicies(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 + } + return nil +} + +// ListRolePoliciesAPIClient is a client that implements the ListRolePolicies +// operation. +type ListRolePoliciesAPIClient interface { + ListRolePolicies(context.Context, *ListRolePoliciesInput, ...func(*Options)) (*ListRolePoliciesOutput, error) +} + +var _ ListRolePoliciesAPIClient = (*Client)(nil) + +// ListRolePoliciesPaginatorOptions is the paginator options for ListRolePolicies +type ListRolePoliciesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRolePoliciesPaginator is a paginator for ListRolePolicies +type ListRolePoliciesPaginator struct { + options ListRolePoliciesPaginatorOptions + client ListRolePoliciesAPIClient + params *ListRolePoliciesInput + nextToken *string + firstPage bool +} + +// NewListRolePoliciesPaginator returns a new ListRolePoliciesPaginator +func NewListRolePoliciesPaginator(client ListRolePoliciesAPIClient, params *ListRolePoliciesInput, optFns ...func(*ListRolePoliciesPaginatorOptions)) *ListRolePoliciesPaginator { + if params == nil { + params = &ListRolePoliciesInput{} + } + + options := ListRolePoliciesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRolePoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRolePoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListRolePolicies page. +func (p *ListRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRolePoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListRolePolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRolePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListRolePolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go new file mode 100644 index 0000000000000..3d8030908b239 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go @@ -0,0 +1,269 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags that are attached to the specified role. The returned list of +// tags is sorted by tag key. For more information about tagging, see Tagging IAM +// resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the +// IAM User Guide. +func (c *Client) ListRoleTags(ctx context.Context, params *ListRoleTagsInput, optFns ...func(*Options)) (*ListRoleTagsOutput, error) { + if params == nil { + params = &ListRoleTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRoleTags", params, optFns, c.addOperationListRoleTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRoleTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRoleTagsInput struct { + + // The name of the IAM role for which you want to see the list of tags. This + // parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters that consist of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + RoleName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListRoleTagsOutput struct { + + // The list of tags that are currently attached to the role. Each tag consists of + // a key name and an associated value. If no tags are attached to the specified + // resource, the response contains an empty list. + // + // This member is required. + Tags []types.Tag + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListRoleTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListRoleTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListRoleTags"); 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 = 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 = addOpListRoleTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoleTags(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 + } + return nil +} + +// ListRoleTagsAPIClient is a client that implements the ListRoleTags operation. +type ListRoleTagsAPIClient interface { + ListRoleTags(context.Context, *ListRoleTagsInput, ...func(*Options)) (*ListRoleTagsOutput, error) +} + +var _ ListRoleTagsAPIClient = (*Client)(nil) + +// ListRoleTagsPaginatorOptions is the paginator options for ListRoleTags +type ListRoleTagsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRoleTagsPaginator is a paginator for ListRoleTags +type ListRoleTagsPaginator struct { + options ListRoleTagsPaginatorOptions + client ListRoleTagsAPIClient + params *ListRoleTagsInput + nextToken *string + firstPage bool +} + +// NewListRoleTagsPaginator returns a new ListRoleTagsPaginator +func NewListRoleTagsPaginator(client ListRoleTagsAPIClient, params *ListRoleTagsInput, optFns ...func(*ListRoleTagsPaginatorOptions)) *ListRoleTagsPaginator { + if params == nil { + params = &ListRoleTagsInput{} + } + + options := ListRoleTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRoleTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRoleTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListRoleTags page. +func (p *ListRoleTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRoleTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListRoleTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRoleTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListRoleTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go new file mode 100644 index 0000000000000..3ba0132b3e2dc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go @@ -0,0 +1,274 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the IAM roles that have the specified path prefix. If there are none, the +// operation returns an empty list. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) +// in the IAM User Guide. IAM resource-listing operations return a subset of the +// available attributes for the resource. This operation does not return the +// following attributes, even though they are an attribute of the returned object: +// - PermissionsBoundary +// - RoleLastUsed +// - Tags +// +// To view all of the information for a role, see GetRole . You can paginate the +// results using the MaxItems and Marker parameters. +func (c *Client) ListRoles(ctx context.Context, params *ListRolesInput, optFns ...func(*Options)) (*ListRolesOutput, error) { + if params == nil { + params = &ListRolesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRoles", params, optFns, c.addOperationListRolesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRolesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRolesInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. For example, the prefix + // /application_abc/component_xyz/ gets all roles whose path starts with + // /application_abc/component_xyz/ . This parameter is optional. If it is not + // included, it defaults to a slash (/), listing all roles. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of either a forward slash (/) by itself or a string that + // must begin and end with forward slashes. In addition, it can contain any ASCII + // character from the ! ( \u0021 ) through the DEL character ( \u007F ), including + // most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListRoles request. +type ListRolesOutput struct { + + // A list of roles. + // + // This member is required. + Roles []types.Role + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListRoles{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListRoles{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListRoles"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoles(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 + } + return nil +} + +// ListRolesAPIClient is a client that implements the ListRoles operation. +type ListRolesAPIClient interface { + ListRoles(context.Context, *ListRolesInput, ...func(*Options)) (*ListRolesOutput, error) +} + +var _ ListRolesAPIClient = (*Client)(nil) + +// ListRolesPaginatorOptions is the paginator options for ListRoles +type ListRolesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRolesPaginator is a paginator for ListRoles +type ListRolesPaginator struct { + options ListRolesPaginatorOptions + client ListRolesAPIClient + params *ListRolesInput + nextToken *string + firstPage bool +} + +// NewListRolesPaginator returns a new ListRolesPaginator +func NewListRolesPaginator(client ListRolesAPIClient, params *ListRolesInput, optFns ...func(*ListRolesPaginatorOptions)) *ListRolesPaginator { + if params == nil { + params = &ListRolesInput{} + } + + options := ListRolesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRolesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRolesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListRoles page. +func (p *ListRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRolesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListRoles(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRoles(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListRoles", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go new file mode 100644 index 0000000000000..0e5294dc654b5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags that are attached to the specified Security Assertion Markup +// Language (SAML) identity provider. The returned list of tags is sorted by tag +// key. For more information, see About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) +// . For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) ListSAMLProviderTags(ctx context.Context, params *ListSAMLProviderTagsInput, optFns ...func(*Options)) (*ListSAMLProviderTagsOutput, error) { + if params == nil { + params = &ListSAMLProviderTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSAMLProviderTags", params, optFns, c.addOperationListSAMLProviderTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSAMLProviderTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSAMLProviderTagsInput struct { + + // The ARN of the Security Assertion Markup Language (SAML) identity provider + // whose tags you want to see. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + SAMLProviderArn *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListSAMLProviderTagsOutput struct { + + // The list of tags that are currently attached to the Security Assertion Markup + // Language (SAML) identity provider. Each tag consists of a key name and an + // associated value. If no tags are attached to the specified resource, the + // response contains an empty list. + // + // This member is required. + Tags []types.Tag + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListSAMLProviderTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListSAMLProviderTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSAMLProviderTags"); 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 = 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 = addOpListSAMLProviderTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSAMLProviderTags(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 + } + return nil +} + +// ListSAMLProviderTagsAPIClient is a client that implements the +// ListSAMLProviderTags operation. +type ListSAMLProviderTagsAPIClient interface { + ListSAMLProviderTags(context.Context, *ListSAMLProviderTagsInput, ...func(*Options)) (*ListSAMLProviderTagsOutput, error) +} + +var _ ListSAMLProviderTagsAPIClient = (*Client)(nil) + +// ListSAMLProviderTagsPaginatorOptions is the paginator options for +// ListSAMLProviderTags +type ListSAMLProviderTagsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSAMLProviderTagsPaginator is a paginator for ListSAMLProviderTags +type ListSAMLProviderTagsPaginator struct { + options ListSAMLProviderTagsPaginatorOptions + client ListSAMLProviderTagsAPIClient + params *ListSAMLProviderTagsInput + nextToken *string + firstPage bool +} + +// NewListSAMLProviderTagsPaginator returns a new ListSAMLProviderTagsPaginator +func NewListSAMLProviderTagsPaginator(client ListSAMLProviderTagsAPIClient, params *ListSAMLProviderTagsInput, optFns ...func(*ListSAMLProviderTagsPaginatorOptions)) *ListSAMLProviderTagsPaginator { + if params == nil { + params = &ListSAMLProviderTagsInput{} + } + + options := ListSAMLProviderTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSAMLProviderTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSAMLProviderTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSAMLProviderTags page. +func (p *ListSAMLProviderTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSAMLProviderTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListSAMLProviderTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListSAMLProviderTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSAMLProviderTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go new file mode 100644 index 0000000000000..fa26e314e06d2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the SAML provider resource objects defined in IAM in the account. IAM +// resource-listing operations return a subset of the available attributes for the +// resource. For example, this operation does not return tags, even though they are +// an attribute of the returned object. To view all of the information for a SAML +// provider, see GetSAMLProvider . This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) +// . +func (c *Client) ListSAMLProviders(ctx context.Context, params *ListSAMLProvidersInput, optFns ...func(*Options)) (*ListSAMLProvidersOutput, error) { + if params == nil { + params = &ListSAMLProvidersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSAMLProviders", params, optFns, c.addOperationListSAMLProvidersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSAMLProvidersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSAMLProvidersInput struct { + noSmithyDocumentSerde +} + +// Contains the response to a successful ListSAMLProviders request. +type ListSAMLProvidersOutput struct { + + // The list of SAML provider resource objects defined in IAM for this Amazon Web + // Services account. + SAMLProviderList []types.SAMLProviderListEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListSAMLProviders{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListSAMLProviders{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSAMLProviders"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSAMLProviders(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 + } + return nil +} + +func newServiceMetadataMiddleware_opListSAMLProviders(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSAMLProviders", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go new file mode 100644 index 0000000000000..80c4cced7b9cd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about the SSH public keys associated with the specified IAM +// user. If none exists, the operation returns an empty list. The SSH public keys +// returned by this operation are used only for authenticating the IAM user to an +// CodeCommit repository. For more information about using SSH keys to authenticate +// to an CodeCommit repository, see Set up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) +// in the CodeCommit User Guide. Although each user is limited to a small number of +// keys, you can still paginate the results using the MaxItems and Marker +// parameters. +func (c *Client) ListSSHPublicKeys(ctx context.Context, params *ListSSHPublicKeysInput, optFns ...func(*Options)) (*ListSSHPublicKeysOutput, error) { + if params == nil { + params = &ListSSHPublicKeysInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSSHPublicKeys", params, optFns, c.addOperationListSSHPublicKeysMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSSHPublicKeysOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSSHPublicKeysInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The name of the IAM user to list SSH public keys for. If none is specified, the + // UserName field is determined implicitly based on the Amazon Web Services access + // key used to sign the request. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListSSHPublicKeys request. +type ListSSHPublicKeysOutput struct { + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // A list of the SSH public keys assigned to IAM user. + SSHPublicKeys []types.SSHPublicKeyMetadata + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListSSHPublicKeys{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListSSHPublicKeys{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSSHPublicKeys"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSSHPublicKeys(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 + } + return nil +} + +// ListSSHPublicKeysAPIClient is a client that implements the ListSSHPublicKeys +// operation. +type ListSSHPublicKeysAPIClient interface { + ListSSHPublicKeys(context.Context, *ListSSHPublicKeysInput, ...func(*Options)) (*ListSSHPublicKeysOutput, error) +} + +var _ ListSSHPublicKeysAPIClient = (*Client)(nil) + +// ListSSHPublicKeysPaginatorOptions is the paginator options for ListSSHPublicKeys +type ListSSHPublicKeysPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSSHPublicKeysPaginator is a paginator for ListSSHPublicKeys +type ListSSHPublicKeysPaginator struct { + options ListSSHPublicKeysPaginatorOptions + client ListSSHPublicKeysAPIClient + params *ListSSHPublicKeysInput + nextToken *string + firstPage bool +} + +// NewListSSHPublicKeysPaginator returns a new ListSSHPublicKeysPaginator +func NewListSSHPublicKeysPaginator(client ListSSHPublicKeysAPIClient, params *ListSSHPublicKeysInput, optFns ...func(*ListSSHPublicKeysPaginatorOptions)) *ListSSHPublicKeysPaginator { + if params == nil { + params = &ListSSHPublicKeysInput{} + } + + options := ListSSHPublicKeysPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSSHPublicKeysPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSSHPublicKeysPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSSHPublicKeys page. +func (p *ListSSHPublicKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSSHPublicKeysOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListSSHPublicKeys(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListSSHPublicKeys(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSSHPublicKeys", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go new file mode 100644 index 0000000000000..f45e0b5314dcc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags that are attached to the specified IAM server certificate. The +// returned list of tags is sorted by tag key. For more information about tagging, +// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. For certificates in a Region supported by Certificate +// Manager (ACM), we recommend that you don't use IAM server certificates. Instead, +// use ACM to provision, manage, and deploy your server certificates. For more +// information about IAM server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. +func (c *Client) ListServerCertificateTags(ctx context.Context, params *ListServerCertificateTagsInput, optFns ...func(*Options)) (*ListServerCertificateTagsOutput, error) { + if params == nil { + params = &ListServerCertificateTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServerCertificateTags", params, optFns, c.addOperationListServerCertificateTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServerCertificateTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServerCertificateTagsInput struct { + + // The name of the IAM server certificate whose tags you want to see. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + ServerCertificateName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListServerCertificateTagsOutput struct { + + // The list of tags that are currently attached to the IAM server certificate. + // Each tag consists of a key name and an associated value. If no tags are attached + // to the specified resource, the response contains an empty list. + // + // This member is required. + Tags []types.Tag + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListServerCertificateTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListServerCertificateTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListServerCertificateTags"); 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 = 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 = addOpListServerCertificateTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServerCertificateTags(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 + } + return nil +} + +// ListServerCertificateTagsAPIClient is a client that implements the +// ListServerCertificateTags operation. +type ListServerCertificateTagsAPIClient interface { + ListServerCertificateTags(context.Context, *ListServerCertificateTagsInput, ...func(*Options)) (*ListServerCertificateTagsOutput, error) +} + +var _ ListServerCertificateTagsAPIClient = (*Client)(nil) + +// ListServerCertificateTagsPaginatorOptions is the paginator options for +// ListServerCertificateTags +type ListServerCertificateTagsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListServerCertificateTagsPaginator is a paginator for ListServerCertificateTags +type ListServerCertificateTagsPaginator struct { + options ListServerCertificateTagsPaginatorOptions + client ListServerCertificateTagsAPIClient + params *ListServerCertificateTagsInput + nextToken *string + firstPage bool +} + +// NewListServerCertificateTagsPaginator returns a new +// ListServerCertificateTagsPaginator +func NewListServerCertificateTagsPaginator(client ListServerCertificateTagsAPIClient, params *ListServerCertificateTagsInput, optFns ...func(*ListServerCertificateTagsPaginatorOptions)) *ListServerCertificateTagsPaginator { + if params == nil { + params = &ListServerCertificateTagsInput{} + } + + options := ListServerCertificateTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListServerCertificateTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListServerCertificateTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListServerCertificateTags page. +func (p *ListServerCertificateTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServerCertificateTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListServerCertificateTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListServerCertificateTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListServerCertificateTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go new file mode 100644 index 0000000000000..f3b6f53b94ec7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the server certificates stored in IAM that have the specified path +// prefix. If none exist, the operation returns an empty list. You can paginate the +// results using the MaxItems and Marker parameters. For more information about +// working with server certificates, see Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. This topic also includes a list of Amazon Web Services +// services that can use the server certificates that you manage with IAM. IAM +// resource-listing operations return a subset of the available attributes for the +// resource. For example, this operation does not return tags, even though they are +// an attribute of the returned object. To view all of the information for a +// servercertificate, see GetServerCertificate . +func (c *Client) ListServerCertificates(ctx context.Context, params *ListServerCertificatesInput, optFns ...func(*Options)) (*ListServerCertificatesOutput, error) { + if params == nil { + params = &ListServerCertificatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServerCertificates", params, optFns, c.addOperationListServerCertificatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServerCertificatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServerCertificatesInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. For example: /company/servercerts + // would get all server certificates for which the path starts with + // /company/servercerts . This parameter is optional. If it is not included, it + // defaults to a slash (/), listing all server certificates. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of either a forward slash (/) by itself or a string that + // must begin and end with forward slashes. In addition, it can contain any ASCII + // character from the ! ( \u0021 ) through the DEL character ( \u007F ), including + // most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListServerCertificates request. +type ListServerCertificatesOutput struct { + + // A list of server certificates. + // + // This member is required. + ServerCertificateMetadataList []types.ServerCertificateMetadata + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListServerCertificates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListServerCertificates{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListServerCertificates"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServerCertificates(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 + } + return nil +} + +// ListServerCertificatesAPIClient is a client that implements the +// ListServerCertificates operation. +type ListServerCertificatesAPIClient interface { + ListServerCertificates(context.Context, *ListServerCertificatesInput, ...func(*Options)) (*ListServerCertificatesOutput, error) +} + +var _ ListServerCertificatesAPIClient = (*Client)(nil) + +// ListServerCertificatesPaginatorOptions is the paginator options for +// ListServerCertificates +type ListServerCertificatesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListServerCertificatesPaginator is a paginator for ListServerCertificates +type ListServerCertificatesPaginator struct { + options ListServerCertificatesPaginatorOptions + client ListServerCertificatesAPIClient + params *ListServerCertificatesInput + nextToken *string + firstPage bool +} + +// NewListServerCertificatesPaginator returns a new ListServerCertificatesPaginator +func NewListServerCertificatesPaginator(client ListServerCertificatesAPIClient, params *ListServerCertificatesInput, optFns ...func(*ListServerCertificatesPaginatorOptions)) *ListServerCertificatesPaginator { + if params == nil { + params = &ListServerCertificatesInput{} + } + + options := ListServerCertificatesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListServerCertificatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListServerCertificatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListServerCertificates page. +func (p *ListServerCertificatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServerCertificatesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListServerCertificates(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListServerCertificates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListServerCertificates", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go new file mode 100644 index 0000000000000..9cce662df617d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about the service-specific credentials associated with the +// specified IAM user. If none exists, the operation returns an empty list. The +// service-specific credentials returned by this operation are used only for +// authenticating the IAM user to a specific service. For more information about +// using service-specific credentials to authenticate to an Amazon Web Services +// service, see Set up service-specific credentials (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html) +// in the CodeCommit User Guide. +func (c *Client) ListServiceSpecificCredentials(ctx context.Context, params *ListServiceSpecificCredentialsInput, optFns ...func(*Options)) (*ListServiceSpecificCredentialsOutput, error) { + if params == nil { + params = &ListServiceSpecificCredentialsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServiceSpecificCredentials", params, optFns, c.addOperationListServiceSpecificCredentialsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServiceSpecificCredentialsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServiceSpecificCredentialsInput struct { + + // Filters the returned results to only those for the specified Amazon Web + // Services service. If not specified, then Amazon Web Services returns + // service-specific credentials for all services. + ServiceName *string + + // The name of the user whose service-specific credentials you want information + // about. If this value is not specified, then the operation assumes the user whose + // credentials are used to call the operation. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +type ListServiceSpecificCredentialsOutput struct { + + // A list of structures that each contain details about a service-specific + // credential. + ServiceSpecificCredentials []types.ServiceSpecificCredentialMetadata + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListServiceSpecificCredentials{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListServiceSpecificCredentials{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListServiceSpecificCredentials"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceSpecificCredentials(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 + } + return nil +} + +func newServiceMetadataMiddleware_opListServiceSpecificCredentials(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListServiceSpecificCredentials", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go new file mode 100644 index 0000000000000..c9222c3b12b13 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about the signing certificates associated with the +// specified IAM user. If none exists, the operation returns an empty list. +// Although each user is limited to a small number of signing certificates, you can +// still paginate the results using the MaxItems and Marker parameters. If the +// UserName field is not specified, the user name is determined implicitly based on +// the Amazon Web Services access key ID used to sign the request for this +// operation. This operation works for access keys under the Amazon Web Services +// account. Consequently, you can use this operation to manage Amazon Web Services +// account root user credentials even if the Amazon Web Services account has no +// associated users. +func (c *Client) ListSigningCertificates(ctx context.Context, params *ListSigningCertificatesInput, optFns ...func(*Options)) (*ListSigningCertificatesOutput, error) { + if params == nil { + params = &ListSigningCertificatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSigningCertificates", params, optFns, c.addOperationListSigningCertificatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSigningCertificatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSigningCertificatesInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The name of the IAM user whose signing certificates you want to examine. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListSigningCertificates request. +type ListSigningCertificatesOutput struct { + + // A list of the user's signing certificate information. + // + // This member is required. + Certificates []types.SigningCertificate + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListSigningCertificates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListSigningCertificates{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSigningCertificates"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSigningCertificates(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 + } + return nil +} + +// ListSigningCertificatesAPIClient is a client that implements the +// ListSigningCertificates operation. +type ListSigningCertificatesAPIClient interface { + ListSigningCertificates(context.Context, *ListSigningCertificatesInput, ...func(*Options)) (*ListSigningCertificatesOutput, error) +} + +var _ ListSigningCertificatesAPIClient = (*Client)(nil) + +// ListSigningCertificatesPaginatorOptions is the paginator options for +// ListSigningCertificates +type ListSigningCertificatesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSigningCertificatesPaginator is a paginator for ListSigningCertificates +type ListSigningCertificatesPaginator struct { + options ListSigningCertificatesPaginatorOptions + client ListSigningCertificatesAPIClient + params *ListSigningCertificatesInput + nextToken *string + firstPage bool +} + +// NewListSigningCertificatesPaginator returns a new +// ListSigningCertificatesPaginator +func NewListSigningCertificatesPaginator(client ListSigningCertificatesAPIClient, params *ListSigningCertificatesInput, optFns ...func(*ListSigningCertificatesPaginatorOptions)) *ListSigningCertificatesPaginator { + if params == nil { + params = &ListSigningCertificatesInput{} + } + + options := ListSigningCertificatesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSigningCertificatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSigningCertificatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSigningCertificates page. +func (p *ListSigningCertificatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSigningCertificatesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListSigningCertificates(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListSigningCertificates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSigningCertificates", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go new file mode 100644 index 0000000000000..8b892c656bd59 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the names of the inline policies embedded in the specified IAM user. An +// IAM user can also have managed policies attached to it. To list the managed +// policies that are attached to a user, use ListAttachedUserPolicies . For more +// information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. You can paginate the results using the MaxItems and +// Marker parameters. If there are no inline policies embedded with the specified +// user, the operation returns an empty list. +func (c *Client) ListUserPolicies(ctx context.Context, params *ListUserPoliciesInput, optFns ...func(*Options)) (*ListUserPoliciesOutput, error) { + if params == nil { + params = &ListUserPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListUserPolicies", params, optFns, c.addOperationListUserPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListUserPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListUserPoliciesInput struct { + + // The name of the user to list policies for. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListUserPolicies request. +type ListUserPoliciesOutput struct { + + // A list of policy names. + // + // This member is required. + PolicyNames []string + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListUserPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListUserPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListUserPolicies"); 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 = 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 = addOpListUserPoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserPolicies(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 + } + return nil +} + +// ListUserPoliciesAPIClient is a client that implements the ListUserPolicies +// operation. +type ListUserPoliciesAPIClient interface { + ListUserPolicies(context.Context, *ListUserPoliciesInput, ...func(*Options)) (*ListUserPoliciesOutput, error) +} + +var _ ListUserPoliciesAPIClient = (*Client)(nil) + +// ListUserPoliciesPaginatorOptions is the paginator options for ListUserPolicies +type ListUserPoliciesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListUserPoliciesPaginator is a paginator for ListUserPolicies +type ListUserPoliciesPaginator struct { + options ListUserPoliciesPaginatorOptions + client ListUserPoliciesAPIClient + params *ListUserPoliciesInput + nextToken *string + firstPage bool +} + +// NewListUserPoliciesPaginator returns a new ListUserPoliciesPaginator +func NewListUserPoliciesPaginator(client ListUserPoliciesAPIClient, params *ListUserPoliciesInput, optFns ...func(*ListUserPoliciesPaginatorOptions)) *ListUserPoliciesPaginator { + if params == nil { + params = &ListUserPoliciesInput{} + } + + options := ListUserPoliciesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListUserPoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListUserPoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListUserPolicies page. +func (p *ListUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUserPoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListUserPolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListUserPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListUserPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go new file mode 100644 index 0000000000000..37294cf062b5b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags that are attached to the specified IAM user. The returned list +// of tags is sorted by tag key. For more information about tagging, see Tagging +// IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in +// the IAM User Guide. +func (c *Client) ListUserTags(ctx context.Context, params *ListUserTagsInput, optFns ...func(*Options)) (*ListUserTagsOutput, error) { + if params == nil { + params = &ListUserTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListUserTags", params, optFns, c.addOperationListUserTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListUserTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListUserTagsInput struct { + + // The name of the IAM user whose tags you want to see. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListUserTagsOutput struct { + + // The list of tags that are currently attached to the user. Each tag consists of + // a key name and an associated value. If no tags are attached to the specified + // resource, the response contains an empty list. + // + // This member is required. + Tags []types.Tag + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListUserTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListUserTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListUserTags"); 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 = 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 = addOpListUserTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserTags(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 + } + return nil +} + +// ListUserTagsAPIClient is a client that implements the ListUserTags operation. +type ListUserTagsAPIClient interface { + ListUserTags(context.Context, *ListUserTagsInput, ...func(*Options)) (*ListUserTagsOutput, error) +} + +var _ ListUserTagsAPIClient = (*Client)(nil) + +// ListUserTagsPaginatorOptions is the paginator options for ListUserTags +type ListUserTagsPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListUserTagsPaginator is a paginator for ListUserTags +type ListUserTagsPaginator struct { + options ListUserTagsPaginatorOptions + client ListUserTagsAPIClient + params *ListUserTagsInput + nextToken *string + firstPage bool +} + +// NewListUserTagsPaginator returns a new ListUserTagsPaginator +func NewListUserTagsPaginator(client ListUserTagsAPIClient, params *ListUserTagsInput, optFns ...func(*ListUserTagsPaginatorOptions)) *ListUserTagsPaginator { + if params == nil { + params = &ListUserTagsInput{} + } + + options := ListUserTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListUserTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListUserTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListUserTags page. +func (p *ListUserTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUserTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListUserTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListUserTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListUserTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go new file mode 100644 index 0000000000000..488b06857ce20 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go @@ -0,0 +1,274 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the IAM users that have the specified path prefix. If no path prefix is +// specified, the operation returns all users in the Amazon Web Services account. +// If there are none, the operation returns an empty list. IAM resource-listing +// operations return a subset of the available attributes for the resource. This +// operation does not return the following attributes, even though they are an +// attribute of the returned object: +// - PermissionsBoundary +// - Tags +// +// To view all of the information for a user, see GetUser . You can paginate the +// results using the MaxItems and Marker parameters. +func (c *Client) ListUsers(ctx context.Context, params *ListUsersInput, optFns ...func(*Options)) (*ListUsersOutput, error) { + if params == nil { + params = &ListUsersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListUsers", params, optFns, c.addOperationListUsersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListUsersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListUsersInput struct { + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The path prefix for filtering the results. For example: + // /division_abc/subdivision_xyz/ , which would get all user names whose path + // starts with /division_abc/subdivision_xyz/ . This parameter is optional. If it + // is not included, it defaults to a slash (/), listing all user names. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + PathPrefix *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListUsers request. +type ListUsersOutput struct { + + // A list of users. + // + // This member is required. + Users []types.User + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListUsers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListUsers{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListUsers"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsers(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 + } + return nil +} + +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + +// ListUsersPaginatorOptions is the paginator options for ListUsers +type ListUsersPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListUsersPaginator is a paginator for ListUsers +type ListUsersPaginator struct { + options ListUsersPaginatorOptions + client ListUsersAPIClient + params *ListUsersInput + nextToken *string + firstPage bool +} + +// NewListUsersPaginator returns a new ListUsersPaginator +func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, optFns ...func(*ListUsersPaginatorOptions)) *ListUsersPaginator { + if params == nil { + params = &ListUsersInput{} + } + + options := ListUsersPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListUsersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListUsersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListUsers page. +func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUsersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListUsers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListUsers", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go new file mode 100644 index 0000000000000..9820577aefe39 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the virtual MFA devices defined in the Amazon Web Services account by +// assignment status. If you do not specify an assignment status, the operation +// returns a list of all virtual MFA devices. Assignment status can be Assigned , +// Unassigned , or Any . IAM resource-listing operations return a subset of the +// available attributes for the resource. For example, this operation does not +// return tags, even though they are an attribute of the returned object. To view +// tag information for a virtual MFA device, see ListMFADeviceTags . You can +// paginate the results using the MaxItems and Marker parameters. +func (c *Client) ListVirtualMFADevices(ctx context.Context, params *ListVirtualMFADevicesInput, optFns ...func(*Options)) (*ListVirtualMFADevicesOutput, error) { + if params == nil { + params = &ListVirtualMFADevicesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListVirtualMFADevices", params, optFns, c.addOperationListVirtualMFADevicesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListVirtualMFADevicesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListVirtualMFADevicesInput struct { + + // The status ( Unassigned or Assigned ) of the devices to list. If you do not + // specify an AssignmentStatus , the operation defaults to Any , which lists both + // assigned and unassigned virtual MFA devices., + AssignmentStatus types.AssignmentStatusType + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// Contains the response to a successful ListVirtualMFADevices request. +type ListVirtualMFADevicesOutput struct { + + // The list of virtual MFA devices in the current account that match the + // AssignmentStatus value that was passed in the request. + // + // This member is required. + VirtualMFADevices []types.VirtualMFADevice + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListVirtualMFADevices{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListVirtualMFADevices{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListVirtualMFADevices"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVirtualMFADevices(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 + } + return nil +} + +// ListVirtualMFADevicesAPIClient is a client that implements the +// ListVirtualMFADevices operation. +type ListVirtualMFADevicesAPIClient interface { + ListVirtualMFADevices(context.Context, *ListVirtualMFADevicesInput, ...func(*Options)) (*ListVirtualMFADevicesOutput, error) +} + +var _ ListVirtualMFADevicesAPIClient = (*Client)(nil) + +// ListVirtualMFADevicesPaginatorOptions is the paginator options for +// ListVirtualMFADevices +type ListVirtualMFADevicesPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListVirtualMFADevicesPaginator is a paginator for ListVirtualMFADevices +type ListVirtualMFADevicesPaginator struct { + options ListVirtualMFADevicesPaginatorOptions + client ListVirtualMFADevicesAPIClient + params *ListVirtualMFADevicesInput + nextToken *string + firstPage bool +} + +// NewListVirtualMFADevicesPaginator returns a new ListVirtualMFADevicesPaginator +func NewListVirtualMFADevicesPaginator(client ListVirtualMFADevicesAPIClient, params *ListVirtualMFADevicesInput, optFns ...func(*ListVirtualMFADevicesPaginatorOptions)) *ListVirtualMFADevicesPaginator { + if params == nil { + params = &ListVirtualMFADevicesInput{} + } + + options := ListVirtualMFADevicesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListVirtualMFADevicesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListVirtualMFADevicesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListVirtualMFADevices page. +func (p *ListVirtualMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListVirtualMFADevicesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListVirtualMFADevices(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListVirtualMFADevices(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListVirtualMFADevices", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go new file mode 100644 index 0000000000000..c5c20af97bd3a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds or updates an inline policy document that is embedded in the specified IAM +// group. A user can also have managed policies attached to it. To attach a managed +// policy to a group, use AttachGroupPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachGroupPolicy.html) +// . To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html) +// . For information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. For information about the maximum number of inline +// policies that you can embed in a group, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. Because policy documents can be large, you should use +// POST rather than GET when calling PutGroupPolicy . For general information about +// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) +// in the IAM User Guide. +func (c *Client) PutGroupPolicy(ctx context.Context, params *PutGroupPolicyInput, optFns ...func(*Options)) (*PutGroupPolicyOutput, error) { + if params == nil { + params = &PutGroupPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutGroupPolicy", params, optFns, c.addOperationPutGroupPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutGroupPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutGroupPolicyInput struct { + + // The name of the group to associate the policy with. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@-. + // + // This member is required. + GroupName *string + + // The policy document. You must provide policies in JSON format in IAM. However, + // for CloudFormation templates formatted in YAML, you can provide the policy in + // JSON or YAML format. CloudFormation always converts a YAML policy to JSON format + // before submitting it to IAM. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PolicyDocument *string + + // The name of the policy document. This parameter allows (through its regex + // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + noSmithyDocumentSerde +} + +type PutGroupPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpPutGroupPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutGroupPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutGroupPolicy"); 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 = 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 = addOpPutGroupPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutGroupPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opPutGroupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutGroupPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go new file mode 100644 index 0000000000000..6bd1fdeaeb115 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds or updates the policy that is specified as the IAM role's permissions +// boundary. You can use an Amazon Web Services managed policy or a customer +// managed policy to set the boundary for a role. Use the boundary to control the +// maximum permissions that the role can have. Setting a permissions boundary is an +// advanced feature that can affect the permissions for the role. You cannot set +// the boundary for a service-linked role. Policies used as permissions boundaries +// do not provide permissions. You must also attach a permissions policy to the +// role. To learn how the effective permissions for a role are evaluated, see IAM +// JSON policy evaluation logic (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) +// in the IAM User Guide. +func (c *Client) PutRolePermissionsBoundary(ctx context.Context, params *PutRolePermissionsBoundaryInput, optFns ...func(*Options)) (*PutRolePermissionsBoundaryOutput, error) { + if params == nil { + params = &PutRolePermissionsBoundaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutRolePermissionsBoundary", params, optFns, c.addOperationPutRolePermissionsBoundaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutRolePermissionsBoundaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutRolePermissionsBoundaryInput struct { + + // The ARN of the managed policy that is used to set the permissions boundary for + // the role. A permissions boundary policy defines the maximum permissions that + // identity-based policies can grant to an entity, but does not grant permissions. + // Permissions boundaries do not define the maximum permissions that a + // resource-based policy can grant to an entity. To learn more, see Permissions + // boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. For more information about policy types, see Policy + // types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) + // in the IAM User Guide. + // + // This member is required. + PermissionsBoundary *string + + // The name (friendly name, not ARN) of the IAM role for which you want to set the + // permissions boundary. + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type PutRolePermissionsBoundaryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpPutRolePermissionsBoundary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutRolePermissionsBoundary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutRolePermissionsBoundary"); 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 = 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 = addOpPutRolePermissionsBoundaryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRolePermissionsBoundary(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 + } + return nil +} + +func newServiceMetadataMiddleware_opPutRolePermissionsBoundary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutRolePermissionsBoundary", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go new file mode 100644 index 0000000000000..1c39531bfec6c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds or updates an inline policy document that is embedded in the specified IAM +// role. When you embed an inline policy in a role, the inline policy is used as +// part of the role's access (permissions) policy. The role's trust policy is +// created at the same time as the role, using CreateRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html) +// . You can update a role's trust policy using UpdateAssumeRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html) +// . For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) +// in the IAM User Guide. A role can also have a managed policy attached to it. To +// attach a managed policy to a role, use AttachRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachRolePolicy.html) +// . To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html) +// . For information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. For information about the maximum number of inline +// policies that you can embed with a role, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. Because policy documents can be large, you should use +// POST rather than GET when calling PutRolePolicy . For general information about +// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) +// in the IAM User Guide. +func (c *Client) PutRolePolicy(ctx context.Context, params *PutRolePolicyInput, optFns ...func(*Options)) (*PutRolePolicyOutput, error) { + if params == nil { + params = &PutRolePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutRolePolicy", params, optFns, c.addOperationPutRolePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutRolePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutRolePolicyInput struct { + + // The policy document. You must provide policies in JSON format in IAM. However, + // for CloudFormation templates formatted in YAML, you can provide the policy in + // JSON or YAML format. CloudFormation always converts a YAML policy to JSON format + // before submitting it to IAM. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PolicyDocument *string + + // The name of the policy document. This parameter allows (through its regex + // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + // The name of the role to associate the policy with. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type PutRolePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpPutRolePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutRolePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutRolePolicy"); 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 = 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 = addOpPutRolePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRolePolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opPutRolePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutRolePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go new file mode 100644 index 0000000000000..cc203e1220db2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds or updates the policy that is specified as the IAM user's permissions +// boundary. You can use an Amazon Web Services managed policy or a customer +// managed policy to set the boundary for a user. Use the boundary to control the +// maximum permissions that the user can have. Setting a permissions boundary is an +// advanced feature that can affect the permissions for the user. Policies that are +// used as permissions boundaries do not provide permissions. You must also attach +// a permissions policy to the user. To learn how the effective permissions for a +// user are evaluated, see IAM JSON policy evaluation logic (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) +// in the IAM User Guide. +func (c *Client) PutUserPermissionsBoundary(ctx context.Context, params *PutUserPermissionsBoundaryInput, optFns ...func(*Options)) (*PutUserPermissionsBoundaryOutput, error) { + if params == nil { + params = &PutUserPermissionsBoundaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutUserPermissionsBoundary", params, optFns, c.addOperationPutUserPermissionsBoundaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutUserPermissionsBoundaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutUserPermissionsBoundaryInput struct { + + // The ARN of the managed policy that is used to set the permissions boundary for + // the user. A permissions boundary policy defines the maximum permissions that + // identity-based policies can grant to an entity, but does not grant permissions. + // Permissions boundaries do not define the maximum permissions that a + // resource-based policy can grant to an entity. To learn more, see Permissions + // boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. For more information about policy types, see Policy + // types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) + // in the IAM User Guide. + // + // This member is required. + PermissionsBoundary *string + + // The name (friendly name, not ARN) of the IAM user for which you want to set the + // permissions boundary. + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type PutUserPermissionsBoundaryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpPutUserPermissionsBoundary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutUserPermissionsBoundary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutUserPermissionsBoundary"); 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 = 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 = addOpPutUserPermissionsBoundaryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutUserPermissionsBoundary(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 + } + return nil +} + +func newServiceMetadataMiddleware_opPutUserPermissionsBoundary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutUserPermissionsBoundary", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go new file mode 100644 index 0000000000000..dd522e273bae7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds or updates an inline policy document that is embedded in the specified IAM +// user. An IAM user can also have a managed policy attached to it. To attach a +// managed policy to a user, use AttachUserPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html) +// . To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html) +// . For information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. For information about the maximum number of inline +// policies that you can embed in a user, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. Because policy documents can be large, you should use +// POST rather than GET when calling PutUserPolicy . For general information about +// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) +// in the IAM User Guide. +func (c *Client) PutUserPolicy(ctx context.Context, params *PutUserPolicyInput, optFns ...func(*Options)) (*PutUserPolicyOutput, error) { + if params == nil { + params = &PutUserPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutUserPolicy", params, optFns, c.addOperationPutUserPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutUserPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutUserPolicyInput struct { + + // The policy document. You must provide policies in JSON format in IAM. However, + // for CloudFormation templates formatted in YAML, you can provide the policy in + // JSON or YAML format. CloudFormation always converts a YAML policy to JSON format + // before submitting it to IAM. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PolicyDocument *string + + // The name of the policy document. This parameter allows (through its regex + // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // This member is required. + PolicyName *string + + // The name of the user to associate the policy with. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type PutUserPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpPutUserPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutUserPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutUserPolicy"); 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 = 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 = addOpPutUserPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutUserPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opPutUserPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutUserPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go new file mode 100644 index 0000000000000..993988b91fa71 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified client ID (also known as audience) from the list of +// client IDs registered for the specified IAM OpenID Connect (OIDC) provider +// resource object. This operation is idempotent; it does not fail or return an +// error if you try to remove a client ID that does not exist. +func (c *Client) RemoveClientIDFromOpenIDConnectProvider(ctx context.Context, params *RemoveClientIDFromOpenIDConnectProviderInput, optFns ...func(*Options)) (*RemoveClientIDFromOpenIDConnectProviderOutput, error) { + if params == nil { + params = &RemoveClientIDFromOpenIDConnectProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveClientIDFromOpenIDConnectProvider", params, optFns, c.addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveClientIDFromOpenIDConnectProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveClientIDFromOpenIDConnectProviderInput struct { + + // The client ID (also known as audience) to remove from the IAM OIDC provider + // resource. For more information about client IDs, see CreateOpenIDConnectProvider + // . + // + // This member is required. + ClientID *string + + // The Amazon Resource Name (ARN) of the IAM OIDC provider resource to remove the + // client ID from. You can get a list of OIDC provider ARNs by using the + // ListOpenIDConnectProviders operation. For more information about ARNs, see + // Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + OpenIDConnectProviderArn *string + + noSmithyDocumentSerde +} + +type RemoveClientIDFromOpenIDConnectProviderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveClientIDFromOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveClientIDFromOpenIDConnectProvider"); 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 = 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 = addOpRemoveClientIDFromOpenIDConnectProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveClientIDFromOpenIDConnectProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opRemoveClientIDFromOpenIDConnectProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RemoveClientIDFromOpenIDConnectProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go new file mode 100644 index 0000000000000..8191ee24711b6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified IAM role from the specified EC2 instance profile. Make +// sure that you do not have any Amazon EC2 instances running with the role you are +// about to remove from the instance profile. Removing a role from an instance +// profile that is associated with a running instance might break any applications +// running on the instance. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) +// in the IAM User Guide. For more information about instance profiles, see Using +// instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) +// in the IAM User Guide. +func (c *Client) RemoveRoleFromInstanceProfile(ctx context.Context, params *RemoveRoleFromInstanceProfileInput, optFns ...func(*Options)) (*RemoveRoleFromInstanceProfileOutput, error) { + if params == nil { + params = &RemoveRoleFromInstanceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveRoleFromInstanceProfile", params, optFns, c.addOperationRemoveRoleFromInstanceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveRoleFromInstanceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveRoleFromInstanceProfileInput struct { + + // The name of the instance profile to update. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // This member is required. + InstanceProfileName *string + + // The name of the role to remove. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type RemoveRoleFromInstanceProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveRoleFromInstanceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveRoleFromInstanceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveRoleFromInstanceProfile"); 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 = 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 = addOpRemoveRoleFromInstanceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveRoleFromInstanceProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opRemoveRoleFromInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RemoveRoleFromInstanceProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go new file mode 100644 index 0000000000000..ad6cd173885f2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified user from the specified group. +func (c *Client) RemoveUserFromGroup(ctx context.Context, params *RemoveUserFromGroupInput, optFns ...func(*Options)) (*RemoveUserFromGroupOutput, error) { + if params == nil { + params = &RemoveUserFromGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveUserFromGroup", params, optFns, c.addOperationRemoveUserFromGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveUserFromGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveUserFromGroupInput struct { + + // The name of the group to update. This parameter allows (through its regex + // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // This member is required. + GroupName *string + + // The name of the user to remove. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type RemoveUserFromGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveUserFromGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveUserFromGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveUserFromGroup"); 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 = 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 = addOpRemoveUserFromGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveUserFromGroup(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 + } + return nil +} + +func newServiceMetadataMiddleware_opRemoveUserFromGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RemoveUserFromGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go new file mode 100644 index 0000000000000..006f4b404055c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Resets the password for a service-specific credential. The new password is +// Amazon Web Services generated and cryptographically strong. It cannot be +// configured by the user. Resetting the password immediately invalidates the +// previous password associated with this user. +func (c *Client) ResetServiceSpecificCredential(ctx context.Context, params *ResetServiceSpecificCredentialInput, optFns ...func(*Options)) (*ResetServiceSpecificCredentialOutput, error) { + if params == nil { + params = &ResetServiceSpecificCredentialInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ResetServiceSpecificCredential", params, optFns, c.addOperationResetServiceSpecificCredentialMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ResetServiceSpecificCredentialOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ResetServiceSpecificCredentialInput struct { + + // The unique identifier of the service-specific credential. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters that can consist of any upper or lowercased letter or digit. + // + // This member is required. + ServiceSpecificCredentialId *string + + // The name of the IAM user associated with the service-specific credential. If + // this value is not specified, then the operation assumes the user whose + // credentials are used to call the operation. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +type ResetServiceSpecificCredentialOutput struct { + + // A structure with details about the updated service-specific credential, + // including the new password. This is the only time that you can access the + // password. You cannot recover the password later, but you can reset it again. + ServiceSpecificCredential *types.ServiceSpecificCredential + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpResetServiceSpecificCredential{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResetServiceSpecificCredential{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ResetServiceSpecificCredential"); 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 = 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 = addOpResetServiceSpecificCredentialValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetServiceSpecificCredential(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 + } + return nil +} + +func newServiceMetadataMiddleware_opResetServiceSpecificCredential(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ResetServiceSpecificCredential", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go new file mode 100644 index 0000000000000..030061b223624 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Synchronizes the specified MFA device with its IAM resource object on the +// Amazon Web Services servers. For more information about creating and working +// with virtual MFA devices, see Using a virtual MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) +// in the IAM User Guide. +func (c *Client) ResyncMFADevice(ctx context.Context, params *ResyncMFADeviceInput, optFns ...func(*Options)) (*ResyncMFADeviceOutput, error) { + if params == nil { + params = &ResyncMFADeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ResyncMFADevice", params, optFns, c.addOperationResyncMFADeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ResyncMFADeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ResyncMFADeviceInput struct { + + // An authentication code emitted by the device. The format for this parameter is + // a sequence of six digits. + // + // This member is required. + AuthenticationCode1 *string + + // A subsequent authentication code emitted by the device. The format for this + // parameter is a sequence of six digits. + // + // This member is required. + AuthenticationCode2 *string + + // Serial number that uniquely identifies the MFA device. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + SerialNumber *string + + // The name of the user whose MFA device you want to resynchronize. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type ResyncMFADeviceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpResyncMFADevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResyncMFADevice{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ResyncMFADevice"); 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 = 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 = addOpResyncMFADeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResyncMFADevice(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 + } + return nil +} + +func newServiceMetadataMiddleware_opResyncMFADevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ResyncMFADevice", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go new file mode 100644 index 0000000000000..1a1d1ab6fdb77 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets the specified version of the specified policy as the policy's default +// (operative) version. This operation affects all users, groups, and roles that +// the policy is attached to. To list the users, groups, and roles that the policy +// is attached to, use ListEntitiesForPolicy . For information about managed +// policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +func (c *Client) SetDefaultPolicyVersion(ctx context.Context, params *SetDefaultPolicyVersionInput, optFns ...func(*Options)) (*SetDefaultPolicyVersionOutput, error) { + if params == nil { + params = &SetDefaultPolicyVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SetDefaultPolicyVersion", params, optFns, c.addOperationSetDefaultPolicyVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SetDefaultPolicyVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SetDefaultPolicyVersionInput struct { + + // The Amazon Resource Name (ARN) of the IAM policy whose default version you want + // to set. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicyArn *string + + // The version of the policy to set as the default (operative) version. For more + // information about managed policy versions, see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) + // in the IAM User Guide. + // + // This member is required. + VersionId *string + + noSmithyDocumentSerde +} + +type SetDefaultPolicyVersionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpSetDefaultPolicyVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetDefaultPolicyVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SetDefaultPolicyVersion"); 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 = 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 = addOpSetDefaultPolicyVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetDefaultPolicyVersion(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 + } + return nil +} + +func newServiceMetadataMiddleware_opSetDefaultPolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SetDefaultPolicyVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go new file mode 100644 index 0000000000000..50e8031412c86 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets the specified version of the global endpoint token as the token version +// used for the Amazon Web Services account. By default, Security Token Service +// (STS) is available as a global service, and all STS requests go to a single +// endpoint at https://sts.amazonaws.com . Amazon Web Services recommends using +// Regional STS endpoints to reduce latency, build in redundancy, and increase +// session token availability. For information about Regional endpoints for STS, +// see Security Token Service endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/sts.html) +// in the Amazon Web Services General Reference. If you make an STS call to the +// global endpoint, the resulting session tokens might be valid in some Regions but +// not others. It depends on the version that is set in this operation. Version 1 +// tokens are valid only in Amazon Web Services Regions that are available by +// default. These tokens do not work in manually enabled Regions, such as Asia +// Pacific (Hong Kong). Version 2 tokens are valid in all Regions. However, version +// 2 tokens are longer and might affect systems where you temporarily store tokens. +// For information, see Activating and deactivating STS in an Amazon Web Services +// Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// in the IAM User Guide. To view the current session token version, see the +// GlobalEndpointTokenVersion entry in the response of the GetAccountSummary +// operation. +func (c *Client) SetSecurityTokenServicePreferences(ctx context.Context, params *SetSecurityTokenServicePreferencesInput, optFns ...func(*Options)) (*SetSecurityTokenServicePreferencesOutput, error) { + if params == nil { + params = &SetSecurityTokenServicePreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SetSecurityTokenServicePreferences", params, optFns, c.addOperationSetSecurityTokenServicePreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SetSecurityTokenServicePreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SetSecurityTokenServicePreferencesInput struct { + + // The version of the global endpoint token. Version 1 tokens are valid only in + // Amazon Web Services Regions that are available by default. These tokens do not + // work in manually enabled Regions, such as Asia Pacific (Hong Kong). Version 2 + // tokens are valid in all Regions. However, version 2 tokens are longer and might + // affect systems where you temporarily store tokens. For information, see + // Activating and deactivating STS in an Amazon Web Services Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) + // in the IAM User Guide. + // + // This member is required. + GlobalEndpointTokenVersion types.GlobalEndpointTokenVersion + + noSmithyDocumentSerde +} + +type SetSecurityTokenServicePreferencesOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpSetSecurityTokenServicePreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetSecurityTokenServicePreferences{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SetSecurityTokenServicePreferences"); 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 = 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 = addOpSetSecurityTokenServicePreferencesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetSecurityTokenServicePreferences(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 + } + return nil +} + +func newServiceMetadataMiddleware_opSetSecurityTokenServicePreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SetSecurityTokenServicePreferences", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go new file mode 100644 index 0000000000000..d441857d739b5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go @@ -0,0 +1,410 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Simulate how a set of IAM policies and optionally a resource-based policy works +// with a list of API operations and Amazon Web Services resources to determine the +// policies' effective permissions. The policies are provided as strings. The +// simulation does not perform the API operations; it only checks the authorization +// to determine if the simulated policies allow or deny the operations. You can +// simulate resources that don't exist in your account. If you want to simulate +// existing policies that are attached to an IAM user, group, or role, use +// SimulatePrincipalPolicy instead. Context keys are variables that are maintained +// by Amazon Web Services and its services and which provide details about the +// context of an API query request. You can use the Condition element of an IAM +// policy to evaluate context keys. To get the list of context keys that the +// policies require for correct simulation, use GetContextKeysForCustomPolicy . If +// the output is long, you can use MaxItems and Marker parameters to paginate the +// results. The IAM policy simulator evaluates statements in the identity-based +// policy and the inputs that you provide during simulation. The policy simulator +// results can differ from your live Amazon Web Services environment. We recommend +// that you check your policies against your live Amazon Web Services environment +// after testing using the policy simulator to confirm that you have the desired +// results. For more information about using the policy simulator, see Testing IAM +// policies with the IAM policy simulator (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html) +// in the IAM User Guide. +func (c *Client) SimulateCustomPolicy(ctx context.Context, params *SimulateCustomPolicyInput, optFns ...func(*Options)) (*SimulateCustomPolicyOutput, error) { + if params == nil { + params = &SimulateCustomPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SimulateCustomPolicy", params, optFns, c.addOperationSimulateCustomPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SimulateCustomPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SimulateCustomPolicyInput struct { + + // A list of names of API operations to evaluate in the simulation. Each operation + // is evaluated against each resource. Each operation must include the service + // identifier, such as iam:CreateUser . This operation does not support using + // wildcards (*) in an action name. + // + // This member is required. + ActionNames []string + + // A list of policy documents to include in the simulation. Each document is + // specified as a string containing the complete, valid JSON text of an IAM policy. + // Do not include any resource-based policies in this parameter. Any resource-based + // policy must be submitted with the ResourcePolicy parameter. The policies cannot + // be "scope-down" policies, such as you could include in a call to + // GetFederationToken (https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetFederationToken.html) + // or one of the AssumeRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AssumeRole.html) + // API operations. In other words, do not use policies designed to restrict what a + // user can do while using the temporary credentials. The maximum length of the + // policy document that you can pass in this operation, including whitespace, is + // listed below. To view the maximum character counts of a managed policy with no + // whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) + // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this + // parameter is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PolicyInputList []string + + // The ARN of the IAM user that you want to use as the simulated caller of the API + // operations. CallerArn is required if you include a ResourcePolicy so that the + // policy's Principal element has a value to use in evaluating the policy. You can + // specify only the ARN of an IAM user. You cannot specify the ARN of an assumed + // role, federated user, or a service principal. + CallerArn *string + + // A list of context keys and corresponding values for the simulation to use. + // Whenever a context key is evaluated in one of the simulated IAM permissions + // policies, the corresponding value is supplied. + ContextEntries []types.ContextEntry + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The IAM permissions boundary policy to simulate. The permissions boundary sets + // the maximum permissions that an IAM entity can have. You can input only one + // permissions boundary when you pass a policy to this operation. For more + // information about permissions boundaries, see Permissions boundaries for IAM + // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. The policy input is specified as a string that contains + // the complete, valid JSON text of a permissions boundary policy. The maximum + // length of the policy document that you can pass in this operation, including + // whitespace, is listed below. To view the maximum character counts of a managed + // policy with no whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) + // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this + // parameter is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + PermissionsBoundaryPolicyInputList []string + + // A list of ARNs of Amazon Web Services resources to include in the simulation. + // If this parameter is not provided, then the value defaults to * (all + // resources). Each API in the ActionNames parameter is evaluated for each + // resource in this list. The simulation determines the access result (allowed or + // denied) of each combination and reports it in the response. You can simulate + // resources that don't exist in your account. The simulation does not + // automatically retrieve policies for the specified resources. If you want to + // include a resource policy in the simulation, then you must include the policy as + // a string in the ResourcePolicy parameter. If you include a ResourcePolicy , then + // it must be applicable to all of the resources included in the simulation or you + // receive an invalid input error. For more information about ARNs, see Amazon + // Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. Simulation of resource-based + // policies isn't supported for IAM roles. + ResourceArns []string + + // Specifies the type of simulation to run. Different API operations that support + // resource-based policies require different combinations of resources. By + // specifying the type of simulation to run, you enable the policy simulator to + // enforce the presence of the required resources to ensure reliable simulation + // results. If your simulation does not match one of the following scenarios, then + // you can omit this parameter. The following list shows each of the supported + // scenario values and the resources that you must define to run the simulation. + // Each of the EC2 scenarios requires that you specify instance, image, and + // security group resources. If your scenario includes an EBS volume, then you must + // specify that volume as a resource. If the EC2 scenario includes VPC, then you + // must supply the network interface resource. If it includes an IP subnet, then + // you must specify the subnet resource. For more information on the EC2 scenario + // options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) + // in the Amazon EC2 User Guide. + // - EC2-VPC-InstanceStore instance, image, security group, network interface + // - EC2-VPC-InstanceStore-Subnet instance, image, security group, network + // interface, subnet + // - EC2-VPC-EBS instance, image, security group, network interface, volume + // - EC2-VPC-EBS-Subnet instance, image, security group, network interface, + // subnet, volume + ResourceHandlingOption *string + + // An ARN representing the Amazon Web Services account ID that specifies the owner + // of any simulated resource that does not identify its owner in the resource ARN. + // Examples of resource ARNs include an S3 bucket or object. If ResourceOwner is + // specified, it is also used as the account owner of any ResourcePolicy included + // in the simulation. If the ResourceOwner parameter is not specified, then the + // owner of the resources and the resource policy defaults to the account of the + // identity provided in CallerArn . This parameter is required only if you specify + // a resource-based policy and account that owns the resource is different from the + // account that owns the simulated calling user CallerArn . The ARN for an account + // uses the following syntax: arn:aws:iam::AWS-account-ID:root . For example, to + // represent the account with the 112233445566 ID, use the following ARN: + // arn:aws:iam::112233445566-ID:root . + ResourceOwner *string + + // A resource-based policy to include in the simulation provided as a string. Each + // resource in the simulation is treated as if it had this policy attached. You can + // include only one resource-based policy in a simulation. The maximum length of + // the policy document that you can pass in this operation, including whitespace, + // is listed below. To view the maximum character counts of a managed policy with + // no whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) + // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this + // parameter is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // Simulation of resource-based policies isn't supported for IAM roles. + ResourcePolicy *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful SimulatePrincipalPolicy or +// SimulateCustomPolicy request. +type SimulateCustomPolicyOutput struct { + + // The results of the simulation. + EvaluationResults []types.EvaluationResult + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpSimulateCustomPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSimulateCustomPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SimulateCustomPolicy"); 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 = 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 = addOpSimulateCustomPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimulateCustomPolicy(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 + } + return nil +} + +// SimulateCustomPolicyAPIClient is a client that implements the +// SimulateCustomPolicy operation. +type SimulateCustomPolicyAPIClient interface { + SimulateCustomPolicy(context.Context, *SimulateCustomPolicyInput, ...func(*Options)) (*SimulateCustomPolicyOutput, error) +} + +var _ SimulateCustomPolicyAPIClient = (*Client)(nil) + +// SimulateCustomPolicyPaginatorOptions is the paginator options for +// SimulateCustomPolicy +type SimulateCustomPolicyPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// SimulateCustomPolicyPaginator is a paginator for SimulateCustomPolicy +type SimulateCustomPolicyPaginator struct { + options SimulateCustomPolicyPaginatorOptions + client SimulateCustomPolicyAPIClient + params *SimulateCustomPolicyInput + nextToken *string + firstPage bool +} + +// NewSimulateCustomPolicyPaginator returns a new SimulateCustomPolicyPaginator +func NewSimulateCustomPolicyPaginator(client SimulateCustomPolicyAPIClient, params *SimulateCustomPolicyInput, optFns ...func(*SimulateCustomPolicyPaginatorOptions)) *SimulateCustomPolicyPaginator { + if params == nil { + params = &SimulateCustomPolicyInput{} + } + + options := SimulateCustomPolicyPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &SimulateCustomPolicyPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SimulateCustomPolicyPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SimulateCustomPolicy page. +func (p *SimulateCustomPolicyPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SimulateCustomPolicyOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.SimulateCustomPolicy(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opSimulateCustomPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SimulateCustomPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go new file mode 100644 index 0000000000000..082eab85b350e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go @@ -0,0 +1,427 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Simulate how a set of IAM policies attached to an IAM entity works with a list +// of API operations and Amazon Web Services resources to determine the policies' +// effective permissions. The entity can be an IAM user, group, or role. If you +// specify a user, then the simulation also includes all of the policies that are +// attached to groups that the user belongs to. You can simulate resources that +// don't exist in your account. You can optionally include a list of one or more +// additional policies specified as strings to include in the simulation. If you +// want to simulate only policies specified as strings, use SimulateCustomPolicy +// instead. You can also optionally include one resource-based policy to be +// evaluated with each of the resources included in the simulation for IAM users +// only. The simulation does not perform the API operations; it only checks the +// authorization to determine if the simulated policies allow or deny the +// operations. Note: This operation discloses information about the permissions +// granted to other users. If you do not want users to see other user's +// permissions, then consider allowing them to use SimulateCustomPolicy instead. +// Context keys are variables maintained by Amazon Web Services and its services +// that provide details about the context of an API query request. You can use the +// Condition element of an IAM policy to evaluate context keys. To get the list of +// context keys that the policies require for correct simulation, use +// GetContextKeysForPrincipalPolicy . If the output is long, you can use the +// MaxItems and Marker parameters to paginate the results. The IAM policy +// simulator evaluates statements in the identity-based policy and the inputs that +// you provide during simulation. The policy simulator results can differ from your +// live Amazon Web Services environment. We recommend that you check your policies +// against your live Amazon Web Services environment after testing using the policy +// simulator to confirm that you have the desired results. For more information +// about using the policy simulator, see Testing IAM policies with the IAM policy +// simulator (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html) +// in the IAM User Guide. +func (c *Client) SimulatePrincipalPolicy(ctx context.Context, params *SimulatePrincipalPolicyInput, optFns ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) { + if params == nil { + params = &SimulatePrincipalPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SimulatePrincipalPolicy", params, optFns, c.addOperationSimulatePrincipalPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SimulatePrincipalPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SimulatePrincipalPolicyInput struct { + + // A list of names of API operations to evaluate in the simulation. Each operation + // is evaluated for each resource. Each operation must include the service + // identifier, such as iam:CreateUser . + // + // This member is required. + ActionNames []string + + // The Amazon Resource Name (ARN) of a user, group, or role whose policies you + // want to include in the simulation. If you specify a user, group, or role, the + // simulation includes all policies that are associated with that entity. If you + // specify a user, the simulation also includes all policies that are attached to + // any groups the user belongs to. The maximum length of the policy document that + // you can pass in this operation, including whitespace, is listed below. To view + // the maximum character counts of a managed policy with no whitespaces, see IAM + // and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) + // . For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + PolicySourceArn *string + + // The ARN of the IAM user that you want to specify as the simulated caller of the + // API operations. If you do not specify a CallerArn , it defaults to the ARN of + // the user that you specify in PolicySourceArn , if you specified a user. If you + // include both a PolicySourceArn (for example, + // arn:aws:iam::123456789012:user/David ) and a CallerArn (for example, + // arn:aws:iam::123456789012:user/Bob ), the result is that you simulate calling + // the API operations as Bob, as if Bob had David's policies. You can specify only + // the ARN of an IAM user. You cannot specify the ARN of an assumed role, federated + // user, or a service principal. CallerArn is required if you include a + // ResourcePolicy and the PolicySourceArn is not the ARN for an IAM user. This is + // required so that the resource-based policy's Principal element has a value to + // use in evaluating the policy. For more information about ARNs, see Amazon + // Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + CallerArn *string + + // A list of context keys and corresponding values for the simulation to use. + // Whenever a context key is evaluated in one of the simulated IAM permissions + // policies, the corresponding value is supplied. + ContextEntries []types.ContextEntry + + // Use this parameter only when paginating results and only after you receive a + // response indicating that the results are truncated. Set it to the value of the + // Marker element in the response that you received to indicate where the next call + // should start. + Marker *string + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + MaxItems *int32 + + // The IAM permissions boundary policy to simulate. The permissions boundary sets + // the maximum permissions that the entity can have. You can input only one + // permissions boundary when you pass a policy to this operation. An IAM entity can + // only have one permissions boundary in effect at a time. For example, if a + // permissions boundary is attached to an entity and you pass in a different + // permissions boundary policy using this parameter, then the new permissions + // boundary policy is used for the simulation. For more information about + // permissions boundaries, see Permissions boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. The policy input is specified as a string containing the + // complete, valid JSON text of a permissions boundary policy. The maximum length + // of the policy document that you can pass in this operation, including + // whitespace, is listed below. To view the maximum character counts of a managed + // policy with no whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) + // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this + // parameter is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + PermissionsBoundaryPolicyInputList []string + + // An optional list of additional policy documents to include in the simulation. + // Each document is specified as a string containing the complete, valid JSON text + // of an IAM policy. The regex pattern (http://wikipedia.org/wiki/regex) used to + // validate this parameter is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + PolicyInputList []string + + // A list of ARNs of Amazon Web Services resources to include in the simulation. + // If this parameter is not provided, then the value defaults to * (all + // resources). Each API in the ActionNames parameter is evaluated for each + // resource in this list. The simulation determines the access result (allowed or + // denied) of each combination and reports it in the response. You can simulate + // resources that don't exist in your account. The simulation does not + // automatically retrieve policies for the specified resources. If you want to + // include a resource policy in the simulation, then you must include the policy as + // a string in the ResourcePolicy parameter. For more information about ARNs, see + // Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. Simulation of resource-based + // policies isn't supported for IAM roles. + ResourceArns []string + + // Specifies the type of simulation to run. Different API operations that support + // resource-based policies require different combinations of resources. By + // specifying the type of simulation to run, you enable the policy simulator to + // enforce the presence of the required resources to ensure reliable simulation + // results. If your simulation does not match one of the following scenarios, then + // you can omit this parameter. The following list shows each of the supported + // scenario values and the resources that you must define to run the simulation. + // Each of the EC2 scenarios requires that you specify instance, image, and + // security group resources. If your scenario includes an EBS volume, then you must + // specify that volume as a resource. If the EC2 scenario includes VPC, then you + // must supply the network interface resource. If it includes an IP subnet, then + // you must specify the subnet resource. For more information on the EC2 scenario + // options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) + // in the Amazon EC2 User Guide. + // - EC2-VPC-InstanceStore instance, image, security group, network interface + // - EC2-VPC-InstanceStore-Subnet instance, image, security group, network + // interface, subnet + // - EC2-VPC-EBS instance, image, security group, network interface, volume + // - EC2-VPC-EBS-Subnet instance, image, security group, network interface, + // subnet, volume + ResourceHandlingOption *string + + // An Amazon Web Services account ID that specifies the owner of any simulated + // resource that does not identify its owner in the resource ARN. Examples of + // resource ARNs include an S3 bucket or object. If ResourceOwner is specified, it + // is also used as the account owner of any ResourcePolicy included in the + // simulation. If the ResourceOwner parameter is not specified, then the owner of + // the resources and the resource policy defaults to the account of the identity + // provided in CallerArn . This parameter is required only if you specify a + // resource-based policy and account that owns the resource is different from the + // account that owns the simulated calling user CallerArn . + ResourceOwner *string + + // A resource-based policy to include in the simulation provided as a string. Each + // resource in the simulation is treated as if it had this policy attached. You can + // include only one resource-based policy in a simulation. The maximum length of + // the policy document that you can pass in this operation, including whitespace, + // is listed below. To view the maximum character counts of a managed policy with + // no whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) + // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this + // parameter is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // Simulation of resource-based policies isn't supported for IAM roles. + ResourcePolicy *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful SimulatePrincipalPolicy or +// SimulateCustomPolicy request. +type SimulatePrincipalPolicyOutput struct { + + // The results of the simulation. + EvaluationResults []types.EvaluationResult + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer than + // the MaxItems number of results even when there are more results available. We + // recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated bool + + // When IsTruncated is true , this element is present and contains the value to use + // for the Marker parameter in a subsequent pagination request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpSimulatePrincipalPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSimulatePrincipalPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SimulatePrincipalPolicy"); 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 = 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 = addOpSimulatePrincipalPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimulatePrincipalPolicy(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 + } + return nil +} + +// SimulatePrincipalPolicyAPIClient is a client that implements the +// SimulatePrincipalPolicy operation. +type SimulatePrincipalPolicyAPIClient interface { + SimulatePrincipalPolicy(context.Context, *SimulatePrincipalPolicyInput, ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) +} + +var _ SimulatePrincipalPolicyAPIClient = (*Client)(nil) + +// SimulatePrincipalPolicyPaginatorOptions is the paginator options for +// SimulatePrincipalPolicy +type SimulatePrincipalPolicyPaginatorOptions struct { + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true . If you do not include this + // parameter, the number of items defaults to 100. Note that IAM might return fewer + // results, even when there are more results available. In that case, the + // IsTruncated response element returns true , and Marker contains a value to + // include in the subsequent call that tells the service where to continue from. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// SimulatePrincipalPolicyPaginator is a paginator for SimulatePrincipalPolicy +type SimulatePrincipalPolicyPaginator struct { + options SimulatePrincipalPolicyPaginatorOptions + client SimulatePrincipalPolicyAPIClient + params *SimulatePrincipalPolicyInput + nextToken *string + firstPage bool +} + +// NewSimulatePrincipalPolicyPaginator returns a new +// SimulatePrincipalPolicyPaginator +func NewSimulatePrincipalPolicyPaginator(client SimulatePrincipalPolicyAPIClient, params *SimulatePrincipalPolicyInput, optFns ...func(*SimulatePrincipalPolicyPaginatorOptions)) *SimulatePrincipalPolicyPaginator { + if params == nil { + params = &SimulatePrincipalPolicyInput{} + } + + options := SimulatePrincipalPolicyPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &SimulatePrincipalPolicyPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SimulatePrincipalPolicyPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SimulatePrincipalPolicy page. +func (p *SimulatePrincipalPolicyPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.SimulatePrincipalPolicy(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opSimulatePrincipalPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SimulatePrincipalPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go new file mode 100644 index 0000000000000..0541e1e72a543 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds one or more tags to an IAM instance profile. If a tag with the same key +// name already exists, then that tag is overwritten with the new value. Each tag +// consists of a key name and an associated value. By assigning tags to your +// resources, you can do the following: +// +// - Administrative grouping and discovery - Attach tags to resources to aid in +// organization and search. For example, you could search for all resources with +// the key name Project and the value MyImportantProject. Or search for all +// resources with the key name Cost Center and the value 41200. +// +// - Access control - Include tags in IAM user-based and resource-based +// policies. You can use tags to restrict access to only an IAM instance profile +// that has a specified tag attached. For examples of policies that show how to use +// tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// - If any one of the tags is invalid or if you exceed the allowed maximum +// number of tags, then the entire request fails and the resource is not created. +// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +// +// - Amazon Web Services always interprets the tag Value as a single string. If +// you need to store an array, you can store comma-separated values in the string. +// However, you must interpret the value in your code. +func (c *Client) TagInstanceProfile(ctx context.Context, params *TagInstanceProfileInput, optFns ...func(*Options)) (*TagInstanceProfileOutput, error) { + if params == nil { + params = &TagInstanceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagInstanceProfile", params, optFns, c.addOperationTagInstanceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagInstanceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagInstanceProfileInput struct { + + // The name of the IAM instance profile to which you want to add tags. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + InstanceProfileName *string + + // The list of tags that you want to attach to the IAM instance profile. Each tag + // consists of a key name and an associated value. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagInstanceProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpTagInstanceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagInstanceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagInstanceProfile"); 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 = 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 = addOpTagInstanceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagInstanceProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagInstanceProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go new file mode 100644 index 0000000000000..c75b8f1b2172e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds one or more tags to an IAM virtual multi-factor authentication (MFA) +// device. If a tag with the same key name already exists, then that tag is +// overwritten with the new value. A tag consists of a key name and an associated +// value. By assigning tags to your resources, you can do the following: +// +// - Administrative grouping and discovery - Attach tags to resources to aid in +// organization and search. For example, you could search for all resources with +// the key name Project and the value MyImportantProject. Or search for all +// resources with the key name Cost Center and the value 41200. +// +// - Access control - Include tags in IAM user-based and resource-based +// policies. You can use tags to restrict access to only an IAM virtual MFA device +// that has a specified tag attached. For examples of policies that show how to use +// tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// - If any one of the tags is invalid or if you exceed the allowed maximum +// number of tags, then the entire request fails and the resource is not created. +// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +// +// - Amazon Web Services always interprets the tag Value as a single string. If +// you need to store an array, you can store comma-separated values in the string. +// However, you must interpret the value in your code. +func (c *Client) TagMFADevice(ctx context.Context, params *TagMFADeviceInput, optFns ...func(*Options)) (*TagMFADeviceOutput, error) { + if params == nil { + params = &TagMFADeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagMFADevice", params, optFns, c.addOperationTagMFADeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagMFADeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagMFADeviceInput struct { + + // The unique identifier for the IAM virtual MFA device to which you want to add + // tags. For virtual MFA devices, the serial number is the same as the ARN. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + SerialNumber *string + + // The list of tags that you want to attach to the IAM virtual MFA device. Each + // tag consists of a key name and an associated value. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagMFADeviceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpTagMFADevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagMFADevice{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagMFADevice"); 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 = 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 = addOpTagMFADeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagMFADevice(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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagMFADevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagMFADevice", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go new file mode 100644 index 0000000000000..34a1b177c1461 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds one or more tags to an OpenID Connect (OIDC)-compatible identity provider. +// For more information about these providers, see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html) +// . If a tag with the same key name already exists, then that tag is overwritten +// with the new value. A tag consists of a key name and an associated value. By +// assigning tags to your resources, you can do the following: +// +// - Administrative grouping and discovery - Attach tags to resources to aid in +// organization and search. For example, you could search for all resources with +// the key name Project and the value MyImportantProject. Or search for all +// resources with the key name Cost Center and the value 41200. +// +// - Access control - Include tags in IAM identity-based and resource-based +// policies. You can use tags to restrict access to only an OIDC provider that has +// a specified tag attached. For examples of policies that show how to use tags to +// control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// - If any one of the tags is invalid or if you exceed the allowed maximum +// number of tags, then the entire request fails and the resource is not created. +// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +// +// - Amazon Web Services always interprets the tag Value as a single string. If +// you need to store an array, you can store comma-separated values in the string. +// However, you must interpret the value in your code. +func (c *Client) TagOpenIDConnectProvider(ctx context.Context, params *TagOpenIDConnectProviderInput, optFns ...func(*Options)) (*TagOpenIDConnectProviderOutput, error) { + if params == nil { + params = &TagOpenIDConnectProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagOpenIDConnectProvider", params, optFns, c.addOperationTagOpenIDConnectProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagOpenIDConnectProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagOpenIDConnectProviderInput struct { + + // The ARN of the OIDC identity provider in IAM to which you want to add tags. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + OpenIDConnectProviderArn *string + + // The list of tags that you want to attach to the OIDC identity provider in IAM. + // Each tag consists of a key name and an associated value. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagOpenIDConnectProviderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpTagOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagOpenIDConnectProvider"); 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 = 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 = addOpTagOpenIDConnectProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagOpenIDConnectProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagOpenIDConnectProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagOpenIDConnectProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go new file mode 100644 index 0000000000000..7d4400a8ce5b3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds one or more tags to an IAM customer managed policy. If a tag with the same +// key name already exists, then that tag is overwritten with the new value. A tag +// consists of a key name and an associated value. By assigning tags to your +// resources, you can do the following: +// +// - Administrative grouping and discovery - Attach tags to resources to aid in +// organization and search. For example, you could search for all resources with +// the key name Project and the value MyImportantProject. Or search for all +// resources with the key name Cost Center and the value 41200. +// +// - Access control - Include tags in IAM user-based and resource-based +// policies. You can use tags to restrict access to only an IAM customer managed +// policy that has a specified tag attached. For examples of policies that show how +// to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// - If any one of the tags is invalid or if you exceed the allowed maximum +// number of tags, then the entire request fails and the resource is not created. +// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +// +// - Amazon Web Services always interprets the tag Value as a single string. If +// you need to store an array, you can store comma-separated values in the string. +// However, you must interpret the value in your code. +func (c *Client) TagPolicy(ctx context.Context, params *TagPolicyInput, optFns ...func(*Options)) (*TagPolicyOutput, error) { + if params == nil { + params = &TagPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagPolicy", params, optFns, c.addOperationTagPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagPolicyInput struct { + + // The ARN of the IAM customer managed policy to which you want to add tags. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + PolicyArn *string + + // The list of tags that you want to attach to the IAM customer managed policy. + // Each tag consists of a key name and an associated value. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpTagPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagPolicy"); 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 = 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 = addOpTagPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go new file mode 100644 index 0000000000000..ef0da72b370ec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds one or more tags to an IAM role. The role can be a regular role or a +// service-linked role. If a tag with the same key name already exists, then that +// tag is overwritten with the new value. A tag consists of a key name and an +// associated value. By assigning tags to your resources, you can do the following: +// +// - Administrative grouping and discovery - Attach tags to resources to aid in +// organization and search. For example, you could search for all resources with +// the key name Project and the value MyImportantProject. Or search for all +// resources with the key name Cost Center and the value 41200. +// +// - Access control - Include tags in IAM user-based and resource-based +// policies. You can use tags to restrict access to only an IAM role that has a +// specified tag attached. You can also restrict access to only those resources +// that have a certain tag attached. For examples of policies that show how to use +// tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// - Cost allocation - Use tags to help track which individuals and teams are +// using which Amazon Web Services resources. +// +// - If any one of the tags is invalid or if you exceed the allowed maximum +// number of tags, then the entire request fails and the resource is not created. +// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +// +// - Amazon Web Services always interprets the tag Value as a single string. If +// you need to store an array, you can store comma-separated values in the string. +// However, you must interpret the value in your code. +// +// For more information about tagging, see Tagging IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) TagRole(ctx context.Context, params *TagRoleInput, optFns ...func(*Options)) (*TagRoleOutput, error) { + if params == nil { + params = &TagRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagRole", params, optFns, c.addOperationTagRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagRoleInput struct { + + // The name of the IAM role to which you want to add tags. This parameter accepts + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters that consist of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + // The list of tags that you want to attach to the IAM role. Each tag consists of + // a key name and an associated value. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagRoleOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpTagRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagRole"); 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 = 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 = addOpTagRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagRole(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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go new file mode 100644 index 0000000000000..596d9633edf63 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds one or more tags to a Security Assertion Markup Language (SAML) identity +// provider. For more information about these providers, see About SAML 2.0-based +// federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) +// . If a tag with the same key name already exists, then that tag is overwritten +// with the new value. A tag consists of a key name and an associated value. By +// assigning tags to your resources, you can do the following: +// +// - Administrative grouping and discovery - Attach tags to resources to aid in +// organization and search. For example, you could search for all resources with +// the key name Project and the value MyImportantProject. Or search for all +// resources with the key name Cost Center and the value 41200. +// +// - Access control - Include tags in IAM user-based and resource-based +// policies. You can use tags to restrict access to only a SAML identity provider +// that has a specified tag attached. For examples of policies that show how to use +// tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// - If any one of the tags is invalid or if you exceed the allowed maximum +// number of tags, then the entire request fails and the resource is not created. +// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +// +// - Amazon Web Services always interprets the tag Value as a single string. If +// you need to store an array, you can store comma-separated values in the string. +// However, you must interpret the value in your code. +func (c *Client) TagSAMLProvider(ctx context.Context, params *TagSAMLProviderInput, optFns ...func(*Options)) (*TagSAMLProviderOutput, error) { + if params == nil { + params = &TagSAMLProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagSAMLProvider", params, optFns, c.addOperationTagSAMLProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagSAMLProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagSAMLProviderInput struct { + + // The ARN of the SAML identity provider in IAM to which you want to add tags. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + SAMLProviderArn *string + + // The list of tags that you want to attach to the SAML identity provider in IAM. + // Each tag consists of a key name and an associated value. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagSAMLProviderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpTagSAMLProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagSAMLProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagSAMLProvider"); 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 = 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 = addOpTagSAMLProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagSAMLProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagSAMLProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagSAMLProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go new file mode 100644 index 0000000000000..dcccb44e4abfe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds one or more tags to an IAM server certificate. If a tag with the same key +// name already exists, then that tag is overwritten with the new value. For +// certificates in a Region supported by Certificate Manager (ACM), we recommend +// that you don't use IAM server certificates. Instead, use ACM to provision, +// manage, and deploy your server certificates. For more information about IAM +// server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. A tag consists of a key name and an associated value. By +// assigning tags to your resources, you can do the following: +// +// - Administrative grouping and discovery - Attach tags to resources to aid in +// organization and search. For example, you could search for all resources with +// the key name Project and the value MyImportantProject. Or search for all +// resources with the key name Cost Center and the value 41200. +// +// - Access control - Include tags in IAM user-based and resource-based +// policies. You can use tags to restrict access to only a server certificate that +// has a specified tag attached. For examples of policies that show how to use tags +// to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// - Cost allocation - Use tags to help track which individuals and teams are +// using which Amazon Web Services resources. +// +// - If any one of the tags is invalid or if you exceed the allowed maximum +// number of tags, then the entire request fails and the resource is not created. +// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +// +// - Amazon Web Services always interprets the tag Value as a single string. If +// you need to store an array, you can store comma-separated values in the string. +// However, you must interpret the value in your code. +func (c *Client) TagServerCertificate(ctx context.Context, params *TagServerCertificateInput, optFns ...func(*Options)) (*TagServerCertificateOutput, error) { + if params == nil { + params = &TagServerCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagServerCertificate", params, optFns, c.addOperationTagServerCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagServerCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagServerCertificateInput struct { + + // The name of the IAM server certificate to which you want to add tags. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + ServerCertificateName *string + + // The list of tags that you want to attach to the IAM server certificate. Each + // tag consists of a key name and an associated value. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagServerCertificateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpTagServerCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagServerCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagServerCertificate"); 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 = 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 = addOpTagServerCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagServerCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagServerCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagServerCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go new file mode 100644 index 0000000000000..f33d200b19ba8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds one or more tags to an IAM user. If a tag with the same key name already +// exists, then that tag is overwritten with the new value. A tag consists of a key +// name and an associated value. By assigning tags to your resources, you can do +// the following: +// +// - Administrative grouping and discovery - Attach tags to resources to aid in +// organization and search. For example, you could search for all resources with +// the key name Project and the value MyImportantProject. Or search for all +// resources with the key name Cost Center and the value 41200. +// +// - Access control - Include tags in IAM identity-based and resource-based +// policies. You can use tags to restrict access to only an IAM requesting user +// that has a specified tag attached. You can also restrict access to only those +// resources that have a certain tag attached. For examples of policies that show +// how to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// - Cost allocation - Use tags to help track which individuals and teams are +// using which Amazon Web Services resources. +// +// - If any one of the tags is invalid or if you exceed the allowed maximum +// number of tags, then the entire request fails and the resource is not created. +// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +// +// - Amazon Web Services always interprets the tag Value as a single string. If +// you need to store an array, you can store comma-separated values in the string. +// However, you must interpret the value in your code. +// +// For more information about tagging, see Tagging IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) TagUser(ctx context.Context, params *TagUserInput, optFns ...func(*Options)) (*TagUserOutput, error) { + if params == nil { + params = &TagUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagUser", params, optFns, c.addOperationTagUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagUserInput struct { + + // The list of tags that you want to attach to the IAM user. Each tag consists of + // a key name and an associated value. + // + // This member is required. + Tags []types.Tag + + // The name of the IAM user to which you want to add tags. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type TagUserOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpTagUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTagUser{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagUser"); 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 = 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 = addOpTagUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagUser(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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagUser", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go new file mode 100644 index 0000000000000..5413b8fe97dfe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified tags from the IAM instance profile. For more information +// about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) UntagInstanceProfile(ctx context.Context, params *UntagInstanceProfileInput, optFns ...func(*Options)) (*UntagInstanceProfileOutput, error) { + if params == nil { + params = &UntagInstanceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagInstanceProfile", params, optFns, c.addOperationUntagInstanceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagInstanceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagInstanceProfileInput struct { + + // The name of the IAM instance profile from which you want to remove tags. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + InstanceProfileName *string + + // A list of key names as a simple array of strings. The tags with matching keys + // are removed from the specified instance profile. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagInstanceProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagInstanceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagInstanceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagInstanceProfile"); 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 = 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 = addOpUntagInstanceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagInstanceProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagInstanceProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go new file mode 100644 index 0000000000000..4d98b397cb8f0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified tags from the IAM virtual multi-factor authentication +// (MFA) device. For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) UntagMFADevice(ctx context.Context, params *UntagMFADeviceInput, optFns ...func(*Options)) (*UntagMFADeviceOutput, error) { + if params == nil { + params = &UntagMFADeviceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagMFADevice", params, optFns, c.addOperationUntagMFADeviceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagMFADeviceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagMFADeviceInput struct { + + // The unique identifier for the IAM virtual MFA device from which you want to + // remove tags. For virtual MFA devices, the serial number is the same as the ARN. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + SerialNumber *string + + // A list of key names as a simple array of strings. The tags with matching keys + // are removed from the specified instance profile. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagMFADeviceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagMFADevice{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagMFADevice{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagMFADevice"); 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 = 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 = addOpUntagMFADeviceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagMFADevice(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagMFADevice(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagMFADevice", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go new file mode 100644 index 0000000000000..ed8a0fd087633 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified tags from the specified OpenID Connect (OIDC)-compatible +// identity provider in IAM. For more information about OIDC providers, see About +// web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html) +// . For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) UntagOpenIDConnectProvider(ctx context.Context, params *UntagOpenIDConnectProviderInput, optFns ...func(*Options)) (*UntagOpenIDConnectProviderOutput, error) { + if params == nil { + params = &UntagOpenIDConnectProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagOpenIDConnectProvider", params, optFns, c.addOperationUntagOpenIDConnectProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagOpenIDConnectProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagOpenIDConnectProviderInput struct { + + // The ARN of the OIDC provider in IAM from which you want to remove tags. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + OpenIDConnectProviderArn *string + + // A list of key names as a simple array of strings. The tags with matching keys + // are removed from the specified OIDC provider. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagOpenIDConnectProviderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagOpenIDConnectProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagOpenIDConnectProvider"); 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 = 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 = addOpUntagOpenIDConnectProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagOpenIDConnectProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagOpenIDConnectProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagOpenIDConnectProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go new file mode 100644 index 0000000000000..7445de4b6f970 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified tags from the customer managed policy. For more +// information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) UntagPolicy(ctx context.Context, params *UntagPolicyInput, optFns ...func(*Options)) (*UntagPolicyOutput, error) { + if params == nil { + params = &UntagPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagPolicy", params, optFns, c.addOperationUntagPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagPolicyInput struct { + + // The ARN of the IAM customer managed policy from which you want to remove tags. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + PolicyArn *string + + // A list of key names as a simple array of strings. The tags with matching keys + // are removed from the specified policy. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagPolicy"); 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 = 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 = addOpUntagPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go new file mode 100644 index 0000000000000..9b3c6ec7d4921 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified tags from the role. For more information about tagging, +// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) UntagRole(ctx context.Context, params *UntagRoleInput, optFns ...func(*Options)) (*UntagRoleOutput, error) { + if params == nil { + params = &UntagRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagRole", params, optFns, c.addOperationUntagRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagRoleInput struct { + + // The name of the IAM role from which you want to remove tags. This parameter + // accepts (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters that consist of upper and lowercase alphanumeric characters with + // no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + // A list of key names as a simple array of strings. The tags with matching keys + // are removed from the specified role. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagRoleOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagRole"); 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 = 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 = addOpUntagRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagRole(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go new file mode 100644 index 0000000000000..3abe508065960 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified tags from the specified Security Assertion Markup +// Language (SAML) identity provider in IAM. For more information about these +// providers, see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html) +// . For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) UntagSAMLProvider(ctx context.Context, params *UntagSAMLProviderInput, optFns ...func(*Options)) (*UntagSAMLProviderOutput, error) { + if params == nil { + params = &UntagSAMLProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagSAMLProvider", params, optFns, c.addOperationUntagSAMLProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagSAMLProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagSAMLProviderInput struct { + + // The ARN of the SAML identity provider in IAM from which you want to remove + // tags. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + SAMLProviderArn *string + + // A list of key names as a simple array of strings. The tags with matching keys + // are removed from the specified SAML identity provider. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagSAMLProviderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagSAMLProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagSAMLProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagSAMLProvider"); 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 = 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 = addOpUntagSAMLProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagSAMLProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagSAMLProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagSAMLProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go new file mode 100644 index 0000000000000..711e7abc46309 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified tags from the IAM server certificate. For more +// information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. For certificates in a Region supported by Certificate +// Manager (ACM), we recommend that you don't use IAM server certificates. Instead, +// use ACM to provision, manage, and deploy your server certificates. For more +// information about IAM server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. +func (c *Client) UntagServerCertificate(ctx context.Context, params *UntagServerCertificateInput, optFns ...func(*Options)) (*UntagServerCertificateOutput, error) { + if params == nil { + params = &UntagServerCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagServerCertificate", params, optFns, c.addOperationUntagServerCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagServerCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagServerCertificateInput struct { + + // The name of the IAM server certificate from which you want to remove tags. This + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + ServerCertificateName *string + + // A list of key names as a simple array of strings. The tags with matching keys + // are removed from the specified IAM server certificate. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagServerCertificateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagServerCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagServerCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagServerCertificate"); 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 = 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 = addOpUntagServerCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagServerCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagServerCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagServerCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go new file mode 100644 index 0000000000000..7e01dfbe65b45 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the specified tags from the user. For more information about tagging, +// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +func (c *Client) UntagUser(ctx context.Context, params *UntagUserInput, optFns ...func(*Options)) (*UntagUserOutput, error) { + if params == nil { + params = &UntagUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagUser", params, optFns, c.addOperationUntagUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagUserInput struct { + + // A list of key names as a simple array of strings. The tags with matching keys + // are removed from the specified user. + // + // This member is required. + TagKeys []string + + // The name of the IAM user from which you want to remove tags. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type UntagUserOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUntagUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUntagUser{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagUser"); 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 = 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 = addOpUntagUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagUser(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagUser", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go new file mode 100644 index 0000000000000..310a25bdd47e2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes the status of the specified access key from Active to Inactive, or vice +// versa. This operation can be used to disable a user's key as part of a key +// rotation workflow. If the UserName is not specified, the user name is +// determined implicitly based on the Amazon Web Services access key ID used to +// sign the request. If a temporary access key is used, then UserName is required. +// If a long-term key is assigned to the user, then UserName is not required. This +// operation works for access keys under the Amazon Web Services account. +// Consequently, you can use this operation to manage Amazon Web Services account +// root user credentials even if the Amazon Web Services account has no associated +// users. For information about rotating keys, see Managing keys and certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html) +// in the IAM User Guide. +func (c *Client) UpdateAccessKey(ctx context.Context, params *UpdateAccessKeyInput, optFns ...func(*Options)) (*UpdateAccessKeyOutput, error) { + if params == nil { + params = &UpdateAccessKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAccessKey", params, optFns, c.addOperationUpdateAccessKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAccessKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAccessKeyInput struct { + + // The access key ID of the secret access key you want to update. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters that can consist of any upper or lowercased letter or digit. + // + // This member is required. + AccessKeyId *string + + // The status you want to assign to the secret access key. Active means that the + // key can be used for programmatic calls to Amazon Web Services, while Inactive + // means that the key cannot be used. + // + // This member is required. + Status types.StatusType + + // The name of the user whose key you want to update. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +type UpdateAccessKeyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateAccessKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateAccessKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAccessKey"); 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 = 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 = addOpUpdateAccessKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccessKey(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAccessKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAccessKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go new file mode 100644 index 0000000000000..49f14b167b782 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the password policy settings for the Amazon Web Services account. This +// operation does not support partial updates. No parameters are required, but if +// you do not specify a parameter, that parameter's value reverts to its default +// value. See the Request Parameters section for each parameter's default value. +// Also note that some parameters do not allow the default parameter to be +// explicitly set. Instead, to invoke the default value, do not include that +// parameter when you invoke the operation. For more information about using a +// password policy, see Managing an IAM password policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html) +// in the IAM User Guide. +func (c *Client) UpdateAccountPasswordPolicy(ctx context.Context, params *UpdateAccountPasswordPolicyInput, optFns ...func(*Options)) (*UpdateAccountPasswordPolicyOutput, error) { + if params == nil { + params = &UpdateAccountPasswordPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAccountPasswordPolicy", params, optFns, c.addOperationUpdateAccountPasswordPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAccountPasswordPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAccountPasswordPolicyInput struct { + + // Allows all IAM users in your account to use the Amazon Web Services Management + // Console to change their own passwords. For more information, see Permitting IAM + // users to change their own passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_enable-user-change.html) + // in the IAM User Guide. If you do not specify a value for this parameter, then + // the operation uses the default value of false . The result is that IAM users in + // the account do not automatically have permissions to change their own password. + AllowUsersToChangePassword bool + + // Prevents IAM users who are accessing the account via the Amazon Web Services + // Management Console from setting a new console password after their password has + // expired. The IAM user cannot access the console until an administrator resets + // the password. If you do not specify a value for this parameter, then the + // operation uses the default value of false . The result is that IAM users can + // change their passwords after they expire and continue to sign in as the user. In + // the Amazon Web Services Management Console, the custom password policy option + // Allow users to change their own password gives IAM users permissions to + // iam:ChangePassword for only their user and to the iam:GetAccountPasswordPolicy + // action. This option does not attach a permissions policy to each user, rather + // the permissions are applied at the account-level for all users by IAM. IAM users + // with iam:ChangePassword permission and active access keys can reset their own + // expired console password using the CLI or API. + HardExpiry *bool + + // The number of days that an IAM user password is valid. If you do not specify a + // value for this parameter, then the operation uses the default value of 0 . The + // result is that IAM user passwords never expire. + MaxPasswordAge *int32 + + // The minimum number of characters allowed in an IAM user password. If you do not + // specify a value for this parameter, then the operation uses the default value of + // 6 . + MinimumPasswordLength *int32 + + // Specifies the number of previous passwords that IAM users are prevented from + // reusing. If you do not specify a value for this parameter, then the operation + // uses the default value of 0 . The result is that IAM users are not prevented + // from reusing previous passwords. + PasswordReusePrevention *int32 + + // Specifies whether IAM user passwords must contain at least one lowercase + // character from the ISO basic Latin alphabet (a to z). If you do not specify a + // value for this parameter, then the operation uses the default value of false . + // The result is that passwords do not require at least one lowercase character. + RequireLowercaseCharacters bool + + // Specifies whether IAM user passwords must contain at least one numeric + // character (0 to 9). If you do not specify a value for this parameter, then the + // operation uses the default value of false . The result is that passwords do not + // require at least one numeric character. + RequireNumbers bool + + // Specifies whether IAM user passwords must contain at least one of the following + // non-alphanumeric characters: ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' If you do + // not specify a value for this parameter, then the operation uses the default + // value of false . The result is that passwords do not require at least one symbol + // character. + RequireSymbols bool + + // Specifies whether IAM user passwords must contain at least one uppercase + // character from the ISO basic Latin alphabet (A to Z). If you do not specify a + // value for this parameter, then the operation uses the default value of false . + // The result is that passwords do not require at least one uppercase character. + RequireUppercaseCharacters bool + + noSmithyDocumentSerde +} + +type UpdateAccountPasswordPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateAccountPasswordPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateAccountPasswordPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAccountPasswordPolicy"); 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 = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountPasswordPolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAccountPasswordPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAccountPasswordPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go new file mode 100644 index 0000000000000..b1971bd0c03a6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the policy that grants an IAM entity permission to assume a role. This +// is typically referred to as the "role trust policy". For more information about +// roles, see Using roles to delegate permissions and federate identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) +// . +func (c *Client) UpdateAssumeRolePolicy(ctx context.Context, params *UpdateAssumeRolePolicyInput, optFns ...func(*Options)) (*UpdateAssumeRolePolicyOutput, error) { + if params == nil { + params = &UpdateAssumeRolePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAssumeRolePolicy", params, optFns, c.addOperationUpdateAssumeRolePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAssumeRolePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAssumeRolePolicyInput struct { + + // The policy that grants an entity permission to assume the role. You must + // provide policies in JSON format in IAM. However, for CloudFormation templates + // formatted in YAML, you can provide the policy in JSON or YAML format. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. The regex pattern (http://wikipedia.org/wiki/regex) used to validate + // this parameter is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PolicyDocument *string + + // The name of the role to update with the new policy. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type UpdateAssumeRolePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateAssumeRolePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateAssumeRolePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAssumeRolePolicy"); 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 = 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 = addOpUpdateAssumeRolePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAssumeRolePolicy(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAssumeRolePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAssumeRolePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go new file mode 100644 index 0000000000000..60421a3ca4119 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the name and/or the path of the specified IAM group. You should +// understand the implications of changing a group's path or name. For more +// information, see Renaming users and groups (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html) +// in the IAM User Guide. The person making the request (the principal), must have +// permission to change the role group with the old name and the new name. For +// example, to change the group named Managers to MGRs , the principal must have a +// policy that allows them to update both groups. If the principal has permission +// to update the Managers group, but not the MGRs group, then the update fails. +// For more information about permissions, see Access management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) +// . +func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optFns ...func(*Options)) (*UpdateGroupOutput, error) { + if params == nil { + params = &UpdateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateGroup", params, optFns, c.addOperationUpdateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateGroupInput struct { + + // Name of the IAM group to update. If you're changing the name of the group, this + // is the original name. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + GroupName *string + + // New name for the IAM group. Only include this if changing the group's name. IAM + // user, group, role, and policy names must be unique within the account. Names are + // not distinguished by case. For example, you cannot create resources named both + // "MyResource" and "myresource". + NewGroupName *string + + // New path for the IAM group. Only include this if changing the group's path. + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + NewPath *string + + noSmithyDocumentSerde +} + +type UpdateGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateGroup"); 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 = 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 = addOpUpdateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGroup(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go new file mode 100644 index 0000000000000..1ff8af348c945 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes the password for the specified IAM user. You can use the CLI, the +// Amazon Web Services API, or the Users page in the IAM console to change the +// password for any IAM user. Use ChangePassword to change your own password in +// the My Security Credentials page in the Amazon Web Services Management Console. +// For more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) +// in the IAM User Guide. +func (c *Client) UpdateLoginProfile(ctx context.Context, params *UpdateLoginProfileInput, optFns ...func(*Options)) (*UpdateLoginProfileOutput, error) { + if params == nil { + params = &UpdateLoginProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLoginProfile", params, optFns, c.addOperationUpdateLoginProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLoginProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLoginProfileInput struct { + + // The name of the user whose password you want to update. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + // The new password for the specified IAM user. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // However, the format can be further restricted by the account administrator by + // setting a password policy on the Amazon Web Services account. For more + // information, see UpdateAccountPasswordPolicy . + Password *string + + // Allows this new password to be used only once by requiring the specified IAM + // user to set a new password on next sign-in. + PasswordResetRequired *bool + + noSmithyDocumentSerde +} + +type UpdateLoginProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateLoginProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateLoginProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLoginProfile"); 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 = 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 = addOpUpdateLoginProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLoginProfile(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLoginProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLoginProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go new file mode 100644 index 0000000000000..026e2d7745920 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Replaces the existing list of server certificate thumbprints associated with an +// OpenID Connect (OIDC) provider resource object with a new list of thumbprints. +// The list that you pass with this operation completely replaces the existing list +// of thumbprints. (The lists are not merged.) Typically, you need to update a +// thumbprint only when the identity provider certificate changes, which occurs +// rarely. However, if the provider's certificate does change, any attempt to +// assume an IAM role that specifies the OIDC provider as a principal fails until +// the certificate thumbprint is updated. Amazon Web Services secures communication +// with some OIDC identity providers (IdPs) through our library of trusted root +// certificate authorities (CAs) instead of using a certificate thumbprint to +// verify your IdP server certificate. In these cases, your legacy thumbprint +// remains in your configuration, but is no longer used for validation. These OIDC +// IdPs include Auth0, GitHub, GitLab, Google, and those that use an Amazon S3 +// bucket to host a JSON Web Key Set (JWKS) endpoint. Trust for the OIDC provider +// is derived from the provider certificate and is validated by the thumbprint. +// Therefore, it is best to limit access to the +// UpdateOpenIDConnectProviderThumbprint operation to highly privileged users. +func (c *Client) UpdateOpenIDConnectProviderThumbprint(ctx context.Context, params *UpdateOpenIDConnectProviderThumbprintInput, optFns ...func(*Options)) (*UpdateOpenIDConnectProviderThumbprintOutput, error) { + if params == nil { + params = &UpdateOpenIDConnectProviderThumbprintInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOpenIDConnectProviderThumbprint", params, optFns, c.addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOpenIDConnectProviderThumbprintOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOpenIDConnectProviderThumbprintInput struct { + + // The Amazon Resource Name (ARN) of the IAM OIDC provider resource object for + // which you want to update the thumbprint. You can get a list of OIDC provider + // ARNs by using the ListOpenIDConnectProviders operation. For more information + // about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + OpenIDConnectProviderArn *string + + // A list of certificate thumbprints that are associated with the specified IAM + // OpenID Connect provider. For more information, see CreateOpenIDConnectProvider . + // + // This member is required. + ThumbprintList []string + + noSmithyDocumentSerde +} + +type UpdateOpenIDConnectProviderThumbprintOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateOpenIDConnectProviderThumbprint{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateOpenIDConnectProviderThumbprint"); 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 = 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 = addOpUpdateOpenIDConnectProviderThumbprintValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOpenIDConnectProviderThumbprint(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateOpenIDConnectProviderThumbprint(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateOpenIDConnectProviderThumbprint", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go new file mode 100644 index 0000000000000..460886f3eea1a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the description or maximum session duration setting of a role. +func (c *Client) UpdateRole(ctx context.Context, params *UpdateRoleInput, optFns ...func(*Options)) (*UpdateRoleOutput, error) { + if params == nil { + params = &UpdateRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRole", params, optFns, c.addOperationUpdateRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRoleInput struct { + + // The name of the role that you want to modify. + // + // This member is required. + RoleName *string + + // The new description that you want to apply to the specified role. + Description *string + + // The maximum session duration (in seconds) that you want to set for the + // specified role. If you do not specify a value for this setting, the default + // value of one hour is applied. This setting can have a value from 1 hour to 12 + // hours. Anyone who assumes the role from the CLI or API can use the + // DurationSeconds API parameter or the duration-seconds CLI parameter to request + // a longer session. The MaxSessionDuration setting determines the maximum + // duration that can be requested using the DurationSeconds parameter. If users + // don't specify a value for the DurationSeconds parameter, their security + // credentials are valid for one hour by default. This applies when you use the + // AssumeRole* API operations or the assume-role* CLI operations but does not + // apply when you use those operations to create a console URL. For more + // information, see Using IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) + // in the IAM User Guide. + MaxSessionDuration *int32 + + noSmithyDocumentSerde +} + +type UpdateRoleOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateRole"); 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 = 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 = addOpUpdateRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRole(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go new file mode 100644 index 0000000000000..642d1b5116182 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use UpdateRole instead. Modifies only the description of a role. This operation +// performs the same function as the Description parameter in the UpdateRole +// operation. +func (c *Client) UpdateRoleDescription(ctx context.Context, params *UpdateRoleDescriptionInput, optFns ...func(*Options)) (*UpdateRoleDescriptionOutput, error) { + if params == nil { + params = &UpdateRoleDescriptionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRoleDescription", params, optFns, c.addOperationUpdateRoleDescriptionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRoleDescriptionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRoleDescriptionInput struct { + + // The new description that you want to apply to the specified role. + // + // This member is required. + Description *string + + // The name of the role that you want to modify. + // + // This member is required. + RoleName *string + + noSmithyDocumentSerde +} + +type UpdateRoleDescriptionOutput struct { + + // A structure that contains details about the modified role. + Role *types.Role + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateRoleDescription{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateRoleDescription{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateRoleDescription"); 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 = 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 = addOpUpdateRoleDescriptionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRoleDescription(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateRoleDescription(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateRoleDescription", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go new file mode 100644 index 0000000000000..b725db8419107 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the metadata document for an existing SAML provider resource object. +// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) +// . +func (c *Client) UpdateSAMLProvider(ctx context.Context, params *UpdateSAMLProviderInput, optFns ...func(*Options)) (*UpdateSAMLProviderOutput, error) { + if params == nil { + params = &UpdateSAMLProviderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSAMLProvider", params, optFns, c.addOperationUpdateSAMLProviderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSAMLProviderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSAMLProviderInput struct { + + // An XML document generated by an identity provider (IdP) that supports SAML 2.0. + // The document includes the issuer's name, expiration information, and keys that + // can be used to validate the SAML authentication response (assertions) that are + // received from the IdP. You must generate the metadata document using the + // identity management software that is used as your organization's IdP. + // + // This member is required. + SAMLMetadataDocument *string + + // The Amazon Resource Name (ARN) of the SAML provider to update. For more + // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + SAMLProviderArn *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful UpdateSAMLProvider request. +type UpdateSAMLProviderOutput struct { + + // The Amazon Resource Name (ARN) of the SAML provider that was updated. + SAMLProviderArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateSAMLProvider{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateSAMLProvider{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSAMLProvider"); 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 = 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 = addOpUpdateSAMLProviderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSAMLProvider(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSAMLProvider(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateSAMLProvider", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go new file mode 100644 index 0000000000000..9383e877a49b5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets the status of an IAM user's SSH public key to active or inactive. SSH +// public keys that are inactive cannot be used for authentication. This operation +// can be used to disable a user's SSH public key as part of a key rotation work +// flow. The SSH public key affected by this operation is used only for +// authenticating the associated IAM user to an CodeCommit repository. For more +// information about using SSH keys to authenticate to an CodeCommit repository, +// see Set up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) +// in the CodeCommit User Guide. +func (c *Client) UpdateSSHPublicKey(ctx context.Context, params *UpdateSSHPublicKeyInput, optFns ...func(*Options)) (*UpdateSSHPublicKeyOutput, error) { + if params == nil { + params = &UpdateSSHPublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSSHPublicKey", params, optFns, c.addOperationUpdateSSHPublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSSHPublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSSHPublicKeyInput struct { + + // The unique identifier for the SSH public key. This parameter allows (through + // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // that can consist of any upper or lowercased letter or digit. + // + // This member is required. + SSHPublicKeyId *string + + // The status to assign to the SSH public key. Active means that the key can be + // used for authentication with an CodeCommit repository. Inactive means that the + // key cannot be used. + // + // This member is required. + Status types.StatusType + + // The name of the IAM user associated with the SSH public key. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type UpdateSSHPublicKeyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateSSHPublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateSSHPublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSSHPublicKey"); 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 = 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 = addOpUpdateSSHPublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSSHPublicKey(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSSHPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateSSHPublicKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go new file mode 100644 index 0000000000000..6bac42727afa2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the name and/or the path of the specified server certificate stored in +// IAM. For more information about working with server certificates, see Working +// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. This topic also includes a list of Amazon Web Services +// services that can use the server certificates that you manage with IAM. You +// should understand the implications of changing a server certificate's path or +// name. For more information, see Renaming a server certificate (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts) +// in the IAM User Guide. The person making the request (the principal), must have +// permission to change the server certificate with the old name and the new name. +// For example, to change the certificate named ProductionCert to ProdCert , the +// principal must have a policy that allows them to update both certificates. If +// the principal has permission to update the ProductionCert group, but not the +// ProdCert certificate, then the update fails. For more information about +// permissions, see Access management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) +// in the IAM User Guide. +func (c *Client) UpdateServerCertificate(ctx context.Context, params *UpdateServerCertificateInput, optFns ...func(*Options)) (*UpdateServerCertificateOutput, error) { + if params == nil { + params = &UpdateServerCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateServerCertificate", params, optFns, c.addOperationUpdateServerCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateServerCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateServerCertificateInput struct { + + // The name of the server certificate that you want to update. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + ServerCertificateName *string + + // The new path for the server certificate. Include this only if you are updating + // the server certificate's path. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + NewPath *string + + // The new name for the server certificate. Include this only if you are updating + // the server certificate's name. The name of the certificate cannot contain any + // spaces. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + NewServerCertificateName *string + + noSmithyDocumentSerde +} + +type UpdateServerCertificateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateServerCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateServerCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateServerCertificate"); 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 = 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 = addOpUpdateServerCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServerCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateServerCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateServerCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go new file mode 100644 index 0000000000000..420188394d07c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets the status of a service-specific credential to Active or Inactive . +// Service-specific credentials that are inactive cannot be used for authentication +// to the service. This operation can be used to disable a user's service-specific +// credential as part of a credential rotation work flow. +func (c *Client) UpdateServiceSpecificCredential(ctx context.Context, params *UpdateServiceSpecificCredentialInput, optFns ...func(*Options)) (*UpdateServiceSpecificCredentialOutput, error) { + if params == nil { + params = &UpdateServiceSpecificCredentialInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateServiceSpecificCredential", params, optFns, c.addOperationUpdateServiceSpecificCredentialMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateServiceSpecificCredentialOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateServiceSpecificCredentialInput struct { + + // The unique identifier of the service-specific credential. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters that can consist of any upper or lowercased letter or digit. + // + // This member is required. + ServiceSpecificCredentialId *string + + // The status to be assigned to the service-specific credential. + // + // This member is required. + Status types.StatusType + + // The name of the IAM user associated with the service-specific credential. If + // you do not specify this value, then the operation assumes the user whose + // credentials are used to call the operation. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +type UpdateServiceSpecificCredentialOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateServiceSpecificCredential{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateServiceSpecificCredential{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateServiceSpecificCredential"); 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 = 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 = addOpUpdateServiceSpecificCredentialValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceSpecificCredential(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateServiceSpecificCredential(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateServiceSpecificCredential", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go new file mode 100644 index 0000000000000..1d5415d4b477a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes the status of the specified user signing certificate from active to +// disabled, or vice versa. This operation can be used to disable an IAM user's +// signing certificate as part of a certificate rotation work flow. If the UserName +// field is not specified, the user name is determined implicitly based on the +// Amazon Web Services access key ID used to sign the request. This operation works +// for access keys under the Amazon Web Services account. Consequently, you can use +// this operation to manage Amazon Web Services account root user credentials even +// if the Amazon Web Services account has no associated users. +func (c *Client) UpdateSigningCertificate(ctx context.Context, params *UpdateSigningCertificateInput, optFns ...func(*Options)) (*UpdateSigningCertificateOutput, error) { + if params == nil { + params = &UpdateSigningCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSigningCertificate", params, optFns, c.addOperationUpdateSigningCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSigningCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSigningCertificateInput struct { + + // The ID of the signing certificate you want to update. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters that can consist of any upper or lowercased letter or digit. + // + // This member is required. + CertificateId *string + + // The status you want to assign to the certificate. Active means that the + // certificate can be used for programmatic calls to Amazon Web Services Inactive + // means that the certificate cannot be used. + // + // This member is required. + Status types.StatusType + + // The name of the IAM user the signing certificate belongs to. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +type UpdateSigningCertificateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateSigningCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateSigningCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSigningCertificate"); 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 = 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 = addOpUpdateSigningCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSigningCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSigningCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateSigningCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go new file mode 100644 index 0000000000000..11aeb0e6325bf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the name and/or the path of the specified IAM user. You should +// understand the implications of changing an IAM user's path or name. For more +// information, see Renaming an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming) +// and Renaming an IAM group (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html) +// in the IAM User Guide. To change a user name, the requester must have +// appropriate permissions on both the source object and the target object. For +// example, to change Bob to Robert, the entity making the request must have +// permission on Bob and Robert, or must have permission on all (*). For more +// information about permissions, see Permissions and policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html) +// . +func (c *Client) UpdateUser(ctx context.Context, params *UpdateUserInput, optFns ...func(*Options)) (*UpdateUserOutput, error) { + if params == nil { + params = &UpdateUserInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateUser", params, optFns, c.addOperationUpdateUserMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateUserOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateUserInput struct { + + // Name of the user to update. If you're changing the name of the user, this is + // the original user name. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of upper and lowercase alphanumeric + // characters with no spaces. You can also include any of the following characters: + // _+=,.@- + // + // This member is required. + UserName *string + + // New path for the IAM user. Include this parameter only if you're changing the + // user's path. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + NewPath *string + + // New name for the user. Include this parameter only if you're changing the + // user's name. IAM user, group, role, and policy names must be unique within the + // account. Names are not distinguished by case. For example, you cannot create + // resources named both "MyResource" and "myresource". + NewUserName *string + + noSmithyDocumentSerde +} + +type UpdateUserOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateUser{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateUser{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateUser"); 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 = 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 = addOpUpdateUserValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateUser(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateUser(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateUser", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go new file mode 100644 index 0000000000000..9e6a88b675aa9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Uploads an SSH public key and associates it with the specified IAM user. The +// SSH public key uploaded by this operation can be used only for authenticating +// the associated IAM user to an CodeCommit repository. For more information about +// using SSH keys to authenticate to an CodeCommit repository, see Set up +// CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) +// in the CodeCommit User Guide. +func (c *Client) UploadSSHPublicKey(ctx context.Context, params *UploadSSHPublicKeyInput, optFns ...func(*Options)) (*UploadSSHPublicKeyOutput, error) { + if params == nil { + params = &UploadSSHPublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UploadSSHPublicKey", params, optFns, c.addOperationUploadSSHPublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UploadSSHPublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UploadSSHPublicKeyInput struct { + + // The SSH public key. The public key must be encoded in ssh-rsa format or PEM + // format. The minimum bit-length of the public key is 2048 bits. For example, you + // can generate a 2048-bit key, and the resulting PEM file is 1679 bytes long. The + // regex pattern (http://wikipedia.org/wiki/regex) used to validate this parameter + // is a string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + SSHPublicKeyBody *string + + // The name of the IAM user to associate the SSH public key with. This parameter + // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string + // of characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful UploadSSHPublicKey request. +type UploadSSHPublicKeyOutput struct { + + // Contains information about the SSH public key. + SSHPublicKey *types.SSHPublicKey + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUploadSSHPublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUploadSSHPublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UploadSSHPublicKey"); 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 = 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 = addOpUploadSSHPublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadSSHPublicKey(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUploadSSHPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UploadSSHPublicKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go new file mode 100644 index 0000000000000..65206aac76a41 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go @@ -0,0 +1,229 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Uploads a server certificate entity for the Amazon Web Services account. The +// server certificate entity includes a public key certificate, a private key, and +// an optional certificate chain, which should all be PEM-encoded. We recommend +// that you use Certificate Manager (https://docs.aws.amazon.com/acm/) to +// provision, manage, and deploy your server certificates. With ACM you can request +// a certificate, deploy it to Amazon Web Services resources, and let ACM handle +// certificate renewals for you. Certificates provided by ACM are free. For more +// information about using ACM, see the Certificate Manager User Guide (https://docs.aws.amazon.com/acm/latest/userguide/) +// . For more information about working with server certificates, see Working with +// server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. This topic includes a list of Amazon Web Services +// services that can use the server certificates that you manage with IAM. For +// information about the number of server certificates you can upload, see IAM and +// STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// in the IAM User Guide. Because the body of the public key certificate, private +// key, and the certificate chain can be large, you should use POST rather than GET +// when calling UploadServerCertificate . For information about setting up +// signatures and authorization through the API, see Signing Amazon Web Services +// API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) +// in the Amazon Web Services General Reference. For general information about +// using the Query API with IAM, see Calling the API by making HTTP query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/programming.html) +// in the IAM User Guide. +func (c *Client) UploadServerCertificate(ctx context.Context, params *UploadServerCertificateInput, optFns ...func(*Options)) (*UploadServerCertificateOutput, error) { + if params == nil { + params = &UploadServerCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UploadServerCertificate", params, optFns, c.addOperationUploadServerCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UploadServerCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UploadServerCertificateInput struct { + + // The contents of the public key certificate in PEM-encoded format. The regex + // pattern (http://wikipedia.org/wiki/regex) used to validate this parameter is a + // string of characters consisting of the following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + CertificateBody *string + + // The contents of the private key in PEM-encoded format. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + PrivateKey *string + + // The name for the server certificate. Do not include the path in this value. The + // name of the certificate cannot contain any spaces. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + // + // This member is required. + ServerCertificateName *string + + // The contents of the certificate chain. This is typically a concatenation of the + // PEM-encoded public key certificates of the chain. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + CertificateChain *string + + // The path for the server certificate. For more information about paths, see IAM + // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. This parameter is optional. If it is not included, it + // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) + // ) a string of characters consisting of either a forward slash (/) by itself or a + // string that must begin and end with forward slashes. In addition, it can contain + // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + // If you are uploading a server certificate specifically for use with Amazon + // CloudFront distributions, you must specify a path using the path parameter. The + // path must begin with /cloudfront and must include a trailing slash (for + // example, /cloudfront/test/ ). + Path *string + + // A list of tags that you want to attach to the new IAM server certificate + // resource. Each tag consists of a key name and an associated value. For more + // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. If any one of the tags is invalid or if you exceed the + // allowed maximum number of tags, then the entire request fails and the resource + // is not created. + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Contains the response to a successful UploadServerCertificate request. +type UploadServerCertificateOutput struct { + + // The meta information of the uploaded server certificate without its certificate + // body, certificate chain, and private key. + ServerCertificateMetadata *types.ServerCertificateMetadata + + // A list of tags that are attached to the new IAM server certificate. The + // returned list of tags is sorted by tag key. For more information about tagging, + // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUploadServerCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUploadServerCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UploadServerCertificate"); 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 = 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 = addOpUploadServerCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadServerCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUploadServerCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UploadServerCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go new file mode 100644 index 0000000000000..386f063547f84 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Uploads an X.509 signing certificate and associates it with the specified IAM +// user. Some Amazon Web Services services require you to use certificates to +// validate requests that are signed with a corresponding private key. When you +// upload the certificate, its default status is Active . For information about +// when you would use an X.509 signing certificate, see Managing server +// certificates in IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) +// in the IAM User Guide. If the UserName is not specified, the IAM user name is +// determined implicitly based on the Amazon Web Services access key ID used to +// sign the request. This operation works for access keys under the Amazon Web +// Services account. Consequently, you can use this operation to manage Amazon Web +// Services account root user credentials even if the Amazon Web Services account +// has no associated users. Because the body of an X.509 certificate can be large, +// you should use POST rather than GET when calling UploadSigningCertificate . For +// information about setting up signatures and authorization through the API, see +// Signing Amazon Web Services API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) +// in the Amazon Web Services General Reference. For general information about +// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) +// in the IAM User Guide. +func (c *Client) UploadSigningCertificate(ctx context.Context, params *UploadSigningCertificateInput, optFns ...func(*Options)) (*UploadSigningCertificateOutput, error) { + if params == nil { + params = &UploadSigningCertificateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UploadSigningCertificate", params, optFns, c.addOperationUploadSigningCertificateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UploadSigningCertificateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UploadSigningCertificateInput struct { + + // The contents of the signing certificate. The regex pattern (http://wikipedia.org/wiki/regex) + // used to validate this parameter is a string of characters consisting of the + // following: + // - Any printable ASCII character ranging from the space character ( \u0020 ) + // through the end of the ASCII character range + // - The printable characters in the Basic Latin and Latin-1 Supplement + // character set (through \u00FF ) + // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage + // return ( \u000D ) + // + // This member is required. + CertificateBody *string + + // The name of the user the signing certificate is for. This parameter allows + // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of + // characters consisting of upper and lowercase alphanumeric characters with no + // spaces. You can also include any of the following characters: _+=,.@- + UserName *string + + noSmithyDocumentSerde +} + +// Contains the response to a successful UploadSigningCertificate request. +type UploadSigningCertificateOutput struct { + + // Information about the certificate. + // + // This member is required. + Certificate *types.SigningCertificate + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpUploadSigningCertificate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUploadSigningCertificate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UploadSigningCertificate"); 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 = 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 = addOpUploadSigningCertificateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadSigningCertificate(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 + } + return nil +} + +func newServiceMetadataMiddleware_opUploadSigningCertificate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UploadSigningCertificate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go new file mode 100644 index 0000000000000..f7f5917156abc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go @@ -0,0 +1,284 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { + params.Region = options.Region +} + +type setLegacyContextSigningOptionsMiddleware struct { +} + +func (*setLegacyContextSigningOptionsMiddleware) ID() string { + return "setLegacyContextSigningOptions" +} + +func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + schemeID := rscheme.Scheme.SchemeID() + + if sn := awsmiddleware.GetSigningName(ctx); sn != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) + } + } + + if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) + } + } + + return next.HandleFinalize(ctx, in) +} + +func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) +} + +type withAnonymous struct { + resolver AuthSchemeResolver +} + +var _ AuthSchemeResolver = (*withAnonymous)(nil) + +func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + opts, err := v.resolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return nil, err + } + + opts = append(opts, &smithyauth.Option{ + SchemeID: smithyauth.SchemeIDAnonymous, + }) + return opts, nil +} + +func wrapWithAnonymousAuth(options *Options) { + if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { + return + } + + options.AuthSchemeResolver = &withAnonymous{ + resolver: options.AuthSchemeResolver, + } +} + +// AuthResolverParameters contains the set of inputs necessary for auth scheme +// resolution. +type AuthResolverParameters struct { + // The name of the operation being invoked. + Operation string + + // The region in which the operation is being invoked. + Region string +} + +func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { + params := &AuthResolverParameters{ + Operation: operation, + } + + bindAuthParamsRegion(params, input, options) + + return params +} + +// AuthSchemeResolver returns a set of possible authentication options for an +// operation. +type AuthSchemeResolver interface { + ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) +} + +type defaultAuthSchemeResolver struct{} + +var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) + +func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + if overrides, ok := operationAuthOptions[params.Operation]; ok { + return overrides(params), nil + } + return serviceAuthOptions(params), nil +} + +var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "iam") + smithyhttp.SetSigV4SigningRegion(&props, params.Region) + return props + }(), + }, + } +} + +type resolveAuthSchemeMiddleware struct { + operation string + options Options +} + +func (*resolveAuthSchemeMiddleware) ID() string { + return "ResolveAuthScheme" +} + +func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options) + options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) + } + + scheme, ok := m.selectScheme(options) + if !ok { + return out, metadata, fmt.Errorf("could not select an auth scheme") + } + + ctx = setResolvedAuthScheme(ctx, scheme) + return next.HandleFinalize(ctx, in) +} + +func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { + for _, option := range options { + if option.SchemeID == smithyauth.SchemeIDAnonymous { + return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true + } + + for _, scheme := range m.options.AuthSchemes { + if scheme.SchemeID() != option.SchemeID { + continue + } + + if scheme.IdentityResolver(m.options) != nil { + return newResolvedAuthScheme(scheme, option), true + } + } + } + + return nil, false +} + +type resolvedAuthSchemeKey struct{} + +type resolvedAuthScheme struct { + Scheme smithyhttp.AuthScheme + IdentityProperties smithy.Properties + SignerProperties smithy.Properties +} + +func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { + return &resolvedAuthScheme{ + Scheme: scheme, + IdentityProperties: option.IdentityProperties, + SignerProperties: option.SignerProperties, + } +} + +func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { + return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) +} + +func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { + v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) + return v +} + +type getIdentityMiddleware struct { + options Options +} + +func (*getIdentityMiddleware) ID() string { + return "GetIdentity" +} + +func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + resolver := rscheme.Scheme.IdentityResolver(m.options) + if resolver == nil { + return out, metadata, fmt.Errorf("no identity resolver") + } + + identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + return next.HandleFinalize(ctx, in) +} + +type identityKey struct{} + +func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { + return middleware.WithStackValue(ctx, identityKey{}, identity) +} + +func getIdentity(ctx context.Context) smithyauth.Identity { + v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) + return v +} + +type signRequestMiddleware struct { +} + +func (*signRequestMiddleware) ID() string { + return "Signing" +} + +func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + signer := rscheme.Scheme.Signer() + if signer == nil { + return out, metadata, fmt.Errorf("no signer") + } + + if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go new file mode 100644 index 0000000000000..93813d5b20254 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go @@ -0,0 +1,31645 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/xml" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + smithy "github.com/aws/smithy-go" + smithyxml "github.com/aws/smithy-go/encoding/xml" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "strconv" + "strings" +) + +type awsAwsquery_deserializeOpAddClientIDToOpenIDConnectProvider struct { +} + +func (*awsAwsquery_deserializeOpAddClientIDToOpenIDConnectProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpAddClientIDToOpenIDConnectProvider) 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 + } + + 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_deserializeOpErrorAddClientIDToOpenIDConnectProvider(response, &metadata) + } + output := &AddClientIDToOpenIDConnectProviderOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorAddClientIDToOpenIDConnectProvider(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpAddRoleToInstanceProfile struct { +} + +func (*awsAwsquery_deserializeOpAddRoleToInstanceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpAddRoleToInstanceProfile) 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 + } + + 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_deserializeOpErrorAddRoleToInstanceProfile(response, &metadata) + } + output := &AddRoleToInstanceProfileOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorAddRoleToInstanceProfile(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("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpAddUserToGroup struct { +} + +func (*awsAwsquery_deserializeOpAddUserToGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpAddUserToGroup) 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 + } + + 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_deserializeOpErrorAddUserToGroup(response, &metadata) + } + output := &AddUserToGroupOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorAddUserToGroup(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpAttachGroupPolicy struct { +} + +func (*awsAwsquery_deserializeOpAttachGroupPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpAttachGroupPolicy) 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 + } + + 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_deserializeOpErrorAttachGroupPolicy(response, &metadata) + } + output := &AttachGroupPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorAttachGroupPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PolicyNotAttachable", errorCode): + return awsAwsquery_deserializeErrorPolicyNotAttachableException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpAttachRolePolicy struct { +} + +func (*awsAwsquery_deserializeOpAttachRolePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpAttachRolePolicy) 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 + } + + 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_deserializeOpErrorAttachRolePolicy(response, &metadata) + } + output := &AttachRolePolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorAttachRolePolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PolicyNotAttachable", errorCode): + return awsAwsquery_deserializeErrorPolicyNotAttachableException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpAttachUserPolicy struct { +} + +func (*awsAwsquery_deserializeOpAttachUserPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpAttachUserPolicy) 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 + } + + 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_deserializeOpErrorAttachUserPolicy(response, &metadata) + } + output := &AttachUserPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorAttachUserPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PolicyNotAttachable", errorCode): + return awsAwsquery_deserializeErrorPolicyNotAttachableException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpChangePassword struct { +} + +func (*awsAwsquery_deserializeOpChangePassword) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpChangePassword) 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 + } + + 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_deserializeOpErrorChangePassword(response, &metadata) + } + output := &ChangePasswordOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorChangePassword(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("EntityTemporarilyUnmodifiable", errorCode): + return awsAwsquery_deserializeErrorEntityTemporarilyUnmodifiableException(response, errorBody) + + case strings.EqualFold("InvalidUserType", errorCode): + return awsAwsquery_deserializeErrorInvalidUserTypeException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PasswordPolicyViolation", errorCode): + return awsAwsquery_deserializeErrorPasswordPolicyViolationException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateAccessKey struct { +} + +func (*awsAwsquery_deserializeOpCreateAccessKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateAccessKey) 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 + } + + 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_deserializeOpErrorCreateAccessKey(response, &metadata) + } + output := &CreateAccessKeyOutput{} + 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("CreateAccessKeyResult") + 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_deserializeOpDocumentCreateAccessKeyOutput(&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_deserializeOpErrorCreateAccessKey(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateAccountAlias struct { +} + +func (*awsAwsquery_deserializeOpCreateAccountAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateAccountAlias) 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 + } + + 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_deserializeOpErrorCreateAccountAlias(response, &metadata) + } + output := &CreateAccountAliasOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorCreateAccountAlias(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateGroup struct { +} + +func (*awsAwsquery_deserializeOpCreateGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateGroup) 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 + } + + 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_deserializeOpErrorCreateGroup(response, &metadata) + } + output := &CreateGroupOutput{} + 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("CreateGroupResult") + 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_deserializeOpDocumentCreateGroupOutput(&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_deserializeOpErrorCreateGroup(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("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateInstanceProfile struct { +} + +func (*awsAwsquery_deserializeOpCreateInstanceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateInstanceProfile) 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 + } + + 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_deserializeOpErrorCreateInstanceProfile(response, &metadata) + } + output := &CreateInstanceProfileOutput{} + 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("CreateInstanceProfileResult") + 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_deserializeOpDocumentCreateInstanceProfileOutput(&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_deserializeOpErrorCreateInstanceProfile(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateLoginProfile struct { +} + +func (*awsAwsquery_deserializeOpCreateLoginProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateLoginProfile) 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 + } + + 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_deserializeOpErrorCreateLoginProfile(response, &metadata) + } + output := &CreateLoginProfileOutput{} + 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("CreateLoginProfileResult") + 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_deserializeOpDocumentCreateLoginProfileOutput(&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_deserializeOpErrorCreateLoginProfile(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("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PasswordPolicyViolation", errorCode): + return awsAwsquery_deserializeErrorPasswordPolicyViolationException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateOpenIDConnectProvider struct { +} + +func (*awsAwsquery_deserializeOpCreateOpenIDConnectProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateOpenIDConnectProvider) 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 + } + + 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_deserializeOpErrorCreateOpenIDConnectProvider(response, &metadata) + } + output := &CreateOpenIDConnectProviderOutput{} + 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("CreateOpenIDConnectProviderResult") + 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_deserializeOpDocumentCreateOpenIDConnectProviderOutput(&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_deserializeOpErrorCreateOpenIDConnectProvider(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreatePolicy struct { +} + +func (*awsAwsquery_deserializeOpCreatePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreatePolicy) 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 + } + + 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_deserializeOpErrorCreatePolicy(response, &metadata) + } + output := &CreatePolicyOutput{} + 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("CreatePolicyResult") + 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_deserializeOpDocumentCreatePolicyOutput(&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_deserializeOpErrorCreatePolicy(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocument", errorCode): + return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreatePolicyVersion struct { +} + +func (*awsAwsquery_deserializeOpCreatePolicyVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreatePolicyVersion) 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 + } + + 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_deserializeOpErrorCreatePolicyVersion(response, &metadata) + } + output := &CreatePolicyVersionOutput{} + 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("CreatePolicyVersionResult") + 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_deserializeOpDocumentCreatePolicyVersionOutput(&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_deserializeOpErrorCreatePolicyVersion(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocument", errorCode): + return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateRole struct { +} + +func (*awsAwsquery_deserializeOpCreateRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateRole) 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 + } + + 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_deserializeOpErrorCreateRole(response, &metadata) + } + output := &CreateRoleOutput{} + 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("CreateRoleResult") + 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_deserializeOpDocumentCreateRoleOutput(&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_deserializeOpErrorCreateRole(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocument", errorCode): + return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateSAMLProvider struct { +} + +func (*awsAwsquery_deserializeOpCreateSAMLProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateSAMLProvider) 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 + } + + 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_deserializeOpErrorCreateSAMLProvider(response, &metadata) + } + output := &CreateSAMLProviderOutput{} + 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("CreateSAMLProviderResult") + 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_deserializeOpDocumentCreateSAMLProviderOutput(&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_deserializeOpErrorCreateSAMLProvider(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateServiceLinkedRole struct { +} + +func (*awsAwsquery_deserializeOpCreateServiceLinkedRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateServiceLinkedRole) 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 + } + + 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_deserializeOpErrorCreateServiceLinkedRole(response, &metadata) + } + output := &CreateServiceLinkedRoleOutput{} + 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("CreateServiceLinkedRoleResult") + 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_deserializeOpDocumentCreateServiceLinkedRoleOutput(&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_deserializeOpErrorCreateServiceLinkedRole(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateServiceSpecificCredential struct { +} + +func (*awsAwsquery_deserializeOpCreateServiceSpecificCredential) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateServiceSpecificCredential) 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 + } + + 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_deserializeOpErrorCreateServiceSpecificCredential(response, &metadata) + } + output := &CreateServiceSpecificCredentialOutput{} + 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("CreateServiceSpecificCredentialResult") + 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_deserializeOpDocumentCreateServiceSpecificCredentialOutput(&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_deserializeOpErrorCreateServiceSpecificCredential(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("NotSupportedService", errorCode): + return awsAwsquery_deserializeErrorServiceNotSupportedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateUser struct { +} + +func (*awsAwsquery_deserializeOpCreateUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateUser) 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 + } + + 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_deserializeOpErrorCreateUser(response, &metadata) + } + output := &CreateUserOutput{} + 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("CreateUserResult") + 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_deserializeOpDocumentCreateUserOutput(&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_deserializeOpErrorCreateUser(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpCreateVirtualMFADevice struct { +} + +func (*awsAwsquery_deserializeOpCreateVirtualMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpCreateVirtualMFADevice) 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 + } + + 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_deserializeOpErrorCreateVirtualMFADevice(response, &metadata) + } + output := &CreateVirtualMFADeviceOutput{} + 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("CreateVirtualMFADeviceResult") + 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_deserializeOpDocumentCreateVirtualMFADeviceOutput(&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_deserializeOpErrorCreateVirtualMFADevice(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeactivateMFADevice struct { +} + +func (*awsAwsquery_deserializeOpDeactivateMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeactivateMFADevice) 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 + } + + 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_deserializeOpErrorDeactivateMFADevice(response, &metadata) + } + output := &DeactivateMFADeviceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeactivateMFADevice(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityTemporarilyUnmodifiable", errorCode): + return awsAwsquery_deserializeErrorEntityTemporarilyUnmodifiableException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteAccessKey struct { +} + +func (*awsAwsquery_deserializeOpDeleteAccessKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteAccessKey) 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 + } + + 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_deserializeOpErrorDeleteAccessKey(response, &metadata) + } + output := &DeleteAccessKeyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteAccessKey(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteAccountAlias struct { +} + +func (*awsAwsquery_deserializeOpDeleteAccountAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteAccountAlias) 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 + } + + 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_deserializeOpErrorDeleteAccountAlias(response, &metadata) + } + output := &DeleteAccountAliasOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteAccountAlias(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteAccountPasswordPolicy struct { +} + +func (*awsAwsquery_deserializeOpDeleteAccountPasswordPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteAccountPasswordPolicy) 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 + } + + 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_deserializeOpErrorDeleteAccountPasswordPolicy(response, &metadata) + } + output := &DeleteAccountPasswordPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteAccountPasswordPolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteGroup struct { +} + +func (*awsAwsquery_deserializeOpDeleteGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteGroup) 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 + } + + 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_deserializeOpErrorDeleteGroup(response, &metadata) + } + output := &DeleteGroupOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteGroup(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("DeleteConflict", errorCode): + return awsAwsquery_deserializeErrorDeleteConflictException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteGroupPolicy struct { +} + +func (*awsAwsquery_deserializeOpDeleteGroupPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteGroupPolicy) 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 + } + + 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_deserializeOpErrorDeleteGroupPolicy(response, &metadata) + } + output := &DeleteGroupPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteGroupPolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteInstanceProfile struct { +} + +func (*awsAwsquery_deserializeOpDeleteInstanceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteInstanceProfile) 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 + } + + 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_deserializeOpErrorDeleteInstanceProfile(response, &metadata) + } + output := &DeleteInstanceProfileOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteInstanceProfile(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("DeleteConflict", errorCode): + return awsAwsquery_deserializeErrorDeleteConflictException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteLoginProfile struct { +} + +func (*awsAwsquery_deserializeOpDeleteLoginProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteLoginProfile) 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 + } + + 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_deserializeOpErrorDeleteLoginProfile(response, &metadata) + } + output := &DeleteLoginProfileOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteLoginProfile(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("EntityTemporarilyUnmodifiable", errorCode): + return awsAwsquery_deserializeErrorEntityTemporarilyUnmodifiableException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteOpenIDConnectProvider struct { +} + +func (*awsAwsquery_deserializeOpDeleteOpenIDConnectProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteOpenIDConnectProvider) 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 + } + + 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_deserializeOpErrorDeleteOpenIDConnectProvider(response, &metadata) + } + output := &DeleteOpenIDConnectProviderOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteOpenIDConnectProvider(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeletePolicy struct { +} + +func (*awsAwsquery_deserializeOpDeletePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeletePolicy) 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 + } + + 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_deserializeOpErrorDeletePolicy(response, &metadata) + } + output := &DeletePolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeletePolicy(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("DeleteConflict", errorCode): + return awsAwsquery_deserializeErrorDeleteConflictException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeletePolicyVersion struct { +} + +func (*awsAwsquery_deserializeOpDeletePolicyVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeletePolicyVersion) 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 + } + + 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_deserializeOpErrorDeletePolicyVersion(response, &metadata) + } + output := &DeletePolicyVersionOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeletePolicyVersion(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("DeleteConflict", errorCode): + return awsAwsquery_deserializeErrorDeleteConflictException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteRole struct { +} + +func (*awsAwsquery_deserializeOpDeleteRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteRole) 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 + } + + 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_deserializeOpErrorDeleteRole(response, &metadata) + } + output := &DeleteRoleOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteRole(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("DeleteConflict", errorCode): + return awsAwsquery_deserializeErrorDeleteConflictException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteRolePermissionsBoundary struct { +} + +func (*awsAwsquery_deserializeOpDeleteRolePermissionsBoundary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteRolePermissionsBoundary) 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 + } + + 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_deserializeOpErrorDeleteRolePermissionsBoundary(response, &metadata) + } + output := &DeleteRolePermissionsBoundaryOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteRolePermissionsBoundary(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteRolePolicy struct { +} + +func (*awsAwsquery_deserializeOpDeleteRolePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteRolePolicy) 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 + } + + 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_deserializeOpErrorDeleteRolePolicy(response, &metadata) + } + output := &DeleteRolePolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteRolePolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteSAMLProvider struct { +} + +func (*awsAwsquery_deserializeOpDeleteSAMLProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteSAMLProvider) 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 + } + + 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_deserializeOpErrorDeleteSAMLProvider(response, &metadata) + } + output := &DeleteSAMLProviderOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteSAMLProvider(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteServerCertificate struct { +} + +func (*awsAwsquery_deserializeOpDeleteServerCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteServerCertificate) 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 + } + + 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_deserializeOpErrorDeleteServerCertificate(response, &metadata) + } + output := &DeleteServerCertificateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteServerCertificate(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("DeleteConflict", errorCode): + return awsAwsquery_deserializeErrorDeleteConflictException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteServiceLinkedRole struct { +} + +func (*awsAwsquery_deserializeOpDeleteServiceLinkedRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteServiceLinkedRole) 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 + } + + 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_deserializeOpErrorDeleteServiceLinkedRole(response, &metadata) + } + output := &DeleteServiceLinkedRoleOutput{} + 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("DeleteServiceLinkedRoleResult") + 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_deserializeOpDocumentDeleteServiceLinkedRoleOutput(&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_deserializeOpErrorDeleteServiceLinkedRole(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteServiceSpecificCredential struct { +} + +func (*awsAwsquery_deserializeOpDeleteServiceSpecificCredential) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteServiceSpecificCredential) 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 + } + + 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_deserializeOpErrorDeleteServiceSpecificCredential(response, &metadata) + } + output := &DeleteServiceSpecificCredentialOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteServiceSpecificCredential(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteSigningCertificate struct { +} + +func (*awsAwsquery_deserializeOpDeleteSigningCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteSigningCertificate) 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 + } + + 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_deserializeOpErrorDeleteSigningCertificate(response, &metadata) + } + output := &DeleteSigningCertificateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteSigningCertificate(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteSSHPublicKey struct { +} + +func (*awsAwsquery_deserializeOpDeleteSSHPublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteSSHPublicKey) 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 + } + + 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_deserializeOpErrorDeleteSSHPublicKey(response, &metadata) + } + output := &DeleteSSHPublicKeyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteSSHPublicKey(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteUser struct { +} + +func (*awsAwsquery_deserializeOpDeleteUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteUser) 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 + } + + 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_deserializeOpErrorDeleteUser(response, &metadata) + } + output := &DeleteUserOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteUser(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("DeleteConflict", errorCode): + return awsAwsquery_deserializeErrorDeleteConflictException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteUserPermissionsBoundary struct { +} + +func (*awsAwsquery_deserializeOpDeleteUserPermissionsBoundary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteUserPermissionsBoundary) 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 + } + + 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_deserializeOpErrorDeleteUserPermissionsBoundary(response, &metadata) + } + output := &DeleteUserPermissionsBoundaryOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteUserPermissionsBoundary(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteUserPolicy struct { +} + +func (*awsAwsquery_deserializeOpDeleteUserPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteUserPolicy) 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 + } + + 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_deserializeOpErrorDeleteUserPolicy(response, &metadata) + } + output := &DeleteUserPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteUserPolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDeleteVirtualMFADevice struct { +} + +func (*awsAwsquery_deserializeOpDeleteVirtualMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteVirtualMFADevice) 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 + } + + 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_deserializeOpErrorDeleteVirtualMFADevice(response, &metadata) + } + output := &DeleteVirtualMFADeviceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteVirtualMFADevice(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("DeleteConflict", errorCode): + return awsAwsquery_deserializeErrorDeleteConflictException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDetachGroupPolicy struct { +} + +func (*awsAwsquery_deserializeOpDetachGroupPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDetachGroupPolicy) 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 + } + + 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_deserializeOpErrorDetachGroupPolicy(response, &metadata) + } + output := &DetachGroupPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDetachGroupPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDetachRolePolicy struct { +} + +func (*awsAwsquery_deserializeOpDetachRolePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDetachRolePolicy) 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 + } + + 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_deserializeOpErrorDetachRolePolicy(response, &metadata) + } + output := &DetachRolePolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDetachRolePolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDetachUserPolicy struct { +} + +func (*awsAwsquery_deserializeOpDetachUserPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDetachUserPolicy) 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 + } + + 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_deserializeOpErrorDetachUserPolicy(response, &metadata) + } + output := &DetachUserPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDetachUserPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpEnableMFADevice struct { +} + +func (*awsAwsquery_deserializeOpEnableMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpEnableMFADevice) 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 + } + + 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_deserializeOpErrorEnableMFADevice(response, &metadata) + } + output := &EnableMFADeviceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorEnableMFADevice(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("EntityTemporarilyUnmodifiable", errorCode): + return awsAwsquery_deserializeErrorEntityTemporarilyUnmodifiableException(response, errorBody) + + case strings.EqualFold("InvalidAuthenticationCode", errorCode): + return awsAwsquery_deserializeErrorInvalidAuthenticationCodeException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGenerateCredentialReport struct { +} + +func (*awsAwsquery_deserializeOpGenerateCredentialReport) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGenerateCredentialReport) 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 + } + + 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_deserializeOpErrorGenerateCredentialReport(response, &metadata) + } + output := &GenerateCredentialReportOutput{} + 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("GenerateCredentialReportResult") + 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_deserializeOpDocumentGenerateCredentialReportOutput(&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_deserializeOpErrorGenerateCredentialReport(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGenerateOrganizationsAccessReport struct { +} + +func (*awsAwsquery_deserializeOpGenerateOrganizationsAccessReport) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGenerateOrganizationsAccessReport) 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 + } + + 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_deserializeOpErrorGenerateOrganizationsAccessReport(response, &metadata) + } + output := &GenerateOrganizationsAccessReportOutput{} + 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("GenerateOrganizationsAccessReportResult") + 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_deserializeOpDocumentGenerateOrganizationsAccessReportOutput(&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_deserializeOpErrorGenerateOrganizationsAccessReport(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("ReportGenerationLimitExceeded", errorCode): + return awsAwsquery_deserializeErrorReportGenerationLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGenerateServiceLastAccessedDetails struct { +} + +func (*awsAwsquery_deserializeOpGenerateServiceLastAccessedDetails) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGenerateServiceLastAccessedDetails) 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 + } + + 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_deserializeOpErrorGenerateServiceLastAccessedDetails(response, &metadata) + } + output := &GenerateServiceLastAccessedDetailsOutput{} + 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("GenerateServiceLastAccessedDetailsResult") + 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_deserializeOpDocumentGenerateServiceLastAccessedDetailsOutput(&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_deserializeOpErrorGenerateServiceLastAccessedDetails(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetAccessKeyLastUsed struct { +} + +func (*awsAwsquery_deserializeOpGetAccessKeyLastUsed) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetAccessKeyLastUsed) 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 + } + + 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_deserializeOpErrorGetAccessKeyLastUsed(response, &metadata) + } + output := &GetAccessKeyLastUsedOutput{} + 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("GetAccessKeyLastUsedResult") + 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_deserializeOpDocumentGetAccessKeyLastUsedOutput(&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_deserializeOpErrorGetAccessKeyLastUsed(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 { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetAccountAuthorizationDetails struct { +} + +func (*awsAwsquery_deserializeOpGetAccountAuthorizationDetails) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetAccountAuthorizationDetails) 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 + } + + 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_deserializeOpErrorGetAccountAuthorizationDetails(response, &metadata) + } + output := &GetAccountAuthorizationDetailsOutput{} + 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("GetAccountAuthorizationDetailsResult") + 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_deserializeOpDocumentGetAccountAuthorizationDetailsOutput(&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_deserializeOpErrorGetAccountAuthorizationDetails(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetAccountPasswordPolicy struct { +} + +func (*awsAwsquery_deserializeOpGetAccountPasswordPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetAccountPasswordPolicy) 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 + } + + 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_deserializeOpErrorGetAccountPasswordPolicy(response, &metadata) + } + output := &GetAccountPasswordPolicyOutput{} + 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("GetAccountPasswordPolicyResult") + 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_deserializeOpDocumentGetAccountPasswordPolicyOutput(&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_deserializeOpErrorGetAccountPasswordPolicy(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetAccountSummary struct { +} + +func (*awsAwsquery_deserializeOpGetAccountSummary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetAccountSummary) 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 + } + + 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_deserializeOpErrorGetAccountSummary(response, &metadata) + } + output := &GetAccountSummaryOutput{} + 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("GetAccountSummaryResult") + 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_deserializeOpDocumentGetAccountSummaryOutput(&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_deserializeOpErrorGetAccountSummary(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetContextKeysForCustomPolicy struct { +} + +func (*awsAwsquery_deserializeOpGetContextKeysForCustomPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetContextKeysForCustomPolicy) 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 + } + + 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_deserializeOpErrorGetContextKeysForCustomPolicy(response, &metadata) + } + output := &GetContextKeysForCustomPolicyOutput{} + 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("GetContextKeysForCustomPolicyResult") + 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_deserializeOpDocumentGetContextKeysForCustomPolicyOutput(&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_deserializeOpErrorGetContextKeysForCustomPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetContextKeysForPrincipalPolicy struct { +} + +func (*awsAwsquery_deserializeOpGetContextKeysForPrincipalPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetContextKeysForPrincipalPolicy) 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 + } + + 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_deserializeOpErrorGetContextKeysForPrincipalPolicy(response, &metadata) + } + output := &GetContextKeysForPrincipalPolicyOutput{} + 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("GetContextKeysForPrincipalPolicyResult") + 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_deserializeOpDocumentGetContextKeysForPrincipalPolicyOutput(&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_deserializeOpErrorGetContextKeysForPrincipalPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetCredentialReport struct { +} + +func (*awsAwsquery_deserializeOpGetCredentialReport) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetCredentialReport) 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 + } + + 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_deserializeOpErrorGetCredentialReport(response, &metadata) + } + output := &GetCredentialReportOutput{} + 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("GetCredentialReportResult") + 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_deserializeOpDocumentGetCredentialReportOutput(&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_deserializeOpErrorGetCredentialReport(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("ReportExpired", errorCode): + return awsAwsquery_deserializeErrorCredentialReportExpiredException(response, errorBody) + + case strings.EqualFold("ReportInProgress", errorCode): + return awsAwsquery_deserializeErrorCredentialReportNotReadyException(response, errorBody) + + case strings.EqualFold("ReportNotPresent", errorCode): + return awsAwsquery_deserializeErrorCredentialReportNotPresentException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetGroup struct { +} + +func (*awsAwsquery_deserializeOpGetGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetGroup) 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 + } + + 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_deserializeOpErrorGetGroup(response, &metadata) + } + output := &GetGroupOutput{} + 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("GetGroupResult") + 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_deserializeOpDocumentGetGroupOutput(&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_deserializeOpErrorGetGroup(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetGroupPolicy struct { +} + +func (*awsAwsquery_deserializeOpGetGroupPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetGroupPolicy) 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 + } + + 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_deserializeOpErrorGetGroupPolicy(response, &metadata) + } + output := &GetGroupPolicyOutput{} + 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("GetGroupPolicyResult") + 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_deserializeOpDocumentGetGroupPolicyOutput(&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_deserializeOpErrorGetGroupPolicy(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetInstanceProfile struct { +} + +func (*awsAwsquery_deserializeOpGetInstanceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetInstanceProfile) 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 + } + + 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_deserializeOpErrorGetInstanceProfile(response, &metadata) + } + output := &GetInstanceProfileOutput{} + 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("GetInstanceProfileResult") + 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_deserializeOpDocumentGetInstanceProfileOutput(&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_deserializeOpErrorGetInstanceProfile(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetLoginProfile struct { +} + +func (*awsAwsquery_deserializeOpGetLoginProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetLoginProfile) 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 + } + + 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_deserializeOpErrorGetLoginProfile(response, &metadata) + } + output := &GetLoginProfileOutput{} + 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("GetLoginProfileResult") + 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_deserializeOpDocumentGetLoginProfileOutput(&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_deserializeOpErrorGetLoginProfile(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetMFADevice struct { +} + +func (*awsAwsquery_deserializeOpGetMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetMFADevice) 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 + } + + 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_deserializeOpErrorGetMFADevice(response, &metadata) + } + output := &GetMFADeviceOutput{} + 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("GetMFADeviceResult") + 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_deserializeOpDocumentGetMFADeviceOutput(&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_deserializeOpErrorGetMFADevice(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetOpenIDConnectProvider struct { +} + +func (*awsAwsquery_deserializeOpGetOpenIDConnectProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetOpenIDConnectProvider) 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 + } + + 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_deserializeOpErrorGetOpenIDConnectProvider(response, &metadata) + } + output := &GetOpenIDConnectProviderOutput{} + 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("GetOpenIDConnectProviderResult") + 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_deserializeOpDocumentGetOpenIDConnectProviderOutput(&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_deserializeOpErrorGetOpenIDConnectProvider(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetOrganizationsAccessReport struct { +} + +func (*awsAwsquery_deserializeOpGetOrganizationsAccessReport) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetOrganizationsAccessReport) 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 + } + + 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_deserializeOpErrorGetOrganizationsAccessReport(response, &metadata) + } + output := &GetOrganizationsAccessReportOutput{} + 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("GetOrganizationsAccessReportResult") + 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_deserializeOpDocumentGetOrganizationsAccessReportOutput(&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_deserializeOpErrorGetOrganizationsAccessReport(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetPolicy struct { +} + +func (*awsAwsquery_deserializeOpGetPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetPolicy) 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 + } + + 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_deserializeOpErrorGetPolicy(response, &metadata) + } + output := &GetPolicyOutput{} + 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("GetPolicyResult") + 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_deserializeOpDocumentGetPolicyOutput(&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_deserializeOpErrorGetPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetPolicyVersion struct { +} + +func (*awsAwsquery_deserializeOpGetPolicyVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetPolicyVersion) 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 + } + + 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_deserializeOpErrorGetPolicyVersion(response, &metadata) + } + output := &GetPolicyVersionOutput{} + 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("GetPolicyVersionResult") + 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_deserializeOpDocumentGetPolicyVersionOutput(&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_deserializeOpErrorGetPolicyVersion(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetRole struct { +} + +func (*awsAwsquery_deserializeOpGetRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetRole) 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 + } + + 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_deserializeOpErrorGetRole(response, &metadata) + } + output := &GetRoleOutput{} + 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("GetRoleResult") + 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_deserializeOpDocumentGetRoleOutput(&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_deserializeOpErrorGetRole(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetRolePolicy struct { +} + +func (*awsAwsquery_deserializeOpGetRolePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetRolePolicy) 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 + } + + 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_deserializeOpErrorGetRolePolicy(response, &metadata) + } + output := &GetRolePolicyOutput{} + 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("GetRolePolicyResult") + 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_deserializeOpDocumentGetRolePolicyOutput(&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_deserializeOpErrorGetRolePolicy(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetSAMLProvider struct { +} + +func (*awsAwsquery_deserializeOpGetSAMLProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetSAMLProvider) 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 + } + + 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_deserializeOpErrorGetSAMLProvider(response, &metadata) + } + output := &GetSAMLProviderOutput{} + 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("GetSAMLProviderResult") + 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_deserializeOpDocumentGetSAMLProviderOutput(&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_deserializeOpErrorGetSAMLProvider(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetServerCertificate struct { +} + +func (*awsAwsquery_deserializeOpGetServerCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetServerCertificate) 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 + } + + 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_deserializeOpErrorGetServerCertificate(response, &metadata) + } + output := &GetServerCertificateOutput{} + 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("GetServerCertificateResult") + 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_deserializeOpDocumentGetServerCertificateOutput(&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_deserializeOpErrorGetServerCertificate(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetServiceLastAccessedDetails struct { +} + +func (*awsAwsquery_deserializeOpGetServiceLastAccessedDetails) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetServiceLastAccessedDetails) 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 + } + + 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_deserializeOpErrorGetServiceLastAccessedDetails(response, &metadata) + } + output := &GetServiceLastAccessedDetailsOutput{} + 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("GetServiceLastAccessedDetailsResult") + 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_deserializeOpDocumentGetServiceLastAccessedDetailsOutput(&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_deserializeOpErrorGetServiceLastAccessedDetails(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetServiceLastAccessedDetailsWithEntities struct { +} + +func (*awsAwsquery_deserializeOpGetServiceLastAccessedDetailsWithEntities) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetServiceLastAccessedDetailsWithEntities) 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 + } + + 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_deserializeOpErrorGetServiceLastAccessedDetailsWithEntities(response, &metadata) + } + output := &GetServiceLastAccessedDetailsWithEntitiesOutput{} + 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("GetServiceLastAccessedDetailsWithEntitiesResult") + 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_deserializeOpDocumentGetServiceLastAccessedDetailsWithEntitiesOutput(&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_deserializeOpErrorGetServiceLastAccessedDetailsWithEntities(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetServiceLinkedRoleDeletionStatus struct { +} + +func (*awsAwsquery_deserializeOpGetServiceLinkedRoleDeletionStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetServiceLinkedRoleDeletionStatus) 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 + } + + 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_deserializeOpErrorGetServiceLinkedRoleDeletionStatus(response, &metadata) + } + output := &GetServiceLinkedRoleDeletionStatusOutput{} + 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("GetServiceLinkedRoleDeletionStatusResult") + 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_deserializeOpDocumentGetServiceLinkedRoleDeletionStatusOutput(&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_deserializeOpErrorGetServiceLinkedRoleDeletionStatus(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetSSHPublicKey struct { +} + +func (*awsAwsquery_deserializeOpGetSSHPublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetSSHPublicKey) 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 + } + + 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_deserializeOpErrorGetSSHPublicKey(response, &metadata) + } + output := &GetSSHPublicKeyOutput{} + 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("GetSSHPublicKeyResult") + 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_deserializeOpDocumentGetSSHPublicKeyOutput(&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_deserializeOpErrorGetSSHPublicKey(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("UnrecognizedPublicKeyEncoding", errorCode): + return awsAwsquery_deserializeErrorUnrecognizedPublicKeyEncodingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetUser struct { +} + +func (*awsAwsquery_deserializeOpGetUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetUser) 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 + } + + 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_deserializeOpErrorGetUser(response, &metadata) + } + output := &GetUserOutput{} + 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("GetUserResult") + 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_deserializeOpDocumentGetUserOutput(&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_deserializeOpErrorGetUser(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpGetUserPolicy struct { +} + +func (*awsAwsquery_deserializeOpGetUserPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetUserPolicy) 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 + } + + 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_deserializeOpErrorGetUserPolicy(response, &metadata) + } + output := &GetUserPolicyOutput{} + 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("GetUserPolicyResult") + 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_deserializeOpDocumentGetUserPolicyOutput(&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_deserializeOpErrorGetUserPolicy(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListAccessKeys struct { +} + +func (*awsAwsquery_deserializeOpListAccessKeys) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListAccessKeys) 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 + } + + 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_deserializeOpErrorListAccessKeys(response, &metadata) + } + output := &ListAccessKeysOutput{} + 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("ListAccessKeysResult") + 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_deserializeOpDocumentListAccessKeysOutput(&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_deserializeOpErrorListAccessKeys(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListAccountAliases struct { +} + +func (*awsAwsquery_deserializeOpListAccountAliases) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListAccountAliases) 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 + } + + 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_deserializeOpErrorListAccountAliases(response, &metadata) + } + output := &ListAccountAliasesOutput{} + 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("ListAccountAliasesResult") + 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_deserializeOpDocumentListAccountAliasesOutput(&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_deserializeOpErrorListAccountAliases(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListAttachedGroupPolicies struct { +} + +func (*awsAwsquery_deserializeOpListAttachedGroupPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListAttachedGroupPolicies) 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 + } + + 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_deserializeOpErrorListAttachedGroupPolicies(response, &metadata) + } + output := &ListAttachedGroupPoliciesOutput{} + 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("ListAttachedGroupPoliciesResult") + 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_deserializeOpDocumentListAttachedGroupPoliciesOutput(&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_deserializeOpErrorListAttachedGroupPolicies(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListAttachedRolePolicies struct { +} + +func (*awsAwsquery_deserializeOpListAttachedRolePolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListAttachedRolePolicies) 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 + } + + 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_deserializeOpErrorListAttachedRolePolicies(response, &metadata) + } + output := &ListAttachedRolePoliciesOutput{} + 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("ListAttachedRolePoliciesResult") + 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_deserializeOpDocumentListAttachedRolePoliciesOutput(&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_deserializeOpErrorListAttachedRolePolicies(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListAttachedUserPolicies struct { +} + +func (*awsAwsquery_deserializeOpListAttachedUserPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListAttachedUserPolicies) 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 + } + + 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_deserializeOpErrorListAttachedUserPolicies(response, &metadata) + } + output := &ListAttachedUserPoliciesOutput{} + 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("ListAttachedUserPoliciesResult") + 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_deserializeOpDocumentListAttachedUserPoliciesOutput(&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_deserializeOpErrorListAttachedUserPolicies(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListEntitiesForPolicy struct { +} + +func (*awsAwsquery_deserializeOpListEntitiesForPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListEntitiesForPolicy) 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 + } + + 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_deserializeOpErrorListEntitiesForPolicy(response, &metadata) + } + output := &ListEntitiesForPolicyOutput{} + 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("ListEntitiesForPolicyResult") + 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_deserializeOpDocumentListEntitiesForPolicyOutput(&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_deserializeOpErrorListEntitiesForPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListGroupPolicies struct { +} + +func (*awsAwsquery_deserializeOpListGroupPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListGroupPolicies) 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 + } + + 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_deserializeOpErrorListGroupPolicies(response, &metadata) + } + output := &ListGroupPoliciesOutput{} + 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("ListGroupPoliciesResult") + 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_deserializeOpDocumentListGroupPoliciesOutput(&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_deserializeOpErrorListGroupPolicies(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListGroups struct { +} + +func (*awsAwsquery_deserializeOpListGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListGroups) 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 + } + + 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_deserializeOpErrorListGroups(response, &metadata) + } + output := &ListGroupsOutput{} + 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("ListGroupsResult") + 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_deserializeOpDocumentListGroupsOutput(&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_deserializeOpErrorListGroups(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListGroupsForUser struct { +} + +func (*awsAwsquery_deserializeOpListGroupsForUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListGroupsForUser) 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 + } + + 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_deserializeOpErrorListGroupsForUser(response, &metadata) + } + output := &ListGroupsForUserOutput{} + 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("ListGroupsForUserResult") + 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_deserializeOpDocumentListGroupsForUserOutput(&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_deserializeOpErrorListGroupsForUser(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListInstanceProfiles struct { +} + +func (*awsAwsquery_deserializeOpListInstanceProfiles) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListInstanceProfiles) 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 + } + + 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_deserializeOpErrorListInstanceProfiles(response, &metadata) + } + output := &ListInstanceProfilesOutput{} + 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("ListInstanceProfilesResult") + 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_deserializeOpDocumentListInstanceProfilesOutput(&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_deserializeOpErrorListInstanceProfiles(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListInstanceProfilesForRole struct { +} + +func (*awsAwsquery_deserializeOpListInstanceProfilesForRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListInstanceProfilesForRole) 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 + } + + 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_deserializeOpErrorListInstanceProfilesForRole(response, &metadata) + } + output := &ListInstanceProfilesForRoleOutput{} + 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("ListInstanceProfilesForRoleResult") + 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_deserializeOpDocumentListInstanceProfilesForRoleOutput(&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_deserializeOpErrorListInstanceProfilesForRole(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListInstanceProfileTags struct { +} + +func (*awsAwsquery_deserializeOpListInstanceProfileTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListInstanceProfileTags) 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 + } + + 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_deserializeOpErrorListInstanceProfileTags(response, &metadata) + } + output := &ListInstanceProfileTagsOutput{} + 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("ListInstanceProfileTagsResult") + 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_deserializeOpDocumentListInstanceProfileTagsOutput(&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_deserializeOpErrorListInstanceProfileTags(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListMFADevices struct { +} + +func (*awsAwsquery_deserializeOpListMFADevices) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListMFADevices) 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 + } + + 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_deserializeOpErrorListMFADevices(response, &metadata) + } + output := &ListMFADevicesOutput{} + 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("ListMFADevicesResult") + 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_deserializeOpDocumentListMFADevicesOutput(&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_deserializeOpErrorListMFADevices(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListMFADeviceTags struct { +} + +func (*awsAwsquery_deserializeOpListMFADeviceTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListMFADeviceTags) 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 + } + + 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_deserializeOpErrorListMFADeviceTags(response, &metadata) + } + output := &ListMFADeviceTagsOutput{} + 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("ListMFADeviceTagsResult") + 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_deserializeOpDocumentListMFADeviceTagsOutput(&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_deserializeOpErrorListMFADeviceTags(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListOpenIDConnectProviders struct { +} + +func (*awsAwsquery_deserializeOpListOpenIDConnectProviders) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListOpenIDConnectProviders) 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 + } + + 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_deserializeOpErrorListOpenIDConnectProviders(response, &metadata) + } + output := &ListOpenIDConnectProvidersOutput{} + 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("ListOpenIDConnectProvidersResult") + 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_deserializeOpDocumentListOpenIDConnectProvidersOutput(&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_deserializeOpErrorListOpenIDConnectProviders(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListOpenIDConnectProviderTags struct { +} + +func (*awsAwsquery_deserializeOpListOpenIDConnectProviderTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListOpenIDConnectProviderTags) 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 + } + + 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_deserializeOpErrorListOpenIDConnectProviderTags(response, &metadata) + } + output := &ListOpenIDConnectProviderTagsOutput{} + 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("ListOpenIDConnectProviderTagsResult") + 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_deserializeOpDocumentListOpenIDConnectProviderTagsOutput(&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_deserializeOpErrorListOpenIDConnectProviderTags(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListPolicies struct { +} + +func (*awsAwsquery_deserializeOpListPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListPolicies) 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 + } + + 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_deserializeOpErrorListPolicies(response, &metadata) + } + output := &ListPoliciesOutput{} + 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("ListPoliciesResult") + 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_deserializeOpDocumentListPoliciesOutput(&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_deserializeOpErrorListPolicies(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListPoliciesGrantingServiceAccess struct { +} + +func (*awsAwsquery_deserializeOpListPoliciesGrantingServiceAccess) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListPoliciesGrantingServiceAccess) 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 + } + + 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_deserializeOpErrorListPoliciesGrantingServiceAccess(response, &metadata) + } + output := &ListPoliciesGrantingServiceAccessOutput{} + 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("ListPoliciesGrantingServiceAccessResult") + 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_deserializeOpDocumentListPoliciesGrantingServiceAccessOutput(&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_deserializeOpErrorListPoliciesGrantingServiceAccess(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListPolicyTags struct { +} + +func (*awsAwsquery_deserializeOpListPolicyTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListPolicyTags) 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 + } + + 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_deserializeOpErrorListPolicyTags(response, &metadata) + } + output := &ListPolicyTagsOutput{} + 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("ListPolicyTagsResult") + 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_deserializeOpDocumentListPolicyTagsOutput(&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_deserializeOpErrorListPolicyTags(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListPolicyVersions struct { +} + +func (*awsAwsquery_deserializeOpListPolicyVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListPolicyVersions) 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 + } + + 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_deserializeOpErrorListPolicyVersions(response, &metadata) + } + output := &ListPolicyVersionsOutput{} + 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("ListPolicyVersionsResult") + 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_deserializeOpDocumentListPolicyVersionsOutput(&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_deserializeOpErrorListPolicyVersions(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListRolePolicies struct { +} + +func (*awsAwsquery_deserializeOpListRolePolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListRolePolicies) 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 + } + + 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_deserializeOpErrorListRolePolicies(response, &metadata) + } + output := &ListRolePoliciesOutput{} + 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("ListRolePoliciesResult") + 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_deserializeOpDocumentListRolePoliciesOutput(&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_deserializeOpErrorListRolePolicies(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListRoles struct { +} + +func (*awsAwsquery_deserializeOpListRoles) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListRoles) 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 + } + + 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_deserializeOpErrorListRoles(response, &metadata) + } + output := &ListRolesOutput{} + 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("ListRolesResult") + 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_deserializeOpDocumentListRolesOutput(&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_deserializeOpErrorListRoles(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListRoleTags struct { +} + +func (*awsAwsquery_deserializeOpListRoleTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListRoleTags) 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 + } + + 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_deserializeOpErrorListRoleTags(response, &metadata) + } + output := &ListRoleTagsOutput{} + 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("ListRoleTagsResult") + 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_deserializeOpDocumentListRoleTagsOutput(&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_deserializeOpErrorListRoleTags(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListSAMLProviders struct { +} + +func (*awsAwsquery_deserializeOpListSAMLProviders) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListSAMLProviders) 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 + } + + 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_deserializeOpErrorListSAMLProviders(response, &metadata) + } + output := &ListSAMLProvidersOutput{} + 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("ListSAMLProvidersResult") + 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_deserializeOpDocumentListSAMLProvidersOutput(&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_deserializeOpErrorListSAMLProviders(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListSAMLProviderTags struct { +} + +func (*awsAwsquery_deserializeOpListSAMLProviderTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListSAMLProviderTags) 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 + } + + 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_deserializeOpErrorListSAMLProviderTags(response, &metadata) + } + output := &ListSAMLProviderTagsOutput{} + 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("ListSAMLProviderTagsResult") + 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_deserializeOpDocumentListSAMLProviderTagsOutput(&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_deserializeOpErrorListSAMLProviderTags(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListServerCertificates struct { +} + +func (*awsAwsquery_deserializeOpListServerCertificates) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListServerCertificates) 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 + } + + 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_deserializeOpErrorListServerCertificates(response, &metadata) + } + output := &ListServerCertificatesOutput{} + 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("ListServerCertificatesResult") + 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_deserializeOpDocumentListServerCertificatesOutput(&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_deserializeOpErrorListServerCertificates(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListServerCertificateTags struct { +} + +func (*awsAwsquery_deserializeOpListServerCertificateTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListServerCertificateTags) 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 + } + + 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_deserializeOpErrorListServerCertificateTags(response, &metadata) + } + output := &ListServerCertificateTagsOutput{} + 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("ListServerCertificateTagsResult") + 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_deserializeOpDocumentListServerCertificateTagsOutput(&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_deserializeOpErrorListServerCertificateTags(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListServiceSpecificCredentials struct { +} + +func (*awsAwsquery_deserializeOpListServiceSpecificCredentials) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListServiceSpecificCredentials) 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 + } + + 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_deserializeOpErrorListServiceSpecificCredentials(response, &metadata) + } + output := &ListServiceSpecificCredentialsOutput{} + 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("ListServiceSpecificCredentialsResult") + 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_deserializeOpDocumentListServiceSpecificCredentialsOutput(&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_deserializeOpErrorListServiceSpecificCredentials(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("NotSupportedService", errorCode): + return awsAwsquery_deserializeErrorServiceNotSupportedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListSigningCertificates struct { +} + +func (*awsAwsquery_deserializeOpListSigningCertificates) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListSigningCertificates) 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 + } + + 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_deserializeOpErrorListSigningCertificates(response, &metadata) + } + output := &ListSigningCertificatesOutput{} + 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("ListSigningCertificatesResult") + 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_deserializeOpDocumentListSigningCertificatesOutput(&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_deserializeOpErrorListSigningCertificates(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListSSHPublicKeys struct { +} + +func (*awsAwsquery_deserializeOpListSSHPublicKeys) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListSSHPublicKeys) 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 + } + + 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_deserializeOpErrorListSSHPublicKeys(response, &metadata) + } + output := &ListSSHPublicKeysOutput{} + 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("ListSSHPublicKeysResult") + 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_deserializeOpDocumentListSSHPublicKeysOutput(&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_deserializeOpErrorListSSHPublicKeys(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListUserPolicies struct { +} + +func (*awsAwsquery_deserializeOpListUserPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListUserPolicies) 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 + } + + 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_deserializeOpErrorListUserPolicies(response, &metadata) + } + output := &ListUserPoliciesOutput{} + 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("ListUserPoliciesResult") + 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_deserializeOpDocumentListUserPoliciesOutput(&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_deserializeOpErrorListUserPolicies(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListUsers struct { +} + +func (*awsAwsquery_deserializeOpListUsers) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListUsers) 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 + } + + 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_deserializeOpErrorListUsers(response, &metadata) + } + output := &ListUsersOutput{} + 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("ListUsersResult") + 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_deserializeOpDocumentListUsersOutput(&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_deserializeOpErrorListUsers(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListUserTags struct { +} + +func (*awsAwsquery_deserializeOpListUserTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListUserTags) 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 + } + + 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_deserializeOpErrorListUserTags(response, &metadata) + } + output := &ListUserTagsOutput{} + 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("ListUserTagsResult") + 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_deserializeOpDocumentListUserTagsOutput(&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_deserializeOpErrorListUserTags(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpListVirtualMFADevices struct { +} + +func (*awsAwsquery_deserializeOpListVirtualMFADevices) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListVirtualMFADevices) 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 + } + + 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_deserializeOpErrorListVirtualMFADevices(response, &metadata) + } + output := &ListVirtualMFADevicesOutput{} + 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("ListVirtualMFADevicesResult") + 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_deserializeOpDocumentListVirtualMFADevicesOutput(&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_deserializeOpErrorListVirtualMFADevices(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 { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpPutGroupPolicy struct { +} + +func (*awsAwsquery_deserializeOpPutGroupPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpPutGroupPolicy) 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 + } + + 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_deserializeOpErrorPutGroupPolicy(response, &metadata) + } + output := &PutGroupPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorPutGroupPolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocument", errorCode): + return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpPutRolePermissionsBoundary struct { +} + +func (*awsAwsquery_deserializeOpPutRolePermissionsBoundary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpPutRolePermissionsBoundary) 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 + } + + 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_deserializeOpErrorPutRolePermissionsBoundary(response, &metadata) + } + output := &PutRolePermissionsBoundaryOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorPutRolePermissionsBoundary(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PolicyNotAttachable", errorCode): + return awsAwsquery_deserializeErrorPolicyNotAttachableException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpPutRolePolicy struct { +} + +func (*awsAwsquery_deserializeOpPutRolePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpPutRolePolicy) 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 + } + + 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_deserializeOpErrorPutRolePolicy(response, &metadata) + } + output := &PutRolePolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorPutRolePolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocument", errorCode): + return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpPutUserPermissionsBoundary struct { +} + +func (*awsAwsquery_deserializeOpPutUserPermissionsBoundary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpPutUserPermissionsBoundary) 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 + } + + 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_deserializeOpErrorPutUserPermissionsBoundary(response, &metadata) + } + output := &PutUserPermissionsBoundaryOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorPutUserPermissionsBoundary(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PolicyNotAttachable", errorCode): + return awsAwsquery_deserializeErrorPolicyNotAttachableException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpPutUserPolicy struct { +} + +func (*awsAwsquery_deserializeOpPutUserPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpPutUserPolicy) 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 + } + + 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_deserializeOpErrorPutUserPolicy(response, &metadata) + } + output := &PutUserPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorPutUserPolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocument", errorCode): + return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpRemoveClientIDFromOpenIDConnectProvider struct { +} + +func (*awsAwsquery_deserializeOpRemoveClientIDFromOpenIDConnectProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpRemoveClientIDFromOpenIDConnectProvider) 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 + } + + 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_deserializeOpErrorRemoveClientIDFromOpenIDConnectProvider(response, &metadata) + } + output := &RemoveClientIDFromOpenIDConnectProviderOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorRemoveClientIDFromOpenIDConnectProvider(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpRemoveRoleFromInstanceProfile struct { +} + +func (*awsAwsquery_deserializeOpRemoveRoleFromInstanceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpRemoveRoleFromInstanceProfile) 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 + } + + 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_deserializeOpErrorRemoveRoleFromInstanceProfile(response, &metadata) + } + output := &RemoveRoleFromInstanceProfileOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorRemoveRoleFromInstanceProfile(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpRemoveUserFromGroup struct { +} + +func (*awsAwsquery_deserializeOpRemoveUserFromGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpRemoveUserFromGroup) 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 + } + + 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_deserializeOpErrorRemoveUserFromGroup(response, &metadata) + } + output := &RemoveUserFromGroupOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorRemoveUserFromGroup(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpResetServiceSpecificCredential struct { +} + +func (*awsAwsquery_deserializeOpResetServiceSpecificCredential) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpResetServiceSpecificCredential) 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 + } + + 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_deserializeOpErrorResetServiceSpecificCredential(response, &metadata) + } + output := &ResetServiceSpecificCredentialOutput{} + 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("ResetServiceSpecificCredentialResult") + 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_deserializeOpDocumentResetServiceSpecificCredentialOutput(&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_deserializeOpErrorResetServiceSpecificCredential(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpResyncMFADevice struct { +} + +func (*awsAwsquery_deserializeOpResyncMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpResyncMFADevice) 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 + } + + 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_deserializeOpErrorResyncMFADevice(response, &metadata) + } + output := &ResyncMFADeviceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorResyncMFADevice(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidAuthenticationCode", errorCode): + return awsAwsquery_deserializeErrorInvalidAuthenticationCodeException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpSetDefaultPolicyVersion struct { +} + +func (*awsAwsquery_deserializeOpSetDefaultPolicyVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpSetDefaultPolicyVersion) 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 + } + + 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_deserializeOpErrorSetDefaultPolicyVersion(response, &metadata) + } + output := &SetDefaultPolicyVersionOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorSetDefaultPolicyVersion(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpSetSecurityTokenServicePreferences struct { +} + +func (*awsAwsquery_deserializeOpSetSecurityTokenServicePreferences) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpSetSecurityTokenServicePreferences) 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 + } + + 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_deserializeOpErrorSetSecurityTokenServicePreferences(response, &metadata) + } + output := &SetSecurityTokenServicePreferencesOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorSetSecurityTokenServicePreferences(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("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpSimulateCustomPolicy struct { +} + +func (*awsAwsquery_deserializeOpSimulateCustomPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpSimulateCustomPolicy) 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 + } + + 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_deserializeOpErrorSimulateCustomPolicy(response, &metadata) + } + output := &SimulateCustomPolicyOutput{} + 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("SimulateCustomPolicyResult") + 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_deserializeOpDocumentSimulateCustomPolicyOutput(&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_deserializeOpErrorSimulateCustomPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("PolicyEvaluation", errorCode): + return awsAwsquery_deserializeErrorPolicyEvaluationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpSimulatePrincipalPolicy struct { +} + +func (*awsAwsquery_deserializeOpSimulatePrincipalPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpSimulatePrincipalPolicy) 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 + } + + 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_deserializeOpErrorSimulatePrincipalPolicy(response, &metadata) + } + output := &SimulatePrincipalPolicyOutput{} + 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("SimulatePrincipalPolicyResult") + 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_deserializeOpDocumentSimulatePrincipalPolicyOutput(&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_deserializeOpErrorSimulatePrincipalPolicy(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PolicyEvaluation", errorCode): + return awsAwsquery_deserializeErrorPolicyEvaluationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpTagInstanceProfile struct { +} + +func (*awsAwsquery_deserializeOpTagInstanceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpTagInstanceProfile) 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 + } + + 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_deserializeOpErrorTagInstanceProfile(response, &metadata) + } + output := &TagInstanceProfileOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorTagInstanceProfile(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpTagMFADevice struct { +} + +func (*awsAwsquery_deserializeOpTagMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpTagMFADevice) 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 + } + + 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_deserializeOpErrorTagMFADevice(response, &metadata) + } + output := &TagMFADeviceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorTagMFADevice(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpTagOpenIDConnectProvider struct { +} + +func (*awsAwsquery_deserializeOpTagOpenIDConnectProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpTagOpenIDConnectProvider) 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 + } + + 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_deserializeOpErrorTagOpenIDConnectProvider(response, &metadata) + } + output := &TagOpenIDConnectProviderOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorTagOpenIDConnectProvider(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpTagPolicy struct { +} + +func (*awsAwsquery_deserializeOpTagPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpTagPolicy) 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 + } + + 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_deserializeOpErrorTagPolicy(response, &metadata) + } + output := &TagPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorTagPolicy(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpTagRole struct { +} + +func (*awsAwsquery_deserializeOpTagRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpTagRole) 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 + } + + 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_deserializeOpErrorTagRole(response, &metadata) + } + output := &TagRoleOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorTagRole(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpTagSAMLProvider struct { +} + +func (*awsAwsquery_deserializeOpTagSAMLProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpTagSAMLProvider) 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 + } + + 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_deserializeOpErrorTagSAMLProvider(response, &metadata) + } + output := &TagSAMLProviderOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorTagSAMLProvider(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpTagServerCertificate struct { +} + +func (*awsAwsquery_deserializeOpTagServerCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpTagServerCertificate) 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 + } + + 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_deserializeOpErrorTagServerCertificate(response, &metadata) + } + output := &TagServerCertificateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorTagServerCertificate(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpTagUser struct { +} + +func (*awsAwsquery_deserializeOpTagUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpTagUser) 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 + } + + 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_deserializeOpErrorTagUser(response, &metadata) + } + output := &TagUserOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorTagUser(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUntagInstanceProfile struct { +} + +func (*awsAwsquery_deserializeOpUntagInstanceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUntagInstanceProfile) 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 + } + + 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_deserializeOpErrorUntagInstanceProfile(response, &metadata) + } + output := &UntagInstanceProfileOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUntagInstanceProfile(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUntagMFADevice struct { +} + +func (*awsAwsquery_deserializeOpUntagMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUntagMFADevice) 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 + } + + 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_deserializeOpErrorUntagMFADevice(response, &metadata) + } + output := &UntagMFADeviceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUntagMFADevice(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUntagOpenIDConnectProvider struct { +} + +func (*awsAwsquery_deserializeOpUntagOpenIDConnectProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUntagOpenIDConnectProvider) 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 + } + + 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_deserializeOpErrorUntagOpenIDConnectProvider(response, &metadata) + } + output := &UntagOpenIDConnectProviderOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUntagOpenIDConnectProvider(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUntagPolicy struct { +} + +func (*awsAwsquery_deserializeOpUntagPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUntagPolicy) 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 + } + + 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_deserializeOpErrorUntagPolicy(response, &metadata) + } + output := &UntagPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUntagPolicy(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUntagRole struct { +} + +func (*awsAwsquery_deserializeOpUntagRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUntagRole) 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 + } + + 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_deserializeOpErrorUntagRole(response, &metadata) + } + output := &UntagRoleOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUntagRole(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUntagSAMLProvider struct { +} + +func (*awsAwsquery_deserializeOpUntagSAMLProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUntagSAMLProvider) 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 + } + + 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_deserializeOpErrorUntagSAMLProvider(response, &metadata) + } + output := &UntagSAMLProviderOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUntagSAMLProvider(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUntagServerCertificate struct { +} + +func (*awsAwsquery_deserializeOpUntagServerCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUntagServerCertificate) 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 + } + + 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_deserializeOpErrorUntagServerCertificate(response, &metadata) + } + output := &UntagServerCertificateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUntagServerCertificate(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUntagUser struct { +} + +func (*awsAwsquery_deserializeOpUntagUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUntagUser) 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 + } + + 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_deserializeOpErrorUntagUser(response, &metadata) + } + output := &UntagUserOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUntagUser(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateAccessKey struct { +} + +func (*awsAwsquery_deserializeOpUpdateAccessKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateAccessKey) 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 + } + + 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_deserializeOpErrorUpdateAccessKey(response, &metadata) + } + output := &UpdateAccessKeyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateAccessKey(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateAccountPasswordPolicy struct { +} + +func (*awsAwsquery_deserializeOpUpdateAccountPasswordPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateAccountPasswordPolicy) 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 + } + + 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_deserializeOpErrorUpdateAccountPasswordPolicy(response, &metadata) + } + output := &UpdateAccountPasswordPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateAccountPasswordPolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocument", errorCode): + return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateAssumeRolePolicy struct { +} + +func (*awsAwsquery_deserializeOpUpdateAssumeRolePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateAssumeRolePolicy) 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 + } + + 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_deserializeOpErrorUpdateAssumeRolePolicy(response, &metadata) + } + output := &UpdateAssumeRolePolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateAssumeRolePolicy(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedPolicyDocument", errorCode): + return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateGroup struct { +} + +func (*awsAwsquery_deserializeOpUpdateGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateGroup) 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 + } + + 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_deserializeOpErrorUpdateGroup(response, &metadata) + } + output := &UpdateGroupOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateGroup(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("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateLoginProfile struct { +} + +func (*awsAwsquery_deserializeOpUpdateLoginProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateLoginProfile) 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 + } + + 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_deserializeOpErrorUpdateLoginProfile(response, &metadata) + } + output := &UpdateLoginProfileOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateLoginProfile(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("EntityTemporarilyUnmodifiable", errorCode): + return awsAwsquery_deserializeErrorEntityTemporarilyUnmodifiableException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("PasswordPolicyViolation", errorCode): + return awsAwsquery_deserializeErrorPasswordPolicyViolationException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateOpenIDConnectProviderThumbprint struct { +} + +func (*awsAwsquery_deserializeOpUpdateOpenIDConnectProviderThumbprint) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateOpenIDConnectProviderThumbprint) 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 + } + + 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_deserializeOpErrorUpdateOpenIDConnectProviderThumbprint(response, &metadata) + } + output := &UpdateOpenIDConnectProviderThumbprintOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateOpenIDConnectProviderThumbprint(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateRole struct { +} + +func (*awsAwsquery_deserializeOpUpdateRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateRole) 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 + } + + 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_deserializeOpErrorUpdateRole(response, &metadata) + } + output := &UpdateRoleOutput{} + 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("UpdateRoleResult") + 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_deserializeOpDocumentUpdateRoleOutput(&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_deserializeOpErrorUpdateRole(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateRoleDescription struct { +} + +func (*awsAwsquery_deserializeOpUpdateRoleDescription) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateRoleDescription) 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 + } + + 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_deserializeOpErrorUpdateRoleDescription(response, &metadata) + } + output := &UpdateRoleDescriptionOutput{} + 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("UpdateRoleDescriptionResult") + 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_deserializeOpDocumentUpdateRoleDescriptionOutput(&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_deserializeOpErrorUpdateRoleDescription(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("UnmodifiableEntity", errorCode): + return awsAwsquery_deserializeErrorUnmodifiableEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateSAMLProvider struct { +} + +func (*awsAwsquery_deserializeOpUpdateSAMLProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateSAMLProvider) 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 + } + + 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_deserializeOpErrorUpdateSAMLProvider(response, &metadata) + } + output := &UpdateSAMLProviderOutput{} + 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("UpdateSAMLProviderResult") + 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_deserializeOpDocumentUpdateSAMLProviderOutput(&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_deserializeOpErrorUpdateSAMLProvider(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("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateServerCertificate struct { +} + +func (*awsAwsquery_deserializeOpUpdateServerCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateServerCertificate) 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 + } + + 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_deserializeOpErrorUpdateServerCertificate(response, &metadata) + } + output := &UpdateServerCertificateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateServerCertificate(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("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateServiceSpecificCredential struct { +} + +func (*awsAwsquery_deserializeOpUpdateServiceSpecificCredential) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateServiceSpecificCredential) 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 + } + + 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_deserializeOpErrorUpdateServiceSpecificCredential(response, &metadata) + } + output := &UpdateServiceSpecificCredentialOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateServiceSpecificCredential(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateSigningCertificate struct { +} + +func (*awsAwsquery_deserializeOpUpdateSigningCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateSigningCertificate) 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 + } + + 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_deserializeOpErrorUpdateSigningCertificate(response, &metadata) + } + output := &UpdateSigningCertificateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateSigningCertificate(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("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateSSHPublicKey struct { +} + +func (*awsAwsquery_deserializeOpUpdateSSHPublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateSSHPublicKey) 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 + } + + 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_deserializeOpErrorUpdateSSHPublicKey(response, &metadata) + } + output := &UpdateSSHPublicKeyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateSSHPublicKey(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("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUpdateUser struct { +} + +func (*awsAwsquery_deserializeOpUpdateUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUpdateUser) 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 + } + + 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_deserializeOpErrorUpdateUser(response, &metadata) + } + output := &UpdateUserOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorUpdateUser(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("EntityTemporarilyUnmodifiable", errorCode): + return awsAwsquery_deserializeErrorEntityTemporarilyUnmodifiableException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUploadServerCertificate struct { +} + +func (*awsAwsquery_deserializeOpUploadServerCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUploadServerCertificate) 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 + } + + 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_deserializeOpErrorUploadServerCertificate(response, &metadata) + } + output := &UploadServerCertificateOutput{} + 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("UploadServerCertificateResult") + 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_deserializeOpDocumentUploadServerCertificateOutput(&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_deserializeOpErrorUploadServerCertificate(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsAwsquery_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("KeyPairMismatch", errorCode): + return awsAwsquery_deserializeErrorKeyPairMismatchException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedCertificate", errorCode): + return awsAwsquery_deserializeErrorMalformedCertificateException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUploadSigningCertificate struct { +} + +func (*awsAwsquery_deserializeOpUploadSigningCertificate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUploadSigningCertificate) 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 + } + + 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_deserializeOpErrorUploadSigningCertificate(response, &metadata) + } + output := &UploadSigningCertificateOutput{} + 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("UploadSigningCertificateResult") + 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_deserializeOpDocumentUploadSigningCertificateOutput(&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_deserializeOpErrorUploadSigningCertificate(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("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("DuplicateCertificate", errorCode): + return awsAwsquery_deserializeErrorDuplicateCertificateException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InvalidCertificate", errorCode): + return awsAwsquery_deserializeErrorInvalidCertificateException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedCertificate", errorCode): + return awsAwsquery_deserializeErrorMalformedCertificateException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpUploadSSHPublicKey struct { +} + +func (*awsAwsquery_deserializeOpUploadSSHPublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpUploadSSHPublicKey) 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 + } + + 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_deserializeOpErrorUploadSSHPublicKey(response, &metadata) + } + output := &UploadSSHPublicKeyOutput{} + 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("UploadSSHPublicKeyResult") + 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_deserializeOpDocumentUploadSSHPublicKeyOutput(&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_deserializeOpErrorUploadSSHPublicKey(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("DuplicateSSHPublicKey", errorCode): + return awsAwsquery_deserializeErrorDuplicateSSHPublicKeyException(response, errorBody) + + case strings.EqualFold("InvalidPublicKey", errorCode): + return awsAwsquery_deserializeErrorInvalidPublicKeyException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("UnrecognizedPublicKeyEncoding", errorCode): + return awsAwsquery_deserializeErrorUnrecognizedPublicKeyEncodingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsquery_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConcurrentModificationException{} + 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_deserializeDocumentConcurrentModificationException(&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_deserializeErrorCredentialReportExpiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CredentialReportExpiredException{} + 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_deserializeDocumentCredentialReportExpiredException(&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_deserializeErrorCredentialReportNotPresentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CredentialReportNotPresentException{} + 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_deserializeDocumentCredentialReportNotPresentException(&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_deserializeErrorCredentialReportNotReadyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CredentialReportNotReadyException{} + 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_deserializeDocumentCredentialReportNotReadyException(&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_deserializeErrorDeleteConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DeleteConflictException{} + 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_deserializeDocumentDeleteConflictException(&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_deserializeErrorDuplicateCertificateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DuplicateCertificateException{} + 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_deserializeDocumentDuplicateCertificateException(&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_deserializeErrorDuplicateSSHPublicKeyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DuplicateSSHPublicKeyException{} + 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_deserializeDocumentDuplicateSSHPublicKeyException(&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_deserializeErrorEntityAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntityAlreadyExistsException{} + 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_deserializeDocumentEntityAlreadyExistsException(&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_deserializeErrorEntityTemporarilyUnmodifiableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntityTemporarilyUnmodifiableException{} + 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_deserializeDocumentEntityTemporarilyUnmodifiableException(&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_deserializeErrorInvalidAuthenticationCodeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidAuthenticationCodeException{} + 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_deserializeDocumentInvalidAuthenticationCodeException(&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_deserializeErrorInvalidCertificateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidCertificateException{} + 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_deserializeDocumentInvalidCertificateException(&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_deserializeErrorInvalidInputException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidInputException{} + 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_deserializeDocumentInvalidInputException(&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_deserializeErrorInvalidPublicKeyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidPublicKeyException{} + 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_deserializeDocumentInvalidPublicKeyException(&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_deserializeErrorInvalidUserTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidUserTypeException{} + 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_deserializeDocumentInvalidUserTypeException(&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_deserializeErrorKeyPairMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KeyPairMismatchException{} + 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_deserializeDocumentKeyPairMismatchException(&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_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LimitExceededException{} + 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_deserializeDocumentLimitExceededException(&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_deserializeErrorMalformedCertificateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MalformedCertificateException{} + 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_deserializeDocumentMalformedCertificateException(&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 + 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_deserializeDocumentMalformedPolicyDocumentException(&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_deserializeErrorNoSuchEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchEntityException{} + 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_deserializeDocumentNoSuchEntityException(&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_deserializeErrorPasswordPolicyViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PasswordPolicyViolationException{} + 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_deserializeDocumentPasswordPolicyViolationException(&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_deserializeErrorPolicyEvaluationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PolicyEvaluationException{} + 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_deserializeDocumentPolicyEvaluationException(&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_deserializeErrorPolicyNotAttachableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PolicyNotAttachableException{} + 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_deserializeDocumentPolicyNotAttachableException(&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_deserializeErrorReportGenerationLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ReportGenerationLimitExceededException{} + 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_deserializeDocumentReportGenerationLimitExceededException(&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_deserializeErrorServiceFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceFailureException{} + 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_deserializeDocumentServiceFailureException(&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_deserializeErrorServiceNotSupportedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceNotSupportedException{} + 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_deserializeDocumentServiceNotSupportedException(&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_deserializeErrorUnmodifiableEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnmodifiableEntityException{} + 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_deserializeDocumentUnmodifiableEntityException(&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_deserializeErrorUnrecognizedPublicKeyEncodingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnrecognizedPublicKeyEncodingException{} + 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_deserializeDocumentUnrecognizedPublicKeyEncodingException(&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_deserializeDocumentAccessDetail(v **types.AccessDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AccessDetail + if *v == nil { + sv = &types.AccessDetail{} + } 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("EntityPath", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EntityPath = ptr.String(xtv) + } + + case strings.EqualFold("LastAuthenticatedTime", 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.LastAuthenticatedTime = ptr.Time(t) + } + + case strings.EqualFold("Region", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Region = ptr.String(xtv) + } + + case strings.EqualFold("ServiceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceName = ptr.String(xtv) + } + + case strings.EqualFold("ServiceNamespace", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceNamespace = ptr.String(xtv) + } + + case strings.EqualFold("TotalAuthenticatedEntities", 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.TotalAuthenticatedEntities = 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_deserializeDocumentAccessDetails(v *[]types.AccessDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.AccessDetail + if *v == nil { + sv = make([]types.AccessDetail, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.AccessDetail + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentAccessDetail(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentAccessDetailsUnwrapped(v *[]types.AccessDetail, decoder smithyxml.NodeDecoder) error { + var sv []types.AccessDetail + if *v == nil { + sv = make([]types.AccessDetail, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.AccessDetail + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentAccessDetail(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentAccessKey(v **types.AccessKey, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AccessKey + if *v == nil { + sv = &types.AccessKey{} + } 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("AccessKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AccessKeyId = ptr.String(xtv) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("SecretAccessKey", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SecretAccessKey = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.StatusType(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentAccessKeyLastUsed(v **types.AccessKeyLastUsed, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AccessKeyLastUsed + if *v == nil { + sv = &types.AccessKeyLastUsed{} + } 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("LastUsedDate", 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.LastUsedDate = ptr.Time(t) + } + + case strings.EqualFold("Region", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Region = ptr.String(xtv) + } + + case strings.EqualFold("ServiceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceName = 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_deserializeDocumentAccessKeyMetadata(v **types.AccessKeyMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AccessKeyMetadata + if *v == nil { + sv = &types.AccessKeyMetadata{} + } 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("AccessKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AccessKeyId = ptr.String(xtv) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.StatusType(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentAccessKeyMetadataListType(v *[]types.AccessKeyMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.AccessKeyMetadata + if *v == nil { + sv = make([]types.AccessKeyMetadata, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.AccessKeyMetadata + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentAccessKeyMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentAccessKeyMetadataListTypeUnwrapped(v *[]types.AccessKeyMetadata, decoder smithyxml.NodeDecoder) error { + var sv []types.AccessKeyMetadata + if *v == nil { + sv = make([]types.AccessKeyMetadata, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.AccessKeyMetadata + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentAccessKeyMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentAccountAliasListType(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentAccountAliasListTypeUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentArnListType(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentArnListTypeUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentAttachedPermissionsBoundary(v **types.AttachedPermissionsBoundary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AttachedPermissionsBoundary + if *v == nil { + sv = &types.AttachedPermissionsBoundary{} + } 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("PermissionsBoundaryArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PermissionsBoundaryArn = ptr.String(xtv) + } + + case strings.EqualFold("PermissionsBoundaryType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PermissionsBoundaryType = types.PermissionsBoundaryAttachmentType(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_deserializeDocumentAttachedPoliciesListType(v *[]types.AttachedPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.AttachedPolicy + if *v == nil { + sv = make([]types.AttachedPolicy, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.AttachedPolicy + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentAttachedPolicy(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentAttachedPoliciesListTypeUnwrapped(v *[]types.AttachedPolicy, decoder smithyxml.NodeDecoder) error { + var sv []types.AttachedPolicy + if *v == nil { + sv = make([]types.AttachedPolicy, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.AttachedPolicy + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentAttachedPolicy(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentAttachedPolicy(v **types.AttachedPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AttachedPolicy + if *v == nil { + sv = &types.AttachedPolicy{} + } 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("PolicyArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyArn = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = 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_deserializeDocumentCertificateListType(v *[]types.SigningCertificate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.SigningCertificate + if *v == nil { + sv = make([]types.SigningCertificate, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.SigningCertificate + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentSigningCertificate(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCertificateListTypeUnwrapped(v *[]types.SigningCertificate, decoder smithyxml.NodeDecoder) error { + var sv []types.SigningCertificate + if *v == nil { + sv = make([]types.SigningCertificate, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.SigningCertificate + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentSigningCertificate(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentCertificationMapType(v *map[string]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv map[string]string + if *v == nil { + sv = make(map[string]string, 0) + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("entry", t.Name.Local): + entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCertificationMapTypeUnwrapped(&sv, entryDecoder); err != nil { + return err + } + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentCertificationMapTypeUnwrapped(v *map[string]string, decoder smithyxml.NodeDecoder) error { + var sv map[string]string + if *v == nil { + sv = make(map[string]string, 0) + } else { + sv = *v + } + + var ek string + var ev string + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + sv[ek] = ev + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("key", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + ek = xtv + } + + case strings.EqualFold("value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + ev = xtv + } + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentClientIDListType(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentClientIDListTypeUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentConcurrentModificationException(v **types.ConcurrentModificationException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ConcurrentModificationException + if *v == nil { + sv = &types.ConcurrentModificationException{} + } 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_deserializeDocumentContextKeyNamesResultListType(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentContextKeyNamesResultListTypeUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentCredentialReportExpiredException(v **types.CredentialReportExpiredException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CredentialReportExpiredException + if *v == nil { + sv = &types.CredentialReportExpiredException{} + } 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_deserializeDocumentCredentialReportNotPresentException(v **types.CredentialReportNotPresentException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CredentialReportNotPresentException + if *v == nil { + sv = &types.CredentialReportNotPresentException{} + } 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_deserializeDocumentCredentialReportNotReadyException(v **types.CredentialReportNotReadyException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CredentialReportNotReadyException + if *v == nil { + sv = &types.CredentialReportNotReadyException{} + } 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_deserializeDocumentDeleteConflictException(v **types.DeleteConflictException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DeleteConflictException + if *v == nil { + sv = &types.DeleteConflictException{} + } 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_deserializeDocumentDeletionTaskFailureReasonType(v **types.DeletionTaskFailureReasonType, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DeletionTaskFailureReasonType + if *v == nil { + sv = &types.DeletionTaskFailureReasonType{} + } 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("Reason", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Reason = ptr.String(xtv) + } + + case strings.EqualFold("RoleUsageList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRoleUsageListType(&sv.RoleUsageList, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentDuplicateCertificateException(v **types.DuplicateCertificateException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DuplicateCertificateException + if *v == nil { + sv = &types.DuplicateCertificateException{} + } 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_deserializeDocumentDuplicateSSHPublicKeyException(v **types.DuplicateSSHPublicKeyException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DuplicateSSHPublicKeyException + if *v == nil { + sv = &types.DuplicateSSHPublicKeyException{} + } 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_deserializeDocumentEntityAlreadyExistsException(v **types.EntityAlreadyExistsException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EntityAlreadyExistsException + if *v == nil { + sv = &types.EntityAlreadyExistsException{} + } 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_deserializeDocumentEntityDetails(v **types.EntityDetails, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EntityDetails + if *v == nil { + sv = &types.EntityDetails{} + } 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("EntityInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentEntityInfo(&sv.EntityInfo, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("LastAuthenticated", 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.LastAuthenticated = ptr.Time(t) + } + + 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_deserializeDocumentEntityDetailsListType(v *[]types.EntityDetails, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.EntityDetails + if *v == nil { + sv = make([]types.EntityDetails, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.EntityDetails + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentEntityDetails(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentEntityDetailsListTypeUnwrapped(v *[]types.EntityDetails, decoder smithyxml.NodeDecoder) error { + var sv []types.EntityDetails + if *v == nil { + sv = make([]types.EntityDetails, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.EntityDetails + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentEntityDetails(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentEntityInfo(v **types.EntityInfo, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EntityInfo + if *v == nil { + sv = &types.EntityInfo{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.PolicyOwnerEntityType(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_deserializeDocumentEntityTemporarilyUnmodifiableException(v **types.EntityTemporarilyUnmodifiableException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EntityTemporarilyUnmodifiableException + if *v == nil { + sv = &types.EntityTemporarilyUnmodifiableException{} + } 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_deserializeDocumentErrorDetails(v **types.ErrorDetails, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ErrorDetails + if *v == nil { + sv = &types.ErrorDetails{} + } 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("Code", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Code = ptr.String(xtv) + } + + 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_deserializeDocumentEvalDecisionDetailsType(v *map[string]types.PolicyEvaluationDecisionType, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv map[string]types.PolicyEvaluationDecisionType + if *v == nil { + sv = make(map[string]types.PolicyEvaluationDecisionType, 0) + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("entry", t.Name.Local): + entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentEvalDecisionDetailsTypeUnwrapped(&sv, entryDecoder); err != nil { + return err + } + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentEvalDecisionDetailsTypeUnwrapped(v *map[string]types.PolicyEvaluationDecisionType, decoder smithyxml.NodeDecoder) error { + var sv map[string]types.PolicyEvaluationDecisionType + if *v == nil { + sv = make(map[string]types.PolicyEvaluationDecisionType, 0) + } else { + sv = *v + } + + var ek string + var ev types.PolicyEvaluationDecisionType + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + sv[ek] = ev + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("key", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + ek = xtv + } + + case strings.EqualFold("value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + ev = types.PolicyEvaluationDecisionType(xtv) + } + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentEvaluationResult(v **types.EvaluationResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EvaluationResult + if *v == nil { + sv = &types.EvaluationResult{} + } 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("EvalActionName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EvalActionName = ptr.String(xtv) + } + + case strings.EqualFold("EvalDecision", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EvalDecision = types.PolicyEvaluationDecisionType(xtv) + } + + case strings.EqualFold("EvalDecisionDetails", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentEvalDecisionDetailsType(&sv.EvalDecisionDetails, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("EvalResourceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EvalResourceName = ptr.String(xtv) + } + + case strings.EqualFold("MatchedStatements", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentStatementListType(&sv.MatchedStatements, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MissingContextValues", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentContextKeyNamesResultListType(&sv.MissingContextValues, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("OrganizationsDecisionDetail", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentOrganizationsDecisionDetail(&sv.OrganizationsDecisionDetail, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("PermissionsBoundaryDecisionDetail", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPermissionsBoundaryDecisionDetail(&sv.PermissionsBoundaryDecisionDetail, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ResourceSpecificResults", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentResourceSpecificResultListType(&sv.ResourceSpecificResults, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentEvaluationResultsListType(v *[]types.EvaluationResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.EvaluationResult + if *v == nil { + sv = make([]types.EvaluationResult, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.EvaluationResult + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentEvaluationResult(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentEvaluationResultsListTypeUnwrapped(v *[]types.EvaluationResult, decoder smithyxml.NodeDecoder) error { + var sv []types.EvaluationResult + if *v == nil { + sv = make([]types.EvaluationResult, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.EvaluationResult + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentEvaluationResult(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentGroup(v **types.Group, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Group + if *v == nil { + sv = &types.Group{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("GroupId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupId = ptr.String(xtv) + } + + case strings.EqualFold("GroupName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupName = ptr.String(xtv) + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = 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_deserializeDocumentGroupDetail(v **types.GroupDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.GroupDetail + if *v == nil { + sv = &types.GroupDetail{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("AttachedManagedPolicies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPoliciesListType(&sv.AttachedManagedPolicies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("GroupId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupId = ptr.String(xtv) + } + + case strings.EqualFold("GroupName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupName = ptr.String(xtv) + } + + case strings.EqualFold("GroupPolicyList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyDetailListType(&sv.GroupPolicyList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = 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_deserializeDocumentGroupDetailListType(v *[]types.GroupDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.GroupDetail + if *v == nil { + sv = make([]types.GroupDetail, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.GroupDetail + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentGroupDetail(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentGroupDetailListTypeUnwrapped(v *[]types.GroupDetail, decoder smithyxml.NodeDecoder) error { + var sv []types.GroupDetail + if *v == nil { + sv = make([]types.GroupDetail, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.GroupDetail + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentGroupDetail(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentGroupListType(v *[]types.Group, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Group + if *v == nil { + sv = make([]types.Group, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.Group + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentGroup(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentGroupListTypeUnwrapped(v *[]types.Group, decoder smithyxml.NodeDecoder) error { + var sv []types.Group + if *v == nil { + sv = make([]types.Group, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Group + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentGroup(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentGroupNameListType(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentGroupNameListTypeUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentInstanceProfile(v **types.InstanceProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InstanceProfile + if *v == nil { + sv = &types.InstanceProfile{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("InstanceProfileId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InstanceProfileId = ptr.String(xtv) + } + + case strings.EqualFold("InstanceProfileName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InstanceProfileName = ptr.String(xtv) + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("Roles", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRoleListType(&sv.Roles, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentInstanceProfileListType(v *[]types.InstanceProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.InstanceProfile + if *v == nil { + sv = make([]types.InstanceProfile, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.InstanceProfile + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentInstanceProfile(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentInstanceProfileListTypeUnwrapped(v *[]types.InstanceProfile, decoder smithyxml.NodeDecoder) error { + var sv []types.InstanceProfile + if *v == nil { + sv = make([]types.InstanceProfile, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.InstanceProfile + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentInstanceProfile(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentInvalidAuthenticationCodeException(v **types.InvalidAuthenticationCodeException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidAuthenticationCodeException + if *v == nil { + sv = &types.InvalidAuthenticationCodeException{} + } 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_deserializeDocumentInvalidCertificateException(v **types.InvalidCertificateException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidCertificateException + if *v == nil { + sv = &types.InvalidCertificateException{} + } 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_deserializeDocumentInvalidInputException(v **types.InvalidInputException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidInputException + if *v == nil { + sv = &types.InvalidInputException{} + } 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_deserializeDocumentInvalidPublicKeyException(v **types.InvalidPublicKeyException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidPublicKeyException + if *v == nil { + sv = &types.InvalidPublicKeyException{} + } 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_deserializeDocumentInvalidUserTypeException(v **types.InvalidUserTypeException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidUserTypeException + if *v == nil { + sv = &types.InvalidUserTypeException{} + } 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_deserializeDocumentKeyPairMismatchException(v **types.KeyPairMismatchException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyPairMismatchException + if *v == nil { + sv = &types.KeyPairMismatchException{} + } 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_deserializeDocumentLimitExceededException(v **types.LimitExceededException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LimitExceededException + if *v == nil { + sv = &types.LimitExceededException{} + } 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_deserializeDocumentListPoliciesGrantingServiceAccessEntry(v **types.ListPoliciesGrantingServiceAccessEntry, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ListPoliciesGrantingServiceAccessEntry + if *v == nil { + sv = &types.ListPoliciesGrantingServiceAccessEntry{} + } 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("Policies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyGrantingServiceAccessListType(&sv.Policies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ServiceNamespace", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceNamespace = 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_deserializeDocumentListPolicyGrantingServiceAccessResponseListType(v *[]types.ListPoliciesGrantingServiceAccessEntry, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ListPoliciesGrantingServiceAccessEntry + if *v == nil { + sv = make([]types.ListPoliciesGrantingServiceAccessEntry, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.ListPoliciesGrantingServiceAccessEntry + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentListPoliciesGrantingServiceAccessEntry(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentListPolicyGrantingServiceAccessResponseListTypeUnwrapped(v *[]types.ListPoliciesGrantingServiceAccessEntry, decoder smithyxml.NodeDecoder) error { + var sv []types.ListPoliciesGrantingServiceAccessEntry + if *v == nil { + sv = make([]types.ListPoliciesGrantingServiceAccessEntry, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ListPoliciesGrantingServiceAccessEntry + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentListPoliciesGrantingServiceAccessEntry(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentLoginProfile(v **types.LoginProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LoginProfile + if *v == nil { + sv = &types.LoginProfile{} + } 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("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("PasswordResetRequired", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.PasswordResetRequired = xtv + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentMalformedCertificateException(v **types.MalformedCertificateException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MalformedCertificateException + if *v == nil { + sv = &types.MalformedCertificateException{} + } 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) + } + var sv *types.MalformedPolicyDocumentException + if *v == nil { + sv = &types.MalformedPolicyDocumentException{} + } 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_deserializeDocumentManagedPolicyDetail(v **types.ManagedPolicyDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ManagedPolicyDetail + if *v == nil { + sv = &types.ManagedPolicyDetail{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("AttachmentCount", 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.AttachmentCount = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("DefaultVersionId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DefaultVersionId = ptr.String(xtv) + } + + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("IsAttachable", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsAttachable = xtv + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("PermissionsBoundaryUsageCount", 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.PermissionsBoundaryUsageCount = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("PolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyId = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = ptr.String(xtv) + } + + case strings.EqualFold("PolicyVersionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyDocumentVersionListType(&sv.PolicyVersionList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("UpdateDate", 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.UpdateDate = ptr.Time(t) + } + + 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_deserializeDocumentManagedPolicyDetailListType(v *[]types.ManagedPolicyDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ManagedPolicyDetail + if *v == nil { + sv = make([]types.ManagedPolicyDetail, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.ManagedPolicyDetail + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentManagedPolicyDetail(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentManagedPolicyDetailListTypeUnwrapped(v *[]types.ManagedPolicyDetail, decoder smithyxml.NodeDecoder) error { + var sv []types.ManagedPolicyDetail + if *v == nil { + sv = make([]types.ManagedPolicyDetail, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ManagedPolicyDetail + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentManagedPolicyDetail(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentMFADevice(v **types.MFADevice, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MFADevice + if *v == nil { + sv = &types.MFADevice{} + } 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("EnableDate", 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.EnableDate = ptr.Time(t) + } + + case strings.EqualFold("SerialNumber", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SerialNumber = ptr.String(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentMfaDeviceListType(v *[]types.MFADevice, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.MFADevice + if *v == nil { + sv = make([]types.MFADevice, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.MFADevice + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentMFADevice(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentMfaDeviceListTypeUnwrapped(v *[]types.MFADevice, decoder smithyxml.NodeDecoder) error { + var sv []types.MFADevice + if *v == nil { + sv = make([]types.MFADevice, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.MFADevice + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentMFADevice(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentNoSuchEntityException(v **types.NoSuchEntityException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchEntityException + if *v == nil { + sv = &types.NoSuchEntityException{} + } 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_deserializeDocumentOpenIDConnectProviderListEntry(v **types.OpenIDConnectProviderListEntry, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OpenIDConnectProviderListEntry + if *v == nil { + sv = &types.OpenIDConnectProviderListEntry{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = 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_deserializeDocumentOpenIDConnectProviderListType(v *[]types.OpenIDConnectProviderListEntry, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.OpenIDConnectProviderListEntry + if *v == nil { + sv = make([]types.OpenIDConnectProviderListEntry, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.OpenIDConnectProviderListEntry + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentOpenIDConnectProviderListEntry(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentOpenIDConnectProviderListTypeUnwrapped(v *[]types.OpenIDConnectProviderListEntry, decoder smithyxml.NodeDecoder) error { + var sv []types.OpenIDConnectProviderListEntry + if *v == nil { + sv = make([]types.OpenIDConnectProviderListEntry, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.OpenIDConnectProviderListEntry + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentOpenIDConnectProviderListEntry(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentOrganizationsDecisionDetail(v **types.OrganizationsDecisionDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OrganizationsDecisionDetail + if *v == nil { + sv = &types.OrganizationsDecisionDetail{} + } 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("AllowedByOrganizations", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.AllowedByOrganizations = 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_deserializeDocumentPasswordPolicy(v **types.PasswordPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PasswordPolicy + if *v == nil { + sv = &types.PasswordPolicy{} + } 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("AllowUsersToChangePassword", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.AllowUsersToChangePassword = xtv + } + + case strings.EqualFold("ExpirePasswords", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.ExpirePasswords = xtv + } + + case strings.EqualFold("HardExpiry", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanObjectType to be of type *bool, got %T instead", val) + } + sv.HardExpiry = ptr.Bool(xtv) + } + + case strings.EqualFold("MaxPasswordAge", 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.MaxPasswordAge = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("MinimumPasswordLength", 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.MinimumPasswordLength = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("PasswordReusePrevention", 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.PasswordReusePrevention = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("RequireLowercaseCharacters", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.RequireLowercaseCharacters = xtv + } + + case strings.EqualFold("RequireNumbers", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.RequireNumbers = xtv + } + + case strings.EqualFold("RequireSymbols", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.RequireSymbols = xtv + } + + case strings.EqualFold("RequireUppercaseCharacters", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.RequireUppercaseCharacters = 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_deserializeDocumentPasswordPolicyViolationException(v **types.PasswordPolicyViolationException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PasswordPolicyViolationException + if *v == nil { + sv = &types.PasswordPolicyViolationException{} + } 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_deserializeDocumentPermissionsBoundaryDecisionDetail(v **types.PermissionsBoundaryDecisionDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PermissionsBoundaryDecisionDetail + if *v == nil { + sv = &types.PermissionsBoundaryDecisionDetail{} + } 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("AllowedByPermissionsBoundary", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.AllowedByPermissionsBoundary = 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_deserializeDocumentPolicy(v **types.Policy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Policy + if *v == nil { + sv = &types.Policy{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("AttachmentCount", 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.AttachmentCount = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("DefaultVersionId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DefaultVersionId = ptr.String(xtv) + } + + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("IsAttachable", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsAttachable = xtv + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("PermissionsBoundaryUsageCount", 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.PermissionsBoundaryUsageCount = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("PolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyId = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("UpdateDate", 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.UpdateDate = ptr.Time(t) + } + + 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_deserializeDocumentPolicyDetail(v **types.PolicyDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PolicyDetail + if *v == nil { + sv = &types.PolicyDetail{} + } 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("PolicyDocument", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyDocument = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = 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_deserializeDocumentPolicyDetailListType(v *[]types.PolicyDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PolicyDetail + if *v == nil { + sv = make([]types.PolicyDetail, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.PolicyDetail + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentPolicyDetail(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPolicyDetailListTypeUnwrapped(v *[]types.PolicyDetail, decoder smithyxml.NodeDecoder) error { + var sv []types.PolicyDetail + if *v == nil { + sv = make([]types.PolicyDetail, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PolicyDetail + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentPolicyDetail(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentPolicyDocumentVersionListType(v *[]types.PolicyVersion, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PolicyVersion + if *v == nil { + sv = make([]types.PolicyVersion, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.PolicyVersion + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentPolicyVersion(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPolicyDocumentVersionListTypeUnwrapped(v *[]types.PolicyVersion, decoder smithyxml.NodeDecoder) error { + var sv []types.PolicyVersion + if *v == nil { + sv = make([]types.PolicyVersion, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PolicyVersion + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentPolicyVersion(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentPolicyEvaluationException(v **types.PolicyEvaluationException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PolicyEvaluationException + if *v == nil { + sv = &types.PolicyEvaluationException{} + } 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_deserializeDocumentPolicyGrantingServiceAccess(v **types.PolicyGrantingServiceAccess, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PolicyGrantingServiceAccess + if *v == nil { + sv = &types.PolicyGrantingServiceAccess{} + } 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("EntityName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EntityName = ptr.String(xtv) + } + + case strings.EqualFold("EntityType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EntityType = types.PolicyOwnerEntityType(xtv) + } + + case strings.EqualFold("PolicyArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyArn = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = ptr.String(xtv) + } + + case strings.EqualFold("PolicyType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyType = types.PolicyType(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_deserializeDocumentPolicyGrantingServiceAccessListType(v *[]types.PolicyGrantingServiceAccess, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PolicyGrantingServiceAccess + if *v == nil { + sv = make([]types.PolicyGrantingServiceAccess, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.PolicyGrantingServiceAccess + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentPolicyGrantingServiceAccess(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPolicyGrantingServiceAccessListTypeUnwrapped(v *[]types.PolicyGrantingServiceAccess, decoder smithyxml.NodeDecoder) error { + var sv []types.PolicyGrantingServiceAccess + if *v == nil { + sv = make([]types.PolicyGrantingServiceAccess, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PolicyGrantingServiceAccess + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentPolicyGrantingServiceAccess(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentPolicyGroup(v **types.PolicyGroup, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PolicyGroup + if *v == nil { + sv = &types.PolicyGroup{} + } 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("GroupId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupId = ptr.String(xtv) + } + + case strings.EqualFold("GroupName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupName = 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_deserializeDocumentPolicyGroupListType(v *[]types.PolicyGroup, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PolicyGroup + if *v == nil { + sv = make([]types.PolicyGroup, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.PolicyGroup + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentPolicyGroup(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPolicyGroupListTypeUnwrapped(v *[]types.PolicyGroup, decoder smithyxml.NodeDecoder) error { + var sv []types.PolicyGroup + if *v == nil { + sv = make([]types.PolicyGroup, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PolicyGroup + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentPolicyGroup(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentPolicyListType(v *[]types.Policy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Policy + if *v == nil { + sv = make([]types.Policy, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.Policy + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentPolicy(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPolicyListTypeUnwrapped(v *[]types.Policy, decoder smithyxml.NodeDecoder) error { + var sv []types.Policy + if *v == nil { + sv = make([]types.Policy, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Policy + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentPolicy(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentPolicyNameListType(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPolicyNameListTypeUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentPolicyNotAttachableException(v **types.PolicyNotAttachableException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PolicyNotAttachableException + if *v == nil { + sv = &types.PolicyNotAttachableException{} + } 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_deserializeDocumentPolicyRole(v **types.PolicyRole, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PolicyRole + if *v == nil { + sv = &types.PolicyRole{} + } 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("RoleId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoleId = ptr.String(xtv) + } + + case strings.EqualFold("RoleName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoleName = 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_deserializeDocumentPolicyRoleListType(v *[]types.PolicyRole, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PolicyRole + if *v == nil { + sv = make([]types.PolicyRole, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.PolicyRole + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentPolicyRole(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPolicyRoleListTypeUnwrapped(v *[]types.PolicyRole, decoder smithyxml.NodeDecoder) error { + var sv []types.PolicyRole + if *v == nil { + sv = make([]types.PolicyRole, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PolicyRole + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentPolicyRole(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentPolicyUser(v **types.PolicyUser, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PolicyUser + if *v == nil { + sv = &types.PolicyUser{} + } 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("UserId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserId = ptr.String(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentPolicyUserListType(v *[]types.PolicyUser, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PolicyUser + if *v == nil { + sv = make([]types.PolicyUser, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.PolicyUser + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentPolicyUser(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPolicyUserListTypeUnwrapped(v *[]types.PolicyUser, decoder smithyxml.NodeDecoder) error { + var sv []types.PolicyUser + if *v == nil { + sv = make([]types.PolicyUser, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PolicyUser + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentPolicyUser(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentPolicyVersion(v **types.PolicyVersion, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PolicyVersion + if *v == nil { + sv = &types.PolicyVersion{} + } 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("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("Document", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Document = ptr.String(xtv) + } + + case strings.EqualFold("IsDefaultVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsDefaultVersion = xtv + } + + case strings.EqualFold("VersionId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VersionId = 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_deserializeDocumentPosition(v **types.Position, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Position + if *v == nil { + sv = &types.Position{} + } 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("Column", 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.Column = int32(i64) + } + + case strings.EqualFold("Line", 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.Line = 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_deserializeDocumentReportGenerationLimitExceededException(v **types.ReportGenerationLimitExceededException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ReportGenerationLimitExceededException + if *v == nil { + sv = &types.ReportGenerationLimitExceededException{} + } 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_deserializeDocumentResourceSpecificResult(v **types.ResourceSpecificResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResourceSpecificResult + if *v == nil { + sv = &types.ResourceSpecificResult{} + } 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("EvalDecisionDetails", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentEvalDecisionDetailsType(&sv.EvalDecisionDetails, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("EvalResourceDecision", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EvalResourceDecision = types.PolicyEvaluationDecisionType(xtv) + } + + case strings.EqualFold("EvalResourceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EvalResourceName = ptr.String(xtv) + } + + case strings.EqualFold("MatchedStatements", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentStatementListType(&sv.MatchedStatements, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MissingContextValues", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentContextKeyNamesResultListType(&sv.MissingContextValues, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("PermissionsBoundaryDecisionDetail", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPermissionsBoundaryDecisionDetail(&sv.PermissionsBoundaryDecisionDetail, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentResourceSpecificResultListType(v *[]types.ResourceSpecificResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ResourceSpecificResult + if *v == nil { + sv = make([]types.ResourceSpecificResult, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.ResourceSpecificResult + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentResourceSpecificResult(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentResourceSpecificResultListTypeUnwrapped(v *[]types.ResourceSpecificResult, decoder smithyxml.NodeDecoder) error { + var sv []types.ResourceSpecificResult + if *v == nil { + sv = make([]types.ResourceSpecificResult, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ResourceSpecificResult + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentResourceSpecificResult(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentRole(v **types.Role, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Role + if *v == nil { + sv = &types.Role{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("AssumeRolePolicyDocument", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AssumeRolePolicyDocument = ptr.String(xtv) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("MaxSessionDuration", 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.MaxSessionDuration = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("PermissionsBoundary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPermissionsBoundary(&sv.PermissionsBoundary, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("RoleId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoleId = ptr.String(xtv) + } + + case strings.EqualFold("RoleLastUsed", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRoleLastUsed(&sv.RoleLastUsed, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("RoleName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoleName = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentRoleDetail(v **types.RoleDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RoleDetail + if *v == nil { + sv = &types.RoleDetail{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("AssumeRolePolicyDocument", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AssumeRolePolicyDocument = ptr.String(xtv) + } + + case strings.EqualFold("AttachedManagedPolicies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPoliciesListType(&sv.AttachedManagedPolicies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("InstanceProfileList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentInstanceProfileListType(&sv.InstanceProfileList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("PermissionsBoundary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPermissionsBoundary(&sv.PermissionsBoundary, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("RoleId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoleId = ptr.String(xtv) + } + + case strings.EqualFold("RoleLastUsed", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRoleLastUsed(&sv.RoleLastUsed, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("RoleName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoleName = ptr.String(xtv) + } + + case strings.EqualFold("RolePolicyList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyDetailListType(&sv.RolePolicyList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentRoleDetailListType(v *[]types.RoleDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.RoleDetail + if *v == nil { + sv = make([]types.RoleDetail, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.RoleDetail + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentRoleDetail(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentRoleDetailListTypeUnwrapped(v *[]types.RoleDetail, decoder smithyxml.NodeDecoder) error { + var sv []types.RoleDetail + if *v == nil { + sv = make([]types.RoleDetail, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.RoleDetail + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentRoleDetail(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentRoleLastUsed(v **types.RoleLastUsed, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RoleLastUsed + if *v == nil { + sv = &types.RoleLastUsed{} + } 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("LastUsedDate", 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.LastUsedDate = ptr.Time(t) + } + + case strings.EqualFold("Region", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Region = 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_deserializeDocumentRoleListType(v *[]types.Role, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Role + if *v == nil { + sv = make([]types.Role, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.Role + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentRole(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentRoleListTypeUnwrapped(v *[]types.Role, decoder smithyxml.NodeDecoder) error { + var sv []types.Role + if *v == nil { + sv = make([]types.Role, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Role + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentRole(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentRoleUsageListType(v *[]types.RoleUsageType, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.RoleUsageType + if *v == nil { + sv = make([]types.RoleUsageType, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.RoleUsageType + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentRoleUsageType(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentRoleUsageListTypeUnwrapped(v *[]types.RoleUsageType, decoder smithyxml.NodeDecoder) error { + var sv []types.RoleUsageType + if *v == nil { + sv = make([]types.RoleUsageType, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.RoleUsageType + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentRoleUsageType(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentRoleUsageType(v **types.RoleUsageType, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RoleUsageType + if *v == nil { + sv = &types.RoleUsageType{} + } 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("Region", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Region = ptr.String(xtv) + } + + case strings.EqualFold("Resources", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentArnListType(&sv.Resources, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentSAMLProviderListEntry(v **types.SAMLProviderListEntry, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SAMLProviderListEntry + if *v == nil { + sv = &types.SAMLProviderListEntry{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("ValidUntil", 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.ValidUntil = ptr.Time(t) + } + + 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_deserializeDocumentSAMLProviderListType(v *[]types.SAMLProviderListEntry, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.SAMLProviderListEntry + if *v == nil { + sv = make([]types.SAMLProviderListEntry, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.SAMLProviderListEntry + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentSAMLProviderListEntry(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentSAMLProviderListTypeUnwrapped(v *[]types.SAMLProviderListEntry, decoder smithyxml.NodeDecoder) error { + var sv []types.SAMLProviderListEntry + if *v == nil { + sv = make([]types.SAMLProviderListEntry, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.SAMLProviderListEntry + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentSAMLProviderListEntry(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentServerCertificate(v **types.ServerCertificate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ServerCertificate + if *v == nil { + sv = &types.ServerCertificate{} + } 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("CertificateBody", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CertificateBody = ptr.String(xtv) + } + + case strings.EqualFold("CertificateChain", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CertificateChain = ptr.String(xtv) + } + + case strings.EqualFold("ServerCertificateMetadata", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentServerCertificateMetadata(&sv.ServerCertificateMetadata, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentServerCertificateMetadata(v **types.ServerCertificateMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ServerCertificateMetadata + if *v == nil { + sv = &types.ServerCertificateMetadata{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + 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("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("ServerCertificateId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServerCertificateId = ptr.String(xtv) + } + + case strings.EqualFold("ServerCertificateName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServerCertificateName = ptr.String(xtv) + } + + case strings.EqualFold("UploadDate", 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.UploadDate = ptr.Time(t) + } + + 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_deserializeDocumentServerCertificateMetadataListType(v *[]types.ServerCertificateMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ServerCertificateMetadata + if *v == nil { + sv = make([]types.ServerCertificateMetadata, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.ServerCertificateMetadata + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentServerCertificateMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentServerCertificateMetadataListTypeUnwrapped(v *[]types.ServerCertificateMetadata, decoder smithyxml.NodeDecoder) error { + var sv []types.ServerCertificateMetadata + if *v == nil { + sv = make([]types.ServerCertificateMetadata, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ServerCertificateMetadata + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentServerCertificateMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentServiceFailureException(v **types.ServiceFailureException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ServiceFailureException + if *v == nil { + sv = &types.ServiceFailureException{} + } 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_deserializeDocumentServiceLastAccessed(v **types.ServiceLastAccessed, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ServiceLastAccessed + if *v == nil { + sv = &types.ServiceLastAccessed{} + } 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("LastAuthenticated", 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.LastAuthenticated = ptr.Time(t) + } + + case strings.EqualFold("LastAuthenticatedEntity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LastAuthenticatedEntity = ptr.String(xtv) + } + + case strings.EqualFold("LastAuthenticatedRegion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LastAuthenticatedRegion = ptr.String(xtv) + } + + case strings.EqualFold("ServiceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceName = ptr.String(xtv) + } + + case strings.EqualFold("ServiceNamespace", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceNamespace = ptr.String(xtv) + } + + case strings.EqualFold("TotalAuthenticatedEntities", 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.TotalAuthenticatedEntities = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("TrackedActionsLastAccessed", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTrackedActionsLastAccessed(&sv.TrackedActionsLastAccessed, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentServiceNotSupportedException(v **types.ServiceNotSupportedException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ServiceNotSupportedException + if *v == nil { + sv = &types.ServiceNotSupportedException{} + } 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_deserializeDocumentServicesLastAccessed(v *[]types.ServiceLastAccessed, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ServiceLastAccessed + if *v == nil { + sv = make([]types.ServiceLastAccessed, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.ServiceLastAccessed + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentServiceLastAccessed(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentServicesLastAccessedUnwrapped(v *[]types.ServiceLastAccessed, decoder smithyxml.NodeDecoder) error { + var sv []types.ServiceLastAccessed + if *v == nil { + sv = make([]types.ServiceLastAccessed, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ServiceLastAccessed + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentServiceLastAccessed(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentServiceSpecificCredential(v **types.ServiceSpecificCredential, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ServiceSpecificCredential + if *v == nil { + sv = &types.ServiceSpecificCredential{} + } 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("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("ServiceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceName = ptr.String(xtv) + } + + case strings.EqualFold("ServicePassword", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServicePassword = ptr.String(xtv) + } + + case strings.EqualFold("ServiceSpecificCredentialId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceSpecificCredentialId = ptr.String(xtv) + } + + case strings.EqualFold("ServiceUserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceUserName = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.StatusType(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentServiceSpecificCredentialMetadata(v **types.ServiceSpecificCredentialMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ServiceSpecificCredentialMetadata + if *v == nil { + sv = &types.ServiceSpecificCredentialMetadata{} + } 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("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("ServiceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceName = ptr.String(xtv) + } + + case strings.EqualFold("ServiceSpecificCredentialId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceSpecificCredentialId = ptr.String(xtv) + } + + case strings.EqualFold("ServiceUserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceUserName = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.StatusType(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentServiceSpecificCredentialsListType(v *[]types.ServiceSpecificCredentialMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ServiceSpecificCredentialMetadata + if *v == nil { + sv = make([]types.ServiceSpecificCredentialMetadata, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.ServiceSpecificCredentialMetadata + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentServiceSpecificCredentialMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentServiceSpecificCredentialsListTypeUnwrapped(v *[]types.ServiceSpecificCredentialMetadata, decoder smithyxml.NodeDecoder) error { + var sv []types.ServiceSpecificCredentialMetadata + if *v == nil { + sv = make([]types.ServiceSpecificCredentialMetadata, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ServiceSpecificCredentialMetadata + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentServiceSpecificCredentialMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentSigningCertificate(v **types.SigningCertificate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SigningCertificate + if *v == nil { + sv = &types.SigningCertificate{} + } 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("CertificateBody", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CertificateBody = ptr.String(xtv) + } + + case strings.EqualFold("CertificateId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CertificateId = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.StatusType(xtv) + } + + case strings.EqualFold("UploadDate", 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.UploadDate = ptr.Time(t) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentSSHPublicKey(v **types.SSHPublicKey, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SSHPublicKey + if *v == nil { + sv = &types.SSHPublicKey{} + } 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("Fingerprint", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Fingerprint = ptr.String(xtv) + } + + case strings.EqualFold("SSHPublicKeyBody", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SSHPublicKeyBody = ptr.String(xtv) + } + + case strings.EqualFold("SSHPublicKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SSHPublicKeyId = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.StatusType(xtv) + } + + case strings.EqualFold("UploadDate", 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.UploadDate = ptr.Time(t) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentSSHPublicKeyListType(v *[]types.SSHPublicKeyMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.SSHPublicKeyMetadata + if *v == nil { + sv = make([]types.SSHPublicKeyMetadata, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.SSHPublicKeyMetadata + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentSSHPublicKeyMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentSSHPublicKeyListTypeUnwrapped(v *[]types.SSHPublicKeyMetadata, decoder smithyxml.NodeDecoder) error { + var sv []types.SSHPublicKeyMetadata + if *v == nil { + sv = make([]types.SSHPublicKeyMetadata, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.SSHPublicKeyMetadata + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentSSHPublicKeyMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentSSHPublicKeyMetadata(v **types.SSHPublicKeyMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SSHPublicKeyMetadata + if *v == nil { + sv = &types.SSHPublicKeyMetadata{} + } 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("SSHPublicKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SSHPublicKeyId = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.StatusType(xtv) + } + + case strings.EqualFold("UploadDate", 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.UploadDate = ptr.Time(t) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentStatement(v **types.Statement, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Statement + if *v == nil { + sv = &types.Statement{} + } 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("EndPosition", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPosition(&sv.EndPosition, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("SourcePolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourcePolicyId = ptr.String(xtv) + } + + case strings.EqualFold("SourcePolicyType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourcePolicyType = types.PolicySourceType(xtv) + } + + case strings.EqualFold("StartPosition", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPosition(&sv.StartPosition, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentStatementListType(v *[]types.Statement, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Statement + if *v == nil { + sv = make([]types.Statement, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.Statement + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentStatement(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentStatementListTypeUnwrapped(v *[]types.Statement, decoder smithyxml.NodeDecoder) error { + var sv []types.Statement + if *v == nil { + sv = make([]types.Statement, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Statement + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentStatement(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentSummaryMapType(v *map[string]int32, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv map[string]int32 + if *v == nil { + sv = make(map[string]int32, 0) + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("entry", t.Name.Local): + entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentSummaryMapTypeUnwrapped(&sv, entryDecoder); err != nil { + return err + } + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentSummaryMapTypeUnwrapped(v *map[string]int32, decoder smithyxml.NodeDecoder) error { + var sv map[string]int32 + if *v == nil { + sv = make(map[string]int32, 0) + } else { + sv = *v + } + + var ek types.SummaryKeyType + var ev int32 + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + sv[string(ek)] = ev + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("key", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + ek = types.SummaryKeyType(xtv) + } + + case strings.EqualFold("value", 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 + } + ev = int32(i64) + } + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentTag(v **types.Tag, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Tag + if *v == nil { + sv = &types.Tag{} + } 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("Key", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Key = ptr.String(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Value = 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_deserializeDocumentTagListType(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Tag + if *v == nil { + sv = make([]types.Tag, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.Tag + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentTagListTypeUnwrapped(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { + var sv []types.Tag + if *v == nil { + sv = make([]types.Tag, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Tag + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentThumbprintListType(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentThumbprintListTypeUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentTrackedActionLastAccessed(v **types.TrackedActionLastAccessed, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrackedActionLastAccessed + if *v == nil { + sv = &types.TrackedActionLastAccessed{} + } 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("ActionName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ActionName = ptr.String(xtv) + } + + case strings.EqualFold("LastAccessedEntity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LastAccessedEntity = ptr.String(xtv) + } + + case strings.EqualFold("LastAccessedRegion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LastAccessedRegion = ptr.String(xtv) + } + + case strings.EqualFold("LastAccessedTime", 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.LastAccessedTime = ptr.Time(t) + } + + 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_deserializeDocumentTrackedActionsLastAccessed(v *[]types.TrackedActionLastAccessed, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.TrackedActionLastAccessed + if *v == nil { + sv = make([]types.TrackedActionLastAccessed, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.TrackedActionLastAccessed + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentTrackedActionLastAccessed(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentTrackedActionsLastAccessedUnwrapped(v *[]types.TrackedActionLastAccessed, decoder smithyxml.NodeDecoder) error { + var sv []types.TrackedActionLastAccessed + if *v == nil { + sv = make([]types.TrackedActionLastAccessed, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.TrackedActionLastAccessed + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentTrackedActionLastAccessed(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentUnmodifiableEntityException(v **types.UnmodifiableEntityException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.UnmodifiableEntityException + if *v == nil { + sv = &types.UnmodifiableEntityException{} + } 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_deserializeDocumentUnrecognizedPublicKeyEncodingException(v **types.UnrecognizedPublicKeyEncodingException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.UnrecognizedPublicKeyEncodingException + if *v == nil { + sv = &types.UnrecognizedPublicKeyEncodingException{} + } 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_deserializeDocumentUser(v **types.User, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.User + if *v == nil { + sv = &types.User{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("PasswordLastUsed", 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.PasswordLastUsed = ptr.Time(t) + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("PermissionsBoundary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPermissionsBoundary(&sv.PermissionsBoundary, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("UserId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserId = ptr.String(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeDocumentUserDetail(v **types.UserDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.UserDetail + if *v == nil { + sv = &types.UserDetail{} + } 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("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("AttachedManagedPolicies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPoliciesListType(&sv.AttachedManagedPolicies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("GroupList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentGroupNameListType(&sv.GroupList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Path", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Path = ptr.String(xtv) + } + + case strings.EqualFold("PermissionsBoundary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPermissionsBoundary(&sv.PermissionsBoundary, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("UserId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserId = ptr.String(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = ptr.String(xtv) + } + + case strings.EqualFold("UserPolicyList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyDetailListType(&sv.UserPolicyList, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentUserDetailListType(v *[]types.UserDetail, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.UserDetail + if *v == nil { + sv = make([]types.UserDetail, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.UserDetail + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentUserDetail(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentUserDetailListTypeUnwrapped(v *[]types.UserDetail, decoder smithyxml.NodeDecoder) error { + var sv []types.UserDetail + if *v == nil { + sv = make([]types.UserDetail, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.UserDetail + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentUserDetail(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentUserListType(v *[]types.User, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.User + if *v == nil { + sv = make([]types.User, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.User + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentUser(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentUserListTypeUnwrapped(v *[]types.User, decoder smithyxml.NodeDecoder) error { + var sv []types.User + if *v == nil { + sv = make([]types.User, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.User + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentUser(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentVirtualMFADevice(v **types.VirtualMFADevice, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.VirtualMFADevice + if *v == nil { + sv = &types.VirtualMFADevice{} + } 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("Base32StringSeed", t.Name.Local): + var data string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + data = xtv + } + sv.Base32StringSeed, err = base64.StdEncoding.DecodeString(data) + if err != nil { + return err + } + + case strings.EqualFold("EnableDate", 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.EnableDate = ptr.Time(t) + } + + case strings.EqualFold("QRCodePNG", t.Name.Local): + var data string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + data = xtv + } + sv.QRCodePNG, err = base64.StdEncoding.DecodeString(data) + if err != nil { + return err + } + + case strings.EqualFold("SerialNumber", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SerialNumber = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("User", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentUser(&sv.User, nodeDecoder); err != nil { + return err + } + + 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_deserializeDocumentVirtualMFADeviceListType(v *[]types.VirtualMFADevice, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.VirtualMFADevice + if *v == nil { + sv = make([]types.VirtualMFADevice, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.VirtualMFADevice + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentVirtualMFADevice(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentVirtualMFADeviceListTypeUnwrapped(v *[]types.VirtualMFADevice, decoder smithyxml.NodeDecoder) error { + var sv []types.VirtualMFADevice + if *v == nil { + sv = make([]types.VirtualMFADevice, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.VirtualMFADevice + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentVirtualMFADevice(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeOpDocumentCreateAccessKeyOutput(v **CreateAccessKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateAccessKeyOutput + if *v == nil { + sv = &CreateAccessKeyOutput{} + } 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("AccessKey", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAccessKey(&sv.AccessKey, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateGroupOutput(v **CreateGroupOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateGroupOutput + if *v == nil { + sv = &CreateGroupOutput{} + } 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("Group", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentGroup(&sv.Group, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateInstanceProfileOutput(v **CreateInstanceProfileOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateInstanceProfileOutput + if *v == nil { + sv = &CreateInstanceProfileOutput{} + } 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("InstanceProfile", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentInstanceProfile(&sv.InstanceProfile, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateLoginProfileOutput(v **CreateLoginProfileOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateLoginProfileOutput + if *v == nil { + sv = &CreateLoginProfileOutput{} + } 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("LoginProfile", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentLoginProfile(&sv.LoginProfile, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateOpenIDConnectProviderOutput(v **CreateOpenIDConnectProviderOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateOpenIDConnectProviderOutput + if *v == nil { + sv = &CreateOpenIDConnectProviderOutput{} + } 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("OpenIDConnectProviderArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OpenIDConnectProviderArn = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreatePolicyOutput(v **CreatePolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreatePolicyOutput + if *v == nil { + sv = &CreatePolicyOutput{} + } 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("Policy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicy(&sv.Policy, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreatePolicyVersionOutput(v **CreatePolicyVersionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreatePolicyVersionOutput + if *v == nil { + sv = &CreatePolicyVersionOutput{} + } 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("PolicyVersion", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyVersion(&sv.PolicyVersion, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateRoleOutput(v **CreateRoleOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateRoleOutput + if *v == nil { + sv = &CreateRoleOutput{} + } 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("Role", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRole(&sv.Role, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateSAMLProviderOutput(v **CreateSAMLProviderOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateSAMLProviderOutput + if *v == nil { + sv = &CreateSAMLProviderOutput{} + } 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("SAMLProviderArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SAMLProviderArn = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateServiceLinkedRoleOutput(v **CreateServiceLinkedRoleOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateServiceLinkedRoleOutput + if *v == nil { + sv = &CreateServiceLinkedRoleOutput{} + } 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("Role", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRole(&sv.Role, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateServiceSpecificCredentialOutput(v **CreateServiceSpecificCredentialOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateServiceSpecificCredentialOutput + if *v == nil { + sv = &CreateServiceSpecificCredentialOutput{} + } 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("ServiceSpecificCredential", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentServiceSpecificCredential(&sv.ServiceSpecificCredential, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateUserOutput + if *v == nil { + sv = &CreateUserOutput{} + } 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("User", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentUser(&sv.User, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentCreateVirtualMFADeviceOutput(v **CreateVirtualMFADeviceOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateVirtualMFADeviceOutput + if *v == nil { + sv = &CreateVirtualMFADeviceOutput{} + } 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("VirtualMFADevice", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentVirtualMFADevice(&sv.VirtualMFADevice, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentDeleteServiceLinkedRoleOutput(v **DeleteServiceLinkedRoleOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DeleteServiceLinkedRoleOutput + if *v == nil { + sv = &DeleteServiceLinkedRoleOutput{} + } 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("DeletionTaskId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DeletionTaskId = 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_deserializeOpDocumentGenerateCredentialReportOutput(v **GenerateCredentialReportOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GenerateCredentialReportOutput + if *v == nil { + sv = &GenerateCredentialReportOutput{} + } 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("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("State", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.State = types.ReportStateType(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_deserializeOpDocumentGenerateOrganizationsAccessReportOutput(v **GenerateOrganizationsAccessReportOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GenerateOrganizationsAccessReportOutput + if *v == nil { + sv = &GenerateOrganizationsAccessReportOutput{} + } 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("JobId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.JobId = 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_deserializeOpDocumentGenerateServiceLastAccessedDetailsOutput(v **GenerateServiceLastAccessedDetailsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GenerateServiceLastAccessedDetailsOutput + if *v == nil { + sv = &GenerateServiceLastAccessedDetailsOutput{} + } 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("JobId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.JobId = 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_deserializeOpDocumentGetAccessKeyLastUsedOutput(v **GetAccessKeyLastUsedOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetAccessKeyLastUsedOutput + if *v == nil { + sv = &GetAccessKeyLastUsedOutput{} + } 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("AccessKeyLastUsed", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAccessKeyLastUsed(&sv.AccessKeyLastUsed, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeOpDocumentGetAccountAuthorizationDetailsOutput(v **GetAccountAuthorizationDetailsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetAccountAuthorizationDetailsOutput + if *v == nil { + sv = &GetAccountAuthorizationDetailsOutput{} + } 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("GroupDetailList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentGroupDetailListType(&sv.GroupDetailList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Policies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentManagedPolicyDetailListType(&sv.Policies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("RoleDetailList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRoleDetailListType(&sv.RoleDetailList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("UserDetailList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentUserDetailListType(&sv.UserDetailList, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetAccountPasswordPolicyOutput(v **GetAccountPasswordPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetAccountPasswordPolicyOutput + if *v == nil { + sv = &GetAccountPasswordPolicyOutput{} + } 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("PasswordPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPasswordPolicy(&sv.PasswordPolicy, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetAccountSummaryOutput(v **GetAccountSummaryOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetAccountSummaryOutput + if *v == nil { + sv = &GetAccountSummaryOutput{} + } 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("SummaryMap", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentSummaryMapType(&sv.SummaryMap, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetContextKeysForCustomPolicyOutput(v **GetContextKeysForCustomPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetContextKeysForCustomPolicyOutput + if *v == nil { + sv = &GetContextKeysForCustomPolicyOutput{} + } 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("ContextKeyNames", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentContextKeyNamesResultListType(&sv.ContextKeyNames, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetContextKeysForPrincipalPolicyOutput(v **GetContextKeysForPrincipalPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetContextKeysForPrincipalPolicyOutput + if *v == nil { + sv = &GetContextKeysForPrincipalPolicyOutput{} + } 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("ContextKeyNames", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentContextKeyNamesResultListType(&sv.ContextKeyNames, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetCredentialReportOutput(v **GetCredentialReportOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetCredentialReportOutput + if *v == nil { + sv = &GetCredentialReportOutput{} + } 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("Content", t.Name.Local): + var data string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + data = xtv + } + sv.Content, err = base64.StdEncoding.DecodeString(data) + if err != nil { + return err + } + + case strings.EqualFold("GeneratedTime", 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.GeneratedTime = ptr.Time(t) + } + + case strings.EqualFold("ReportFormat", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ReportFormat = types.ReportFormatType(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_deserializeOpDocumentGetGroupOutput(v **GetGroupOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetGroupOutput + if *v == nil { + sv = &GetGroupOutput{} + } 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("Group", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentGroup(&sv.Group, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Users", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentUserListType(&sv.Users, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetGroupPolicyOutput(v **GetGroupPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetGroupPolicyOutput + if *v == nil { + sv = &GetGroupPolicyOutput{} + } 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("GroupName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupName = ptr.String(xtv) + } + + case strings.EqualFold("PolicyDocument", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyDocument = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = 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_deserializeOpDocumentGetInstanceProfileOutput(v **GetInstanceProfileOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetInstanceProfileOutput + if *v == nil { + sv = &GetInstanceProfileOutput{} + } 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("InstanceProfile", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentInstanceProfile(&sv.InstanceProfile, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetLoginProfileOutput(v **GetLoginProfileOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetLoginProfileOutput + if *v == nil { + sv = &GetLoginProfileOutput{} + } 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("LoginProfile", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentLoginProfile(&sv.LoginProfile, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetMFADeviceOutput(v **GetMFADeviceOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetMFADeviceOutput + if *v == nil { + sv = &GetMFADeviceOutput{} + } 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("Certifications", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCertificationMapType(&sv.Certifications, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("EnableDate", 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.EnableDate = ptr.Time(t) + } + + case strings.EqualFold("SerialNumber", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SerialNumber = ptr.String(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeOpDocumentGetOpenIDConnectProviderOutput(v **GetOpenIDConnectProviderOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetOpenIDConnectProviderOutput + if *v == nil { + sv = &GetOpenIDConnectProviderOutput{} + } 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("ClientIDList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentClientIDListType(&sv.ClientIDList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ThumbprintList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentThumbprintListType(&sv.ThumbprintList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Url", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Url = 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_deserializeOpDocumentGetOrganizationsAccessReportOutput(v **GetOrganizationsAccessReportOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetOrganizationsAccessReportOutput + if *v == nil { + sv = &GetOrganizationsAccessReportOutput{} + } 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("AccessDetails", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAccessDetails(&sv.AccessDetails, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ErrorDetails", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentErrorDetails(&sv.ErrorDetails, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("JobCompletionDate", 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.JobCompletionDate = ptr.Time(t) + } + + case strings.EqualFold("JobCreationDate", 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.JobCreationDate = ptr.Time(t) + } + + case strings.EqualFold("JobStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.JobStatus = types.JobStatusType(xtv) + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("NumberOfServicesAccessible", 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.NumberOfServicesAccessible = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NumberOfServicesNotAccessed", 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.NumberOfServicesNotAccessed = 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_deserializeOpDocumentGetPolicyOutput(v **GetPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetPolicyOutput + if *v == nil { + sv = &GetPolicyOutput{} + } 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("Policy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicy(&sv.Policy, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetPolicyVersionOutput(v **GetPolicyVersionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetPolicyVersionOutput + if *v == nil { + sv = &GetPolicyVersionOutput{} + } 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("PolicyVersion", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyVersion(&sv.PolicyVersion, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetRoleOutput(v **GetRoleOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetRoleOutput + if *v == nil { + sv = &GetRoleOutput{} + } 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("Role", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRole(&sv.Role, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetRolePolicyOutput(v **GetRolePolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetRolePolicyOutput + if *v == nil { + sv = &GetRolePolicyOutput{} + } 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("PolicyDocument", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyDocument = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = ptr.String(xtv) + } + + case strings.EqualFold("RoleName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoleName = 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_deserializeOpDocumentGetSAMLProviderOutput(v **GetSAMLProviderOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetSAMLProviderOutput + if *v == nil { + sv = &GetSAMLProviderOutput{} + } 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("CreateDate", 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.CreateDate = ptr.Time(t) + } + + case strings.EqualFold("SAMLMetadataDocument", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SAMLMetadataDocument = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ValidUntil", 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.ValidUntil = ptr.Time(t) + } + + 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_deserializeOpDocumentGetServerCertificateOutput(v **GetServerCertificateOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetServerCertificateOutput + if *v == nil { + sv = &GetServerCertificateOutput{} + } 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("ServerCertificate", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentServerCertificate(&sv.ServerCertificate, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetServiceLastAccessedDetailsOutput(v **GetServiceLastAccessedDetailsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetServiceLastAccessedDetailsOutput + if *v == nil { + sv = &GetServiceLastAccessedDetailsOutput{} + } 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("Error", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentErrorDetails(&sv.Error, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("JobCompletionDate", 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.JobCompletionDate = ptr.Time(t) + } + + case strings.EqualFold("JobCreationDate", 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.JobCreationDate = ptr.Time(t) + } + + case strings.EqualFold("JobStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.JobStatus = types.JobStatusType(xtv) + } + + case strings.EqualFold("JobType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.JobType = types.AccessAdvisorUsageGranularityType(xtv) + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("ServicesLastAccessed", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentServicesLastAccessed(&sv.ServicesLastAccessed, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetServiceLastAccessedDetailsWithEntitiesOutput(v **GetServiceLastAccessedDetailsWithEntitiesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetServiceLastAccessedDetailsWithEntitiesOutput + if *v == nil { + sv = &GetServiceLastAccessedDetailsWithEntitiesOutput{} + } 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("EntityDetailsList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentEntityDetailsListType(&sv.EntityDetailsList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Error", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentErrorDetails(&sv.Error, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("JobCompletionDate", 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.JobCompletionDate = ptr.Time(t) + } + + case strings.EqualFold("JobCreationDate", 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.JobCreationDate = ptr.Time(t) + } + + case strings.EqualFold("JobStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.JobStatus = types.JobStatusType(xtv) + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentGetServiceLinkedRoleDeletionStatusOutput(v **GetServiceLinkedRoleDeletionStatusOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetServiceLinkedRoleDeletionStatusOutput + if *v == nil { + sv = &GetServiceLinkedRoleDeletionStatusOutput{} + } 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("Reason", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentDeletionTaskFailureReasonType(&sv.Reason, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.DeletionTaskStatusType(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_deserializeOpDocumentGetSSHPublicKeyOutput(v **GetSSHPublicKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetSSHPublicKeyOutput + if *v == nil { + sv = &GetSSHPublicKeyOutput{} + } 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("SSHPublicKey", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentSSHPublicKey(&sv.SSHPublicKey, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetUserOutput(v **GetUserOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetUserOutput + if *v == nil { + sv = &GetUserOutput{} + } 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("User", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentUser(&sv.User, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentGetUserPolicyOutput(v **GetUserPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetUserPolicyOutput + if *v == nil { + sv = &GetUserPolicyOutput{} + } 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("PolicyDocument", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyDocument = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = ptr.String(xtv) + } + + case strings.EqualFold("UserName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.UserName = 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_deserializeOpDocumentListAccessKeysOutput(v **ListAccessKeysOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListAccessKeysOutput + if *v == nil { + sv = &ListAccessKeysOutput{} + } 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("AccessKeyMetadata", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAccessKeyMetadataListType(&sv.AccessKeyMetadata, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListAccountAliasesOutput(v **ListAccountAliasesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListAccountAliasesOutput + if *v == nil { + sv = &ListAccountAliasesOutput{} + } 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("AccountAliases", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAccountAliasListType(&sv.AccountAliases, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListAttachedGroupPoliciesOutput(v **ListAttachedGroupPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListAttachedGroupPoliciesOutput + if *v == nil { + sv = &ListAttachedGroupPoliciesOutput{} + } 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("AttachedPolicies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPoliciesListType(&sv.AttachedPolicies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListAttachedRolePoliciesOutput(v **ListAttachedRolePoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListAttachedRolePoliciesOutput + if *v == nil { + sv = &ListAttachedRolePoliciesOutput{} + } 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("AttachedPolicies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPoliciesListType(&sv.AttachedPolicies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListAttachedUserPoliciesOutput(v **ListAttachedUserPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListAttachedUserPoliciesOutput + if *v == nil { + sv = &ListAttachedUserPoliciesOutput{} + } 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("AttachedPolicies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentAttachedPoliciesListType(&sv.AttachedPolicies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListEntitiesForPolicyOutput(v **ListEntitiesForPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListEntitiesForPolicyOutput + if *v == nil { + sv = &ListEntitiesForPolicyOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("PolicyGroups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyGroupListType(&sv.PolicyGroups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("PolicyRoles", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyRoleListType(&sv.PolicyRoles, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("PolicyUsers", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyUserListType(&sv.PolicyUsers, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListGroupPoliciesOutput(v **ListGroupPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListGroupPoliciesOutput + if *v == nil { + sv = &ListGroupPoliciesOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("PolicyNames", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyNameListType(&sv.PolicyNames, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListGroupsForUserOutput(v **ListGroupsForUserOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListGroupsForUserOutput + if *v == nil { + sv = &ListGroupsForUserOutput{} + } 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("Groups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentGroupListType(&sv.Groups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListGroupsOutput + if *v == nil { + sv = &ListGroupsOutput{} + } 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("Groups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentGroupListType(&sv.Groups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListInstanceProfilesForRoleOutput(v **ListInstanceProfilesForRoleOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListInstanceProfilesForRoleOutput + if *v == nil { + sv = &ListInstanceProfilesForRoleOutput{} + } 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("InstanceProfiles", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentInstanceProfileListType(&sv.InstanceProfiles, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListInstanceProfilesOutput(v **ListInstanceProfilesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListInstanceProfilesOutput + if *v == nil { + sv = &ListInstanceProfilesOutput{} + } 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("InstanceProfiles", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentInstanceProfileListType(&sv.InstanceProfiles, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListInstanceProfileTagsOutput(v **ListInstanceProfileTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListInstanceProfileTagsOutput + if *v == nil { + sv = &ListInstanceProfileTagsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListMFADevicesOutput(v **ListMFADevicesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListMFADevicesOutput + if *v == nil { + sv = &ListMFADevicesOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MFADevices", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMfaDeviceListType(&sv.MFADevices, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListMFADeviceTagsOutput(v **ListMFADeviceTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListMFADeviceTagsOutput + if *v == nil { + sv = &ListMFADeviceTagsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListOpenIDConnectProvidersOutput(v **ListOpenIDConnectProvidersOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListOpenIDConnectProvidersOutput + if *v == nil { + sv = &ListOpenIDConnectProvidersOutput{} + } 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("OpenIDConnectProviderList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentOpenIDConnectProviderListType(&sv.OpenIDConnectProviderList, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListOpenIDConnectProviderTagsOutput(v **ListOpenIDConnectProviderTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListOpenIDConnectProviderTagsOutput + if *v == nil { + sv = &ListOpenIDConnectProviderTagsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListPoliciesGrantingServiceAccessOutput(v **ListPoliciesGrantingServiceAccessOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListPoliciesGrantingServiceAccessOutput + if *v == nil { + sv = &ListPoliciesGrantingServiceAccessOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("PoliciesGrantingServiceAccess", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentListPolicyGrantingServiceAccessResponseListType(&sv.PoliciesGrantingServiceAccess, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListPoliciesOutput(v **ListPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListPoliciesOutput + if *v == nil { + sv = &ListPoliciesOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Policies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyListType(&sv.Policies, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListPolicyTagsOutput(v **ListPolicyTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListPolicyTagsOutput + if *v == nil { + sv = &ListPolicyTagsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListPolicyVersionsOutput(v **ListPolicyVersionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListPolicyVersionsOutput + if *v == nil { + sv = &ListPolicyVersionsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Versions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyDocumentVersionListType(&sv.Versions, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListRolePoliciesOutput(v **ListRolePoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListRolePoliciesOutput + if *v == nil { + sv = &ListRolePoliciesOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("PolicyNames", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyNameListType(&sv.PolicyNames, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListRolesOutput(v **ListRolesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListRolesOutput + if *v == nil { + sv = &ListRolesOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Roles", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRoleListType(&sv.Roles, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListRoleTagsOutput(v **ListRoleTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListRoleTagsOutput + if *v == nil { + sv = &ListRoleTagsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListSAMLProvidersOutput(v **ListSAMLProvidersOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListSAMLProvidersOutput + if *v == nil { + sv = &ListSAMLProvidersOutput{} + } 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("SAMLProviderList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentSAMLProviderListType(&sv.SAMLProviderList, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListSAMLProviderTagsOutput(v **ListSAMLProviderTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListSAMLProviderTagsOutput + if *v == nil { + sv = &ListSAMLProviderTagsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListServerCertificatesOutput(v **ListServerCertificatesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListServerCertificatesOutput + if *v == nil { + sv = &ListServerCertificatesOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("ServerCertificateMetadataList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentServerCertificateMetadataListType(&sv.ServerCertificateMetadataList, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListServerCertificateTagsOutput(v **ListServerCertificateTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListServerCertificateTagsOutput + if *v == nil { + sv = &ListServerCertificateTagsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListServiceSpecificCredentialsOutput(v **ListServiceSpecificCredentialsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListServiceSpecificCredentialsOutput + if *v == nil { + sv = &ListServiceSpecificCredentialsOutput{} + } 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("ServiceSpecificCredentials", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentServiceSpecificCredentialsListType(&sv.ServiceSpecificCredentials, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListSigningCertificatesOutput(v **ListSigningCertificatesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListSigningCertificatesOutput + if *v == nil { + sv = &ListSigningCertificatesOutput{} + } 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("Certificates", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCertificateListType(&sv.Certificates, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentListSSHPublicKeysOutput(v **ListSSHPublicKeysOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListSSHPublicKeysOutput + if *v == nil { + sv = &ListSSHPublicKeysOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("SSHPublicKeys", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentSSHPublicKeyListType(&sv.SSHPublicKeys, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListUserPoliciesOutput(v **ListUserPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListUserPoliciesOutput + if *v == nil { + sv = &ListUserPoliciesOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("PolicyNames", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPolicyNameListType(&sv.PolicyNames, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListUsersOutput + if *v == nil { + sv = &ListUsersOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Users", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentUserListType(&sv.Users, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListUserTagsOutput(v **ListUserTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListUserTagsOutput + if *v == nil { + sv = &ListUserTagsOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentListVirtualMFADevicesOutput(v **ListVirtualMFADevicesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListVirtualMFADevicesOutput + if *v == nil { + sv = &ListVirtualMFADevicesOutput{} + } 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("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("VirtualMFADevices", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentVirtualMFADeviceListType(&sv.VirtualMFADevices, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentResetServiceSpecificCredentialOutput(v **ResetServiceSpecificCredentialOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ResetServiceSpecificCredentialOutput + if *v == nil { + sv = &ResetServiceSpecificCredentialOutput{} + } 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("ServiceSpecificCredential", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentServiceSpecificCredential(&sv.ServiceSpecificCredential, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentSimulateCustomPolicyOutput(v **SimulateCustomPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *SimulateCustomPolicyOutput + if *v == nil { + sv = &SimulateCustomPolicyOutput{} + } 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("EvaluationResults", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentEvaluationResultsListType(&sv.EvaluationResults, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentSimulatePrincipalPolicyOutput(v **SimulatePrincipalPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *SimulatePrincipalPolicyOutput + if *v == nil { + sv = &SimulatePrincipalPolicyOutput{} + } 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("EvaluationResults", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentEvaluationResultsListType(&sv.EvaluationResults, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected booleanType to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = 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_deserializeOpDocumentUpdateRoleDescriptionOutput(v **UpdateRoleDescriptionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateRoleDescriptionOutput + if *v == nil { + sv = &UpdateRoleDescriptionOutput{} + } 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("Role", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentRole(&sv.Role, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentUpdateRoleOutput(v **UpdateRoleOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateRoleOutput + if *v == nil { + sv = &UpdateRoleOutput{} + } 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 { + 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_deserializeOpDocumentUpdateSAMLProviderOutput(v **UpdateSAMLProviderOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateSAMLProviderOutput + if *v == nil { + sv = &UpdateSAMLProviderOutput{} + } 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("SAMLProviderArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SAMLProviderArn = 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_deserializeOpDocumentUploadServerCertificateOutput(v **UploadServerCertificateOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UploadServerCertificateOutput + if *v == nil { + sv = &UploadServerCertificateOutput{} + } 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("ServerCertificateMetadata", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentServerCertificateMetadata(&sv.ServerCertificateMetadata, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentTagListType(&sv.Tags, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentUploadSigningCertificateOutput(v **UploadSigningCertificateOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UploadSigningCertificateOutput + if *v == nil { + sv = &UploadSigningCertificateOutput{} + } 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("Certificate", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentSigningCertificate(&sv.Certificate, nodeDecoder); err != nil { + return err + } + + 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_deserializeOpDocumentUploadSSHPublicKeyOutput(v **UploadSSHPublicKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UploadSSHPublicKeyOutput + if *v == nil { + sv = &UploadSSHPublicKeyOutput{} + } 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("SSHPublicKey", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentSSHPublicKey(&sv.SSHPublicKey, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/doc.go new file mode 100644 index 0000000000000..c849c3b7d972b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/doc.go @@ -0,0 +1,14 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package iam provides the API client, operations, and parameter types for AWS +// Identity and Access Management. +// +// Identity and Access Management Identity and Access Management (IAM) is a web +// service for securely controlling access to Amazon Web Services services. With +// IAM, you can centrally manage users, security credentials such as access keys, +// and permissions that control which Amazon Web Services resources users and +// applications can access. For more information about IAM, see Identity and +// Access Management (IAM) (http://aws.amazon.com/iam/) and the Identity and +// Access Management User Guide (https://docs.aws.amazon.com/IAM/latest/UserGuide/) +// . +package iam diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go new file mode 100644 index 0000000000000..384be232a0db2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go @@ -0,0 +1,823 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "net/url" + "os" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + nf := (&aws.EndpointNotFoundError{}) + if errors.As(err, &nf) { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) + return next.HandleSerialize(ctx, in) + } + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "iam" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return w.awsResolver.ResolveEndpoint(ServiceID, region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, +// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked +// via its middleware. +// +// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} + +func resolveEndpointResolverV2(options *Options) { + if options.EndpointResolverV2 == nil { + options.EndpointResolverV2 = NewDefaultEndpointResolverV2() + } +} + +func resolveBaseEndpoint(cfg aws.Config, o *Options) { + if cfg.BaseEndpoint != nil { + o.BaseEndpoint = cfg.BaseEndpoint + } + + _, g := os.LookupEnv("AWS_ENDPOINT_URL") + _, s := os.LookupEnv("AWS_ENDPOINT_URL_IAM") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "IAM", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) *string { + if region == "" { + return nil + } + return aws.String(endpoints.MapFIPSRegion(region)) +} + +// EndpointParameters provides the parameters that influence how endpoints are +// resolved. +type EndpointParameters struct { + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string + + // When true, use the dual-stack endpoint. If the configured endpoint does not + // support dual-stack, dispatching the request MAY return an error. + // + // Defaults to + // false if no value is provided. + // + // AWS::UseDualStack + UseDualStack *bool + + // When true, send this request to the FIPS-compliant regional endpoint. If the + // configured endpoint does not have a FIPS compliant endpoint, dispatching the + // request will return an error. + // + // Defaults to false if no value is + // provided. + // + // AWS::UseFIPS + UseFIPS *bool + + // Override the endpoint used to send this request + // + // Parameter is + // required. + // + // SDK::Endpoint + Endpoint *string +} + +// ValidateRequired validates required parameters are set. +func (p EndpointParameters) ValidateRequired() error { + if p.UseDualStack == nil { + return fmt.Errorf("parameter UseDualStack is required") + } + + if p.UseFIPS == nil { + return fmt.Errorf("parameter UseFIPS is required") + } + + return nil +} + +// WithDefaults returns a shallow copy of EndpointParameterswith default values +// applied to members where applicable. +func (p EndpointParameters) WithDefaults() EndpointParameters { + if p.UseDualStack == nil { + p.UseDualStack = ptr.Bool(false) + } + + if p.UseFIPS == nil { + p.UseFIPS = ptr.Bool(false) + } + return p +} + +// EndpointResolverV2 provides the interface for resolving service endpoints. +type EndpointResolverV2 interface { + // ResolveEndpoint attempts to resolve the endpoint with the provided options, + // returning the endpoint if found. Otherwise an error is returned. + ResolveEndpoint(ctx context.Context, params EndpointParameters) ( + smithyendpoints.Endpoint, error, + ) +} + +// resolver provides the implementation for resolving endpoints. +type resolver struct{} + +func NewDefaultEndpointResolverV2() EndpointResolverV2 { + return &resolver{} +} + +// ResolveEndpoint attempts to resolve the endpoint with the provided options, +// returning the endpoint if found. Otherwise an error is returned. +func (r *resolver) ResolveEndpoint( + ctx context.Context, params EndpointParameters, +) ( + endpoint smithyendpoints.Endpoint, err error, +) { + params = params.WithDefaults() + if err = params.ValidateRequired(); err != nil { + return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) + } + _UseDualStack := *params.UseDualStack + _UseFIPS := *params.UseFIPS + + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + if _UseDualStack == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + } + uriString := _Endpoint + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + if _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://iam.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := "https://iam-fips.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-cn" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://iam.cn-north-1.amazonaws.com.cn" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "cn-north-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://iam.us-gov.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := "https://iam.us-gov.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-iso" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://iam.us-iso-east-1.c2s.ic.gov" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-iso-b" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://iam.us-isob-east-1.sc2s.sgov.gov" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-iso-e" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://iam.eu-isoe-west-1.cloud.adc-e.uk" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "eu-isoe-west-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-iso-f" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://iam.us-isof-south-1.csp.hci.ic.gov" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "iam") + smithyhttp.SetSigV4ASigningName(&sp, "iam") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://iam-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") + } + } + if _UseFIPS == true { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://iam-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") + } + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://iam.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://iam.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") +} + +type endpointParamsBinder interface { + bindEndpointParams(*EndpointParameters) +} + +func bindEndpointParams(input interface{}, options Options) *EndpointParameters { + params := &EndpointParameters{} + + params.Region = bindRegion(options.Region) + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + + if b, ok := input.(endpointParamsBinder); ok { + b.bindEndpointParams(params) + } + + return params +} + +type resolveEndpointV2Middleware struct { + options Options +} + +func (*resolveEndpointV2Middleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.options.EndpointResolverV2 == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := bindEndpointParams(getOperationInput(ctx), m.options) + endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { + endpt.URI.RawPath = endpt.URI.Path + } + req.URL.Scheme = endpt.URI.Scheme + req.URL.Host = endpt.URI.Host + req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) + req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) + for k := range endpt.Headers { + req.Header.Set(k, endpt.Headers.Get(k)) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) + for _, o := range opts { + rscheme.SignerProperties.SetAll(&o.SignerProperties) + } + + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/generated.json new file mode 100644 index 0000000000000..26ce6bfcc0917 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/generated.json @@ -0,0 +1,191 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_AddClientIDToOpenIDConnectProvider.go", + "api_op_AddRoleToInstanceProfile.go", + "api_op_AddUserToGroup.go", + "api_op_AttachGroupPolicy.go", + "api_op_AttachRolePolicy.go", + "api_op_AttachUserPolicy.go", + "api_op_ChangePassword.go", + "api_op_CreateAccessKey.go", + "api_op_CreateAccountAlias.go", + "api_op_CreateGroup.go", + "api_op_CreateInstanceProfile.go", + "api_op_CreateLoginProfile.go", + "api_op_CreateOpenIDConnectProvider.go", + "api_op_CreatePolicy.go", + "api_op_CreatePolicyVersion.go", + "api_op_CreateRole.go", + "api_op_CreateSAMLProvider.go", + "api_op_CreateServiceLinkedRole.go", + "api_op_CreateServiceSpecificCredential.go", + "api_op_CreateUser.go", + "api_op_CreateVirtualMFADevice.go", + "api_op_DeactivateMFADevice.go", + "api_op_DeleteAccessKey.go", + "api_op_DeleteAccountAlias.go", + "api_op_DeleteAccountPasswordPolicy.go", + "api_op_DeleteGroup.go", + "api_op_DeleteGroupPolicy.go", + "api_op_DeleteInstanceProfile.go", + "api_op_DeleteLoginProfile.go", + "api_op_DeleteOpenIDConnectProvider.go", + "api_op_DeletePolicy.go", + "api_op_DeletePolicyVersion.go", + "api_op_DeleteRole.go", + "api_op_DeleteRolePermissionsBoundary.go", + "api_op_DeleteRolePolicy.go", + "api_op_DeleteSAMLProvider.go", + "api_op_DeleteSSHPublicKey.go", + "api_op_DeleteServerCertificate.go", + "api_op_DeleteServiceLinkedRole.go", + "api_op_DeleteServiceSpecificCredential.go", + "api_op_DeleteSigningCertificate.go", + "api_op_DeleteUser.go", + "api_op_DeleteUserPermissionsBoundary.go", + "api_op_DeleteUserPolicy.go", + "api_op_DeleteVirtualMFADevice.go", + "api_op_DetachGroupPolicy.go", + "api_op_DetachRolePolicy.go", + "api_op_DetachUserPolicy.go", + "api_op_EnableMFADevice.go", + "api_op_GenerateCredentialReport.go", + "api_op_GenerateOrganizationsAccessReport.go", + "api_op_GenerateServiceLastAccessedDetails.go", + "api_op_GetAccessKeyLastUsed.go", + "api_op_GetAccountAuthorizationDetails.go", + "api_op_GetAccountPasswordPolicy.go", + "api_op_GetAccountSummary.go", + "api_op_GetContextKeysForCustomPolicy.go", + "api_op_GetContextKeysForPrincipalPolicy.go", + "api_op_GetCredentialReport.go", + "api_op_GetGroup.go", + "api_op_GetGroupPolicy.go", + "api_op_GetInstanceProfile.go", + "api_op_GetLoginProfile.go", + "api_op_GetMFADevice.go", + "api_op_GetOpenIDConnectProvider.go", + "api_op_GetOrganizationsAccessReport.go", + "api_op_GetPolicy.go", + "api_op_GetPolicyVersion.go", + "api_op_GetRole.go", + "api_op_GetRolePolicy.go", + "api_op_GetSAMLProvider.go", + "api_op_GetSSHPublicKey.go", + "api_op_GetServerCertificate.go", + "api_op_GetServiceLastAccessedDetails.go", + "api_op_GetServiceLastAccessedDetailsWithEntities.go", + "api_op_GetServiceLinkedRoleDeletionStatus.go", + "api_op_GetUser.go", + "api_op_GetUserPolicy.go", + "api_op_ListAccessKeys.go", + "api_op_ListAccountAliases.go", + "api_op_ListAttachedGroupPolicies.go", + "api_op_ListAttachedRolePolicies.go", + "api_op_ListAttachedUserPolicies.go", + "api_op_ListEntitiesForPolicy.go", + "api_op_ListGroupPolicies.go", + "api_op_ListGroups.go", + "api_op_ListGroupsForUser.go", + "api_op_ListInstanceProfileTags.go", + "api_op_ListInstanceProfiles.go", + "api_op_ListInstanceProfilesForRole.go", + "api_op_ListMFADeviceTags.go", + "api_op_ListMFADevices.go", + "api_op_ListOpenIDConnectProviderTags.go", + "api_op_ListOpenIDConnectProviders.go", + "api_op_ListPolicies.go", + "api_op_ListPoliciesGrantingServiceAccess.go", + "api_op_ListPolicyTags.go", + "api_op_ListPolicyVersions.go", + "api_op_ListRolePolicies.go", + "api_op_ListRoleTags.go", + "api_op_ListRoles.go", + "api_op_ListSAMLProviderTags.go", + "api_op_ListSAMLProviders.go", + "api_op_ListSSHPublicKeys.go", + "api_op_ListServerCertificateTags.go", + "api_op_ListServerCertificates.go", + "api_op_ListServiceSpecificCredentials.go", + "api_op_ListSigningCertificates.go", + "api_op_ListUserPolicies.go", + "api_op_ListUserTags.go", + "api_op_ListUsers.go", + "api_op_ListVirtualMFADevices.go", + "api_op_PutGroupPolicy.go", + "api_op_PutRolePermissionsBoundary.go", + "api_op_PutRolePolicy.go", + "api_op_PutUserPermissionsBoundary.go", + "api_op_PutUserPolicy.go", + "api_op_RemoveClientIDFromOpenIDConnectProvider.go", + "api_op_RemoveRoleFromInstanceProfile.go", + "api_op_RemoveUserFromGroup.go", + "api_op_ResetServiceSpecificCredential.go", + "api_op_ResyncMFADevice.go", + "api_op_SetDefaultPolicyVersion.go", + "api_op_SetSecurityTokenServicePreferences.go", + "api_op_SimulateCustomPolicy.go", + "api_op_SimulatePrincipalPolicy.go", + "api_op_TagInstanceProfile.go", + "api_op_TagMFADevice.go", + "api_op_TagOpenIDConnectProvider.go", + "api_op_TagPolicy.go", + "api_op_TagRole.go", + "api_op_TagSAMLProvider.go", + "api_op_TagServerCertificate.go", + "api_op_TagUser.go", + "api_op_UntagInstanceProfile.go", + "api_op_UntagMFADevice.go", + "api_op_UntagOpenIDConnectProvider.go", + "api_op_UntagPolicy.go", + "api_op_UntagRole.go", + "api_op_UntagSAMLProvider.go", + "api_op_UntagServerCertificate.go", + "api_op_UntagUser.go", + "api_op_UpdateAccessKey.go", + "api_op_UpdateAccountPasswordPolicy.go", + "api_op_UpdateAssumeRolePolicy.go", + "api_op_UpdateGroup.go", + "api_op_UpdateLoginProfile.go", + "api_op_UpdateOpenIDConnectProviderThumbprint.go", + "api_op_UpdateRole.go", + "api_op_UpdateRoleDescription.go", + "api_op_UpdateSAMLProvider.go", + "api_op_UpdateSSHPublicKey.go", + "api_op_UpdateServerCertificate.go", + "api_op_UpdateServiceSpecificCredential.go", + "api_op_UpdateSigningCertificate.go", + "api_op_UpdateUser.go", + "api_op_UploadSSHPublicKey.go", + "api_op_UploadServerCertificate.go", + "api_op_UploadSigningCertificate.go", + "auth.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "endpoints_config_test.go", + "endpoints_test.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "options.go", + "protocol_test.go", + "serializers.go", + "snapshot_test.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/iam", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go new file mode 100644 index 0000000000000..bdaf059ce191b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package iam + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.31.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go new file mode 100644 index 0000000000000..88ab704b2d8af --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go @@ -0,0 +1,441 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver IAM endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "iam.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "iam-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "iam.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: false, + PartitionEndpoint: "aws-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-global", + }: endpoints.Endpoint{ + Hostname: "iam.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "aws-global", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "aws-global-fips", + }: endpoints.Endpoint{ + Hostname: "iam-fips.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "iam", + }: endpoints.Endpoint{ + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "iam", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "iam-fips", + }: endpoints.Endpoint{ + Hostname: "iam-fips.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "iam.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "iam-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "iam.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: false, + PartitionEndpoint: "aws-cn-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-cn-global", + }: endpoints.Endpoint{ + Hostname: "iam.cn-north-1.amazonaws.com.cn", + CredentialScope: endpoints.CredentialScope{ + Region: "cn-north-1", + }, + }, + }, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "iam.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: false, + PartitionEndpoint: "aws-iso-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-iso-global", + }: endpoints.Endpoint{ + Hostname: "iam.us-iso-east-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-east-1", + }, + }, + }, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "iam.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: false, + PartitionEndpoint: "aws-iso-b-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-iso-b-global", + }: endpoints.Endpoint{ + Hostname: "iam.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + }, + }, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "iam.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "iam.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "iam.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "iam-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "iam.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: false, + PartitionEndpoint: "aws-us-gov-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-us-gov-global", + }: endpoints.Endpoint{ + Hostname: "iam.us-gov.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + endpoints.EndpointKey{ + Region: "aws-us-gov-global", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam.us-gov.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + endpoints.EndpointKey{ + Region: "aws-us-gov-global-fips", + }: endpoints.Endpoint{ + Hostname: "iam.us-gov.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "iam-govcloud", + }: endpoints.Endpoint{ + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "iam-govcloud", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "iam.us-gov.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "iam-govcloud-fips", + }: endpoints.Endpoint{ + Hostname: "iam.us-gov.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + }, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go new file mode 100644 index 0000000000000..9dc917618cf0a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go @@ -0,0 +1,217 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" +) + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // The optional application specific identifier appended to the User-Agent header. + AppID string + + // This endpoint will be given as input to an EndpointResolverV2. It is used for + // providing a custom base endpoint that is subject to modifications by the + // processing EndpointResolverV2. + BaseEndpoint *string + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + // + // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a + // value for this field will likely prevent you from using any endpoint-related + // service features released after the introduction of EndpointResolverV2 and + // BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom + // endpoint, set the client option BaseEndpoint instead. + EndpointResolver EndpointResolver + + // Resolves the endpoint used for a particular service operation. This should be + // used over the deprecated EndpointResolver. + EndpointResolverV2 EndpointResolverV2 + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. If specified in an operation call's + // functional options with a value that is different than the constructed client's + // Options, the Client's Retryer will be wrapped to use the operation's specific + // RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. When creating a new API Clients this + // member will only be used if the Retryer Options member is nil. This value will + // be ignored if Retryer is not nil. Currently does not support per operation call + // overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. Currently does not support per operation call + // overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient + + // 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 +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} + +func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { + if schemeID == "aws.auth#sigv4" { + return getSigV4IdentityResolver(o) + } + if schemeID == "smithy.api#noAuth" { + return &smithyauth.AnonymousIdentityResolver{} + } + return nil +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for +// this field will likely prevent you from using any endpoint-related service +// features released after the introduction of EndpointResolverV2 and BaseEndpoint. +// To migrate an EndpointResolver implementation that uses a custom endpoint, set +// the client option BaseEndpoint instead. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +// WithEndpointResolverV2 returns a functional option for setting the Client's +// EndpointResolverV2 option. +func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { + return func(o *Options) { + o.EndpointResolverV2 = v + } +} + +func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { + if o.Credentials != nil { + return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} + } + return nil +} + +// WithSigV4SigningName applies an override to the authentication workflow to +// use the given signing name for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing name from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningName(name string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), + middleware.Before, + ) + }) + } +} + +// WithSigV4SigningRegion applies an override to the authentication workflow to +// use the given signing region for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing region from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningRegion(region string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), + middleware.Before, + ) + }) + } +} + +func ignoreAnonymousAuth(options *Options) { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { + options.Credentials = nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go new file mode 100644 index 0000000000000..fecaa9de0576b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go @@ -0,0 +1,13413 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/query" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "path" +) + +type awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider struct { +} + +func (*awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*AddClientIDToOpenIDConnectProviderInput) + _ = 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("AddClientIDToOpenIDConnectProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentAddClientIDToOpenIDConnectProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpAddRoleToInstanceProfile struct { +} + +func (*awsAwsquery_serializeOpAddRoleToInstanceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpAddRoleToInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*AddRoleToInstanceProfileInput) + _ = 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("AddRoleToInstanceProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentAddRoleToInstanceProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpAddUserToGroup struct { +} + +func (*awsAwsquery_serializeOpAddUserToGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpAddUserToGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*AddUserToGroupInput) + _ = 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("AddUserToGroup") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentAddUserToGroupInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpAttachGroupPolicy struct { +} + +func (*awsAwsquery_serializeOpAttachGroupPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpAttachGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*AttachGroupPolicyInput) + _ = 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("AttachGroupPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentAttachGroupPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpAttachRolePolicy struct { +} + +func (*awsAwsquery_serializeOpAttachRolePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpAttachRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*AttachRolePolicyInput) + _ = 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("AttachRolePolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentAttachRolePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpAttachUserPolicy struct { +} + +func (*awsAwsquery_serializeOpAttachUserPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpAttachUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*AttachUserPolicyInput) + _ = 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("AttachUserPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentAttachUserPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpChangePassword struct { +} + +func (*awsAwsquery_serializeOpChangePassword) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpChangePassword) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ChangePasswordInput) + _ = 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("ChangePassword") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentChangePasswordInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateAccessKey struct { +} + +func (*awsAwsquery_serializeOpCreateAccessKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateAccessKeyInput) + _ = 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("CreateAccessKey") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateAccessKeyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateAccountAlias struct { +} + +func (*awsAwsquery_serializeOpCreateAccountAlias) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateAccountAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateAccountAliasInput) + _ = 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("CreateAccountAlias") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateAccountAliasInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateGroup struct { +} + +func (*awsAwsquery_serializeOpCreateGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateGroupInput) + _ = 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("CreateGroup") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateGroupInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateInstanceProfile struct { +} + +func (*awsAwsquery_serializeOpCreateInstanceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateInstanceProfileInput) + _ = 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("CreateInstanceProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateInstanceProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateLoginProfile struct { +} + +func (*awsAwsquery_serializeOpCreateLoginProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateLoginProfileInput) + _ = 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("CreateLoginProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateLoginProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateOpenIDConnectProvider struct { +} + +func (*awsAwsquery_serializeOpCreateOpenIDConnectProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateOpenIDConnectProviderInput) + _ = 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("CreateOpenIDConnectProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateOpenIDConnectProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreatePolicy struct { +} + +func (*awsAwsquery_serializeOpCreatePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreatePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreatePolicyInput) + _ = 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("CreatePolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreatePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreatePolicyVersion struct { +} + +func (*awsAwsquery_serializeOpCreatePolicyVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreatePolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreatePolicyVersionInput) + _ = 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("CreatePolicyVersion") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreatePolicyVersionInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateRole struct { +} + +func (*awsAwsquery_serializeOpCreateRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateRoleInput) + _ = 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("CreateRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateSAMLProvider struct { +} + +func (*awsAwsquery_serializeOpCreateSAMLProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateSAMLProviderInput) + _ = 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("CreateSAMLProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateSAMLProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateServiceLinkedRole struct { +} + +func (*awsAwsquery_serializeOpCreateServiceLinkedRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateServiceLinkedRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateServiceLinkedRoleInput) + _ = 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("CreateServiceLinkedRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateServiceLinkedRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateServiceSpecificCredential struct { +} + +func (*awsAwsquery_serializeOpCreateServiceSpecificCredential) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateServiceSpecificCredentialInput) + _ = 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("CreateServiceSpecificCredential") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateServiceSpecificCredentialInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateUser struct { +} + +func (*awsAwsquery_serializeOpCreateUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateUserInput) + _ = 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("CreateUser") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateUserInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpCreateVirtualMFADevice struct { +} + +func (*awsAwsquery_serializeOpCreateVirtualMFADevice) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpCreateVirtualMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateVirtualMFADeviceInput) + _ = 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("CreateVirtualMFADevice") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentCreateVirtualMFADeviceInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeactivateMFADevice struct { +} + +func (*awsAwsquery_serializeOpDeactivateMFADevice) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeactivateMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeactivateMFADeviceInput) + _ = 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("DeactivateMFADevice") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeactivateMFADeviceInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteAccessKey struct { +} + +func (*awsAwsquery_serializeOpDeleteAccessKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteAccessKeyInput) + _ = 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("DeleteAccessKey") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteAccessKeyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteAccountAlias struct { +} + +func (*awsAwsquery_serializeOpDeleteAccountAlias) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteAccountAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteAccountAliasInput) + _ = 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("DeleteAccountAlias") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteAccountAliasInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteAccountPasswordPolicy struct { +} + +func (*awsAwsquery_serializeOpDeleteAccountPasswordPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteAccountPasswordPolicyInput) + _ = 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("DeleteAccountPasswordPolicy") + body.Key("Version").String("2010-05-08") + + 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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteGroup struct { +} + +func (*awsAwsquery_serializeOpDeleteGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteGroupInput) + _ = 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("DeleteGroup") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteGroupInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteGroupPolicy struct { +} + +func (*awsAwsquery_serializeOpDeleteGroupPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteGroupPolicyInput) + _ = 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("DeleteGroupPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteGroupPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteInstanceProfile struct { +} + +func (*awsAwsquery_serializeOpDeleteInstanceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteInstanceProfileInput) + _ = 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("DeleteInstanceProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteInstanceProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteLoginProfile struct { +} + +func (*awsAwsquery_serializeOpDeleteLoginProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteLoginProfileInput) + _ = 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("DeleteLoginProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteLoginProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteOpenIDConnectProvider struct { +} + +func (*awsAwsquery_serializeOpDeleteOpenIDConnectProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteOpenIDConnectProviderInput) + _ = 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("DeleteOpenIDConnectProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteOpenIDConnectProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeletePolicy struct { +} + +func (*awsAwsquery_serializeOpDeletePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeletePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeletePolicyInput) + _ = 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("DeletePolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeletePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeletePolicyVersion struct { +} + +func (*awsAwsquery_serializeOpDeletePolicyVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeletePolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeletePolicyVersionInput) + _ = 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("DeletePolicyVersion") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeletePolicyVersionInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteRole struct { +} + +func (*awsAwsquery_serializeOpDeleteRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteRoleInput) + _ = 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("DeleteRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteRolePermissionsBoundary struct { +} + +func (*awsAwsquery_serializeOpDeleteRolePermissionsBoundary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteRolePermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteRolePermissionsBoundaryInput) + _ = 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("DeleteRolePermissionsBoundary") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteRolePermissionsBoundaryInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteRolePolicy struct { +} + +func (*awsAwsquery_serializeOpDeleteRolePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteRolePolicyInput) + _ = 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("DeleteRolePolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteRolePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteSAMLProvider struct { +} + +func (*awsAwsquery_serializeOpDeleteSAMLProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteSAMLProviderInput) + _ = 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("DeleteSAMLProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteSAMLProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteServerCertificate struct { +} + +func (*awsAwsquery_serializeOpDeleteServerCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteServerCertificateInput) + _ = 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("DeleteServerCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteServerCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteServiceLinkedRole struct { +} + +func (*awsAwsquery_serializeOpDeleteServiceLinkedRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteServiceLinkedRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteServiceLinkedRoleInput) + _ = 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("DeleteServiceLinkedRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteServiceLinkedRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteServiceSpecificCredential struct { +} + +func (*awsAwsquery_serializeOpDeleteServiceSpecificCredential) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteServiceSpecificCredentialInput) + _ = 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("DeleteServiceSpecificCredential") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteServiceSpecificCredentialInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteSigningCertificate struct { +} + +func (*awsAwsquery_serializeOpDeleteSigningCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteSigningCertificateInput) + _ = 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("DeleteSigningCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteSigningCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteSSHPublicKey struct { +} + +func (*awsAwsquery_serializeOpDeleteSSHPublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteSSHPublicKeyInput) + _ = 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("DeleteSSHPublicKey") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteSSHPublicKeyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteUser struct { +} + +func (*awsAwsquery_serializeOpDeleteUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteUserInput) + _ = 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("DeleteUser") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteUserInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteUserPermissionsBoundary struct { +} + +func (*awsAwsquery_serializeOpDeleteUserPermissionsBoundary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteUserPermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteUserPermissionsBoundaryInput) + _ = 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("DeleteUserPermissionsBoundary") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteUserPermissionsBoundaryInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteUserPolicy struct { +} + +func (*awsAwsquery_serializeOpDeleteUserPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteUserPolicyInput) + _ = 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("DeleteUserPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteUserPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDeleteVirtualMFADevice struct { +} + +func (*awsAwsquery_serializeOpDeleteVirtualMFADevice) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteVirtualMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DeleteVirtualMFADeviceInput) + _ = 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("DeleteVirtualMFADevice") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDeleteVirtualMFADeviceInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDetachGroupPolicy struct { +} + +func (*awsAwsquery_serializeOpDetachGroupPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDetachGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DetachGroupPolicyInput) + _ = 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("DetachGroupPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDetachGroupPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDetachRolePolicy struct { +} + +func (*awsAwsquery_serializeOpDetachRolePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDetachRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DetachRolePolicyInput) + _ = 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("DetachRolePolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDetachRolePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDetachUserPolicy struct { +} + +func (*awsAwsquery_serializeOpDetachUserPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDetachUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*DetachUserPolicyInput) + _ = 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("DetachUserPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentDetachUserPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpEnableMFADevice struct { +} + +func (*awsAwsquery_serializeOpEnableMFADevice) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpEnableMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*EnableMFADeviceInput) + _ = 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("EnableMFADevice") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentEnableMFADeviceInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGenerateCredentialReport struct { +} + +func (*awsAwsquery_serializeOpGenerateCredentialReport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGenerateCredentialReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GenerateCredentialReportInput) + _ = 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("GenerateCredentialReport") + body.Key("Version").String("2010-05-08") + + 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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGenerateOrganizationsAccessReport struct { +} + +func (*awsAwsquery_serializeOpGenerateOrganizationsAccessReport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGenerateOrganizationsAccessReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GenerateOrganizationsAccessReportInput) + _ = 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("GenerateOrganizationsAccessReport") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGenerateOrganizationsAccessReportInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGenerateServiceLastAccessedDetails struct { +} + +func (*awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GenerateServiceLastAccessedDetailsInput) + _ = 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("GenerateServiceLastAccessedDetails") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGenerateServiceLastAccessedDetailsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetAccessKeyLastUsed struct { +} + +func (*awsAwsquery_serializeOpGetAccessKeyLastUsed) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetAccessKeyLastUsed) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetAccessKeyLastUsedInput) + _ = 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("GetAccessKeyLastUsed") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetAccessKeyLastUsedInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetAccountAuthorizationDetails struct { +} + +func (*awsAwsquery_serializeOpGetAccountAuthorizationDetails) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetAccountAuthorizationDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetAccountAuthorizationDetailsInput) + _ = 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("GetAccountAuthorizationDetails") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetAccountAuthorizationDetailsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetAccountPasswordPolicy struct { +} + +func (*awsAwsquery_serializeOpGetAccountPasswordPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetAccountPasswordPolicyInput) + _ = 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("GetAccountPasswordPolicy") + body.Key("Version").String("2010-05-08") + + 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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetAccountSummary struct { +} + +func (*awsAwsquery_serializeOpGetAccountSummary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetAccountSummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetAccountSummaryInput) + _ = 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("GetAccountSummary") + body.Key("Version").String("2010-05-08") + + 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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetContextKeysForCustomPolicy struct { +} + +func (*awsAwsquery_serializeOpGetContextKeysForCustomPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetContextKeysForCustomPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetContextKeysForCustomPolicyInput) + _ = 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("GetContextKeysForCustomPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetContextKeysForCustomPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy struct { +} + +func (*awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetContextKeysForPrincipalPolicyInput) + _ = 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("GetContextKeysForPrincipalPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetContextKeysForPrincipalPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetCredentialReport struct { +} + +func (*awsAwsquery_serializeOpGetCredentialReport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetCredentialReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetCredentialReportInput) + _ = 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("GetCredentialReport") + body.Key("Version").String("2010-05-08") + + 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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetGroup struct { +} + +func (*awsAwsquery_serializeOpGetGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetGroupInput) + _ = 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("GetGroup") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetGroupInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetGroupPolicy struct { +} + +func (*awsAwsquery_serializeOpGetGroupPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetGroupPolicyInput) + _ = 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("GetGroupPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetGroupPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetInstanceProfile struct { +} + +func (*awsAwsquery_serializeOpGetInstanceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetInstanceProfileInput) + _ = 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("GetInstanceProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetInstanceProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetLoginProfile struct { +} + +func (*awsAwsquery_serializeOpGetLoginProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetLoginProfileInput) + _ = 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("GetLoginProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetLoginProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetMFADevice struct { +} + +func (*awsAwsquery_serializeOpGetMFADevice) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetMFADeviceInput) + _ = 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("GetMFADevice") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetMFADeviceInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetOpenIDConnectProvider struct { +} + +func (*awsAwsquery_serializeOpGetOpenIDConnectProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetOpenIDConnectProviderInput) + _ = 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("GetOpenIDConnectProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetOpenIDConnectProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetOrganizationsAccessReport struct { +} + +func (*awsAwsquery_serializeOpGetOrganizationsAccessReport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetOrganizationsAccessReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetOrganizationsAccessReportInput) + _ = 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("GetOrganizationsAccessReport") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetOrganizationsAccessReportInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetPolicy struct { +} + +func (*awsAwsquery_serializeOpGetPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetPolicyInput) + _ = 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("GetPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetPolicyVersion struct { +} + +func (*awsAwsquery_serializeOpGetPolicyVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetPolicyVersionInput) + _ = 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("GetPolicyVersion") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetPolicyVersionInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetRole struct { +} + +func (*awsAwsquery_serializeOpGetRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetRoleInput) + _ = 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("GetRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetRolePolicy struct { +} + +func (*awsAwsquery_serializeOpGetRolePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetRolePolicyInput) + _ = 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("GetRolePolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetRolePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetSAMLProvider struct { +} + +func (*awsAwsquery_serializeOpGetSAMLProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetSAMLProviderInput) + _ = 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("GetSAMLProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetSAMLProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetServerCertificate struct { +} + +func (*awsAwsquery_serializeOpGetServerCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetServerCertificateInput) + _ = 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("GetServerCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetServerCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetServiceLastAccessedDetails struct { +} + +func (*awsAwsquery_serializeOpGetServiceLastAccessedDetails) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetServiceLastAccessedDetailsInput) + _ = 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("GetServiceLastAccessedDetails") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetServiceLastAccessedDetailsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities struct { +} + +func (*awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetServiceLastAccessedDetailsWithEntitiesInput) + _ = 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("GetServiceLastAccessedDetailsWithEntities") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetServiceLastAccessedDetailsWithEntitiesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus struct { +} + +func (*awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetServiceLinkedRoleDeletionStatusInput) + _ = 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("GetServiceLinkedRoleDeletionStatus") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetServiceLinkedRoleDeletionStatusInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetSSHPublicKey struct { +} + +func (*awsAwsquery_serializeOpGetSSHPublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetSSHPublicKeyInput) + _ = 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("GetSSHPublicKey") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetSSHPublicKeyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetUser struct { +} + +func (*awsAwsquery_serializeOpGetUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetUserInput) + _ = 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("GetUser") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetUserInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpGetUserPolicy struct { +} + +func (*awsAwsquery_serializeOpGetUserPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*GetUserPolicyInput) + _ = 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("GetUserPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentGetUserPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListAccessKeys struct { +} + +func (*awsAwsquery_serializeOpListAccessKeys) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListAccessKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListAccessKeysInput) + _ = 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("ListAccessKeys") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListAccessKeysInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListAccountAliases struct { +} + +func (*awsAwsquery_serializeOpListAccountAliases) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListAccountAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListAccountAliasesInput) + _ = 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("ListAccountAliases") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListAccountAliasesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListAttachedGroupPolicies struct { +} + +func (*awsAwsquery_serializeOpListAttachedGroupPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListAttachedGroupPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListAttachedGroupPoliciesInput) + _ = 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("ListAttachedGroupPolicies") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListAttachedGroupPoliciesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListAttachedRolePolicies struct { +} + +func (*awsAwsquery_serializeOpListAttachedRolePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListAttachedRolePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListAttachedRolePoliciesInput) + _ = 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("ListAttachedRolePolicies") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListAttachedRolePoliciesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListAttachedUserPolicies struct { +} + +func (*awsAwsquery_serializeOpListAttachedUserPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListAttachedUserPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListAttachedUserPoliciesInput) + _ = 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("ListAttachedUserPolicies") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListAttachedUserPoliciesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListEntitiesForPolicy struct { +} + +func (*awsAwsquery_serializeOpListEntitiesForPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListEntitiesForPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListEntitiesForPolicyInput) + _ = 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("ListEntitiesForPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListEntitiesForPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListGroupPolicies struct { +} + +func (*awsAwsquery_serializeOpListGroupPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListGroupPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListGroupPoliciesInput) + _ = 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("ListGroupPolicies") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListGroupPoliciesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListGroups struct { +} + +func (*awsAwsquery_serializeOpListGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListGroupsInput) + _ = 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("ListGroups") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListGroupsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListGroupsForUser struct { +} + +func (*awsAwsquery_serializeOpListGroupsForUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListGroupsForUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListGroupsForUserInput) + _ = 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("ListGroupsForUser") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListGroupsForUserInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListInstanceProfiles struct { +} + +func (*awsAwsquery_serializeOpListInstanceProfiles) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListInstanceProfiles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListInstanceProfilesInput) + _ = 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("ListInstanceProfiles") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListInstanceProfilesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListInstanceProfilesForRole struct { +} + +func (*awsAwsquery_serializeOpListInstanceProfilesForRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListInstanceProfilesForRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListInstanceProfilesForRoleInput) + _ = 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("ListInstanceProfilesForRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListInstanceProfilesForRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListInstanceProfileTags struct { +} + +func (*awsAwsquery_serializeOpListInstanceProfileTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListInstanceProfileTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListInstanceProfileTagsInput) + _ = 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("ListInstanceProfileTags") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListInstanceProfileTagsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListMFADevices struct { +} + +func (*awsAwsquery_serializeOpListMFADevices) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListMFADevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListMFADevicesInput) + _ = 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("ListMFADevices") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListMFADevicesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListMFADeviceTags struct { +} + +func (*awsAwsquery_serializeOpListMFADeviceTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListMFADeviceTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListMFADeviceTagsInput) + _ = 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("ListMFADeviceTags") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListMFADeviceTagsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListOpenIDConnectProviders struct { +} + +func (*awsAwsquery_serializeOpListOpenIDConnectProviders) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListOpenIDConnectProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListOpenIDConnectProvidersInput) + _ = 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("ListOpenIDConnectProviders") + body.Key("Version").String("2010-05-08") + + 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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListOpenIDConnectProviderTags struct { +} + +func (*awsAwsquery_serializeOpListOpenIDConnectProviderTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListOpenIDConnectProviderTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListOpenIDConnectProviderTagsInput) + _ = 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("ListOpenIDConnectProviderTags") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListOpenIDConnectProviderTagsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListPolicies struct { +} + +func (*awsAwsquery_serializeOpListPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListPoliciesInput) + _ = 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("ListPolicies") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListPoliciesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListPoliciesGrantingServiceAccess struct { +} + +func (*awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListPoliciesGrantingServiceAccessInput) + _ = 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("ListPoliciesGrantingServiceAccess") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListPoliciesGrantingServiceAccessInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListPolicyTags struct { +} + +func (*awsAwsquery_serializeOpListPolicyTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListPolicyTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListPolicyTagsInput) + _ = 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("ListPolicyTags") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListPolicyTagsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListPolicyVersions struct { +} + +func (*awsAwsquery_serializeOpListPolicyVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListPolicyVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListPolicyVersionsInput) + _ = 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("ListPolicyVersions") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListPolicyVersionsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListRolePolicies struct { +} + +func (*awsAwsquery_serializeOpListRolePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListRolePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListRolePoliciesInput) + _ = 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("ListRolePolicies") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListRolePoliciesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListRoles struct { +} + +func (*awsAwsquery_serializeOpListRoles) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListRolesInput) + _ = 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("ListRoles") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListRolesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListRoleTags struct { +} + +func (*awsAwsquery_serializeOpListRoleTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListRoleTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListRoleTagsInput) + _ = 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("ListRoleTags") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListRoleTagsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListSAMLProviders struct { +} + +func (*awsAwsquery_serializeOpListSAMLProviders) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListSAMLProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListSAMLProvidersInput) + _ = 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("ListSAMLProviders") + body.Key("Version").String("2010-05-08") + + 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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListSAMLProviderTags struct { +} + +func (*awsAwsquery_serializeOpListSAMLProviderTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListSAMLProviderTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListSAMLProviderTagsInput) + _ = 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("ListSAMLProviderTags") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListSAMLProviderTagsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListServerCertificates struct { +} + +func (*awsAwsquery_serializeOpListServerCertificates) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListServerCertificates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListServerCertificatesInput) + _ = 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("ListServerCertificates") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListServerCertificatesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListServerCertificateTags struct { +} + +func (*awsAwsquery_serializeOpListServerCertificateTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListServerCertificateTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListServerCertificateTagsInput) + _ = 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("ListServerCertificateTags") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListServerCertificateTagsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListServiceSpecificCredentials struct { +} + +func (*awsAwsquery_serializeOpListServiceSpecificCredentials) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListServiceSpecificCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListServiceSpecificCredentialsInput) + _ = 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("ListServiceSpecificCredentials") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListServiceSpecificCredentialsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListSigningCertificates struct { +} + +func (*awsAwsquery_serializeOpListSigningCertificates) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListSigningCertificates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListSigningCertificatesInput) + _ = 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("ListSigningCertificates") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListSigningCertificatesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListSSHPublicKeys struct { +} + +func (*awsAwsquery_serializeOpListSSHPublicKeys) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListSSHPublicKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListSSHPublicKeysInput) + _ = 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("ListSSHPublicKeys") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListSSHPublicKeysInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListUserPolicies struct { +} + +func (*awsAwsquery_serializeOpListUserPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListUserPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListUserPoliciesInput) + _ = 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("ListUserPolicies") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListUserPoliciesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListUsers struct { +} + +func (*awsAwsquery_serializeOpListUsers) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListUsersInput) + _ = 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("ListUsers") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListUsersInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListUserTags struct { +} + +func (*awsAwsquery_serializeOpListUserTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListUserTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListUserTagsInput) + _ = 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("ListUserTags") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListUserTagsInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpListVirtualMFADevices struct { +} + +func (*awsAwsquery_serializeOpListVirtualMFADevices) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListVirtualMFADevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListVirtualMFADevicesInput) + _ = 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("ListVirtualMFADevices") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentListVirtualMFADevicesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpPutGroupPolicy struct { +} + +func (*awsAwsquery_serializeOpPutGroupPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpPutGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*PutGroupPolicyInput) + _ = 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("PutGroupPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentPutGroupPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpPutRolePermissionsBoundary struct { +} + +func (*awsAwsquery_serializeOpPutRolePermissionsBoundary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpPutRolePermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*PutRolePermissionsBoundaryInput) + _ = 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("PutRolePermissionsBoundary") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentPutRolePermissionsBoundaryInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpPutRolePolicy struct { +} + +func (*awsAwsquery_serializeOpPutRolePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpPutRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*PutRolePolicyInput) + _ = 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("PutRolePolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentPutRolePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpPutUserPermissionsBoundary struct { +} + +func (*awsAwsquery_serializeOpPutUserPermissionsBoundary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpPutUserPermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*PutUserPermissionsBoundaryInput) + _ = 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("PutUserPermissionsBoundary") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentPutUserPermissionsBoundaryInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpPutUserPolicy struct { +} + +func (*awsAwsquery_serializeOpPutUserPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpPutUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*PutUserPolicyInput) + _ = 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("PutUserPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentPutUserPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider struct { +} + +func (*awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*RemoveClientIDFromOpenIDConnectProviderInput) + _ = 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("RemoveClientIDFromOpenIDConnectProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentRemoveClientIDFromOpenIDConnectProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpRemoveRoleFromInstanceProfile struct { +} + +func (*awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*RemoveRoleFromInstanceProfileInput) + _ = 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("RemoveRoleFromInstanceProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentRemoveRoleFromInstanceProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpRemoveUserFromGroup struct { +} + +func (*awsAwsquery_serializeOpRemoveUserFromGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpRemoveUserFromGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*RemoveUserFromGroupInput) + _ = 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("RemoveUserFromGroup") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentRemoveUserFromGroupInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpResetServiceSpecificCredential struct { +} + +func (*awsAwsquery_serializeOpResetServiceSpecificCredential) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpResetServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ResetServiceSpecificCredentialInput) + _ = 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("ResetServiceSpecificCredential") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentResetServiceSpecificCredentialInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpResyncMFADevice struct { +} + +func (*awsAwsquery_serializeOpResyncMFADevice) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpResyncMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ResyncMFADeviceInput) + _ = 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("ResyncMFADevice") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentResyncMFADeviceInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpSetDefaultPolicyVersion struct { +} + +func (*awsAwsquery_serializeOpSetDefaultPolicyVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpSetDefaultPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*SetDefaultPolicyVersionInput) + _ = 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("SetDefaultPolicyVersion") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentSetDefaultPolicyVersionInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpSetSecurityTokenServicePreferences struct { +} + +func (*awsAwsquery_serializeOpSetSecurityTokenServicePreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpSetSecurityTokenServicePreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*SetSecurityTokenServicePreferencesInput) + _ = 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("SetSecurityTokenServicePreferences") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentSetSecurityTokenServicePreferencesInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpSimulateCustomPolicy struct { +} + +func (*awsAwsquery_serializeOpSimulateCustomPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpSimulateCustomPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*SimulateCustomPolicyInput) + _ = 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("SimulateCustomPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentSimulateCustomPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpSimulatePrincipalPolicy struct { +} + +func (*awsAwsquery_serializeOpSimulatePrincipalPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpSimulatePrincipalPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*SimulatePrincipalPolicyInput) + _ = 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("SimulatePrincipalPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentSimulatePrincipalPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpTagInstanceProfile struct { +} + +func (*awsAwsquery_serializeOpTagInstanceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpTagInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*TagInstanceProfileInput) + _ = 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("TagInstanceProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentTagInstanceProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpTagMFADevice struct { +} + +func (*awsAwsquery_serializeOpTagMFADevice) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpTagMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*TagMFADeviceInput) + _ = 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("TagMFADevice") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentTagMFADeviceInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpTagOpenIDConnectProvider struct { +} + +func (*awsAwsquery_serializeOpTagOpenIDConnectProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpTagOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*TagOpenIDConnectProviderInput) + _ = 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("TagOpenIDConnectProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentTagOpenIDConnectProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpTagPolicy struct { +} + +func (*awsAwsquery_serializeOpTagPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpTagPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*TagPolicyInput) + _ = 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("TagPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentTagPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpTagRole struct { +} + +func (*awsAwsquery_serializeOpTagRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpTagRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*TagRoleInput) + _ = 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("TagRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentTagRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpTagSAMLProvider struct { +} + +func (*awsAwsquery_serializeOpTagSAMLProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpTagSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*TagSAMLProviderInput) + _ = 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("TagSAMLProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentTagSAMLProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpTagServerCertificate struct { +} + +func (*awsAwsquery_serializeOpTagServerCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpTagServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*TagServerCertificateInput) + _ = 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("TagServerCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentTagServerCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpTagUser struct { +} + +func (*awsAwsquery_serializeOpTagUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpTagUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*TagUserInput) + _ = 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("TagUser") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentTagUserInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUntagInstanceProfile struct { +} + +func (*awsAwsquery_serializeOpUntagInstanceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUntagInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UntagInstanceProfileInput) + _ = 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("UntagInstanceProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUntagInstanceProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUntagMFADevice struct { +} + +func (*awsAwsquery_serializeOpUntagMFADevice) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUntagMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UntagMFADeviceInput) + _ = 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("UntagMFADevice") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUntagMFADeviceInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUntagOpenIDConnectProvider struct { +} + +func (*awsAwsquery_serializeOpUntagOpenIDConnectProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUntagOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UntagOpenIDConnectProviderInput) + _ = 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("UntagOpenIDConnectProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUntagOpenIDConnectProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUntagPolicy struct { +} + +func (*awsAwsquery_serializeOpUntagPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUntagPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UntagPolicyInput) + _ = 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("UntagPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUntagPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUntagRole struct { +} + +func (*awsAwsquery_serializeOpUntagRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUntagRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UntagRoleInput) + _ = 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("UntagRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUntagRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUntagSAMLProvider struct { +} + +func (*awsAwsquery_serializeOpUntagSAMLProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUntagSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UntagSAMLProviderInput) + _ = 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("UntagSAMLProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUntagSAMLProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUntagServerCertificate struct { +} + +func (*awsAwsquery_serializeOpUntagServerCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUntagServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UntagServerCertificateInput) + _ = 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("UntagServerCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUntagServerCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUntagUser struct { +} + +func (*awsAwsquery_serializeOpUntagUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUntagUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UntagUserInput) + _ = 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("UntagUser") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUntagUserInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateAccessKey struct { +} + +func (*awsAwsquery_serializeOpUpdateAccessKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateAccessKeyInput) + _ = 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("UpdateAccessKey") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateAccessKeyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateAccountPasswordPolicy struct { +} + +func (*awsAwsquery_serializeOpUpdateAccountPasswordPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateAccountPasswordPolicyInput) + _ = 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("UpdateAccountPasswordPolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateAccountPasswordPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateAssumeRolePolicy struct { +} + +func (*awsAwsquery_serializeOpUpdateAssumeRolePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateAssumeRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateAssumeRolePolicyInput) + _ = 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("UpdateAssumeRolePolicy") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateAssumeRolePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateGroup struct { +} + +func (*awsAwsquery_serializeOpUpdateGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateGroupInput) + _ = 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("UpdateGroup") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateGroupInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateLoginProfile struct { +} + +func (*awsAwsquery_serializeOpUpdateLoginProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateLoginProfileInput) + _ = 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("UpdateLoginProfile") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateLoginProfileInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint struct { +} + +func (*awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateOpenIDConnectProviderThumbprintInput) + _ = 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("UpdateOpenIDConnectProviderThumbprint") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateOpenIDConnectProviderThumbprintInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateRole struct { +} + +func (*awsAwsquery_serializeOpUpdateRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateRoleInput) + _ = 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("UpdateRole") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateRoleInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateRoleDescription struct { +} + +func (*awsAwsquery_serializeOpUpdateRoleDescription) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateRoleDescription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateRoleDescriptionInput) + _ = 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("UpdateRoleDescription") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateRoleDescriptionInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateSAMLProvider struct { +} + +func (*awsAwsquery_serializeOpUpdateSAMLProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateSAMLProviderInput) + _ = 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("UpdateSAMLProvider") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateSAMLProviderInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateServerCertificate struct { +} + +func (*awsAwsquery_serializeOpUpdateServerCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateServerCertificateInput) + _ = 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("UpdateServerCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateServerCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateServiceSpecificCredential struct { +} + +func (*awsAwsquery_serializeOpUpdateServiceSpecificCredential) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateServiceSpecificCredentialInput) + _ = 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("UpdateServiceSpecificCredential") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateServiceSpecificCredentialInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateSigningCertificate struct { +} + +func (*awsAwsquery_serializeOpUpdateSigningCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateSigningCertificateInput) + _ = 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("UpdateSigningCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateSigningCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateSSHPublicKey struct { +} + +func (*awsAwsquery_serializeOpUpdateSSHPublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateSSHPublicKeyInput) + _ = 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("UpdateSSHPublicKey") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateSSHPublicKeyInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUpdateUser struct { +} + +func (*awsAwsquery_serializeOpUpdateUser) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateUserInput) + _ = 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("UpdateUser") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUpdateUserInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUploadServerCertificate struct { +} + +func (*awsAwsquery_serializeOpUploadServerCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUploadServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UploadServerCertificateInput) + _ = 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("UploadServerCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUploadServerCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUploadSigningCertificate struct { +} + +func (*awsAwsquery_serializeOpUploadSigningCertificate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUploadSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UploadSigningCertificateInput) + _ = 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("UploadSigningCertificate") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUploadSigningCertificateInput(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 + + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpUploadSSHPublicKey struct { +} + +func (*awsAwsquery_serializeOpUploadSSHPublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpUploadSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UploadSSHPublicKeyInput) + _ = 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("UploadSSHPublicKey") + body.Key("Version").String("2010-05-08") + + if err := awsAwsquery_serializeOpDocumentUploadSSHPublicKeyInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsAwsquery_serializeDocumentActionNameListType(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_serializeDocumentClientIDListType(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_serializeDocumentContextEntry(v *types.ContextEntry, value query.Value) error { + object := value.Object() + _ = object + + if v.ContextKeyName != nil { + objectKey := object.Key("ContextKeyName") + objectKey.String(*v.ContextKeyName) + } + + if len(v.ContextKeyType) > 0 { + objectKey := object.Key("ContextKeyType") + objectKey.String(string(v.ContextKeyType)) + } + + if v.ContextKeyValues != nil { + objectKey := object.Key("ContextKeyValues") + if err := awsAwsquery_serializeDocumentContextKeyValueListType(v.ContextKeyValues, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeDocumentContextEntryListType(v []types.ContextEntry, value query.Value) error { + array := value.Array("member") + + for i := range v { + av := array.Value() + if err := awsAwsquery_serializeDocumentContextEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsquery_serializeDocumentContextKeyValueListType(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_serializeDocumentEntityListType(v []types.EntityType, value query.Value) error { + array := value.Array("member") + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsquery_serializeDocumentResourceNameListType(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_serializeDocumentServiceNamespaceListType(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_serializeDocumentSimulationPolicyListType(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_serializeDocumentTag(v *types.Tag, value query.Value) error { + object := value.Object() + _ = object + + if v.Key != nil { + objectKey := object.Key("Key") + objectKey.String(*v.Key) + } + + if v.Value != nil { + objectKey := object.Key("Value") + objectKey.String(*v.Value) + } + + return nil +} + +func awsAwsquery_serializeDocumentTagKeyListType(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_serializeDocumentTagListType(v []types.Tag, value query.Value) error { + array := value.Array("member") + + for i := range v { + av := array.Value() + if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsquery_serializeDocumentThumbprintListType(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_serializeOpDocumentAddClientIDToOpenIDConnectProviderInput(v *AddClientIDToOpenIDConnectProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ClientID != nil { + objectKey := object.Key("ClientID") + objectKey.String(*v.ClientID) + } + + if v.OpenIDConnectProviderArn != nil { + objectKey := object.Key("OpenIDConnectProviderArn") + objectKey.String(*v.OpenIDConnectProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentAddRoleToInstanceProfileInput(v *AddRoleToInstanceProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceProfileName != nil { + objectKey := object.Key("InstanceProfileName") + objectKey.String(*v.InstanceProfileName) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentAddUserToGroupInput(v *AddUserToGroupInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentAttachGroupPolicyInput(v *AttachGroupPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentAttachRolePolicyInput(v *AttachRolePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentAttachUserPolicyInput(v *AttachUserPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentChangePasswordInput(v *ChangePasswordInput, value query.Value) error { + object := value.Object() + _ = object + + if v.NewPassword != nil { + objectKey := object.Key("NewPassword") + objectKey.String(*v.NewPassword) + } + + if v.OldPassword != nil { + objectKey := object.Key("OldPassword") + objectKey.String(*v.OldPassword) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateAccessKeyInput(v *CreateAccessKeyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateAccountAliasInput(v *CreateAccountAliasInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AccountAlias != nil { + objectKey := object.Key("AccountAlias") + objectKey.String(*v.AccountAlias) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateGroupInput(v *CreateGroupInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.Path != nil { + objectKey := object.Key("Path") + objectKey.String(*v.Path) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateInstanceProfileInput(v *CreateInstanceProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceProfileName != nil { + objectKey := object.Key("InstanceProfileName") + objectKey.String(*v.InstanceProfileName) + } + + if v.Path != nil { + objectKey := object.Key("Path") + objectKey.String(*v.Path) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateLoginProfileInput(v *CreateLoginProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Password != nil { + objectKey := object.Key("Password") + objectKey.String(*v.Password) + } + + if v.PasswordResetRequired { + objectKey := object.Key("PasswordResetRequired") + objectKey.Boolean(v.PasswordResetRequired) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateOpenIDConnectProviderInput(v *CreateOpenIDConnectProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ClientIDList != nil { + objectKey := object.Key("ClientIDList") + if err := awsAwsquery_serializeDocumentClientIDListType(v.ClientIDList, objectKey); err != nil { + return err + } + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + if v.ThumbprintList != nil { + objectKey := object.Key("ThumbprintList") + if err := awsAwsquery_serializeDocumentThumbprintListType(v.ThumbprintList, objectKey); err != nil { + return err + } + } + + if v.Url != nil { + objectKey := object.Key("Url") + objectKey.String(*v.Url) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreatePolicyInput(v *CreatePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Description != nil { + objectKey := object.Key("Description") + objectKey.String(*v.Description) + } + + if v.Path != nil { + objectKey := object.Key("Path") + objectKey.String(*v.Path) + } + + if v.PolicyDocument != nil { + objectKey := object.Key("PolicyDocument") + objectKey.String(*v.PolicyDocument) + } + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreatePolicyVersionInput(v *CreatePolicyVersionInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.PolicyDocument != nil { + objectKey := object.Key("PolicyDocument") + objectKey.String(*v.PolicyDocument) + } + + if v.SetAsDefault { + objectKey := object.Key("SetAsDefault") + objectKey.Boolean(v.SetAsDefault) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateRoleInput(v *CreateRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AssumeRolePolicyDocument != nil { + objectKey := object.Key("AssumeRolePolicyDocument") + objectKey.String(*v.AssumeRolePolicyDocument) + } + + if v.Description != nil { + objectKey := object.Key("Description") + objectKey.String(*v.Description) + } + + if v.MaxSessionDuration != nil { + objectKey := object.Key("MaxSessionDuration") + objectKey.Integer(*v.MaxSessionDuration) + } + + if v.Path != nil { + objectKey := object.Key("Path") + objectKey.String(*v.Path) + } + + if v.PermissionsBoundary != nil { + objectKey := object.Key("PermissionsBoundary") + objectKey.String(*v.PermissionsBoundary) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateSAMLProviderInput(v *CreateSAMLProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Name != nil { + objectKey := object.Key("Name") + objectKey.String(*v.Name) + } + + if v.SAMLMetadataDocument != nil { + objectKey := object.Key("SAMLMetadataDocument") + objectKey.String(*v.SAMLMetadataDocument) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateServiceLinkedRoleInput(v *CreateServiceLinkedRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AWSServiceName != nil { + objectKey := object.Key("AWSServiceName") + objectKey.String(*v.AWSServiceName) + } + + if v.CustomSuffix != nil { + objectKey := object.Key("CustomSuffix") + objectKey.String(*v.CustomSuffix) + } + + if v.Description != nil { + objectKey := object.Key("Description") + objectKey.String(*v.Description) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateServiceSpecificCredentialInput(v *CreateServiceSpecificCredentialInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServiceName != nil { + objectKey := object.Key("ServiceName") + objectKey.String(*v.ServiceName) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateUserInput(v *CreateUserInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Path != nil { + objectKey := object.Key("Path") + objectKey.String(*v.Path) + } + + if v.PermissionsBoundary != nil { + objectKey := object.Key("PermissionsBoundary") + objectKey.String(*v.PermissionsBoundary) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentCreateVirtualMFADeviceInput(v *CreateVirtualMFADeviceInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Path != nil { + objectKey := object.Key("Path") + objectKey.String(*v.Path) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + if v.VirtualMFADeviceName != nil { + objectKey := object.Key("VirtualMFADeviceName") + objectKey.String(*v.VirtualMFADeviceName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeactivateMFADeviceInput(v *DeactivateMFADeviceInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SerialNumber != nil { + objectKey := object.Key("SerialNumber") + objectKey.String(*v.SerialNumber) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteAccessKeyInput(v *DeleteAccessKeyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AccessKeyId != nil { + objectKey := object.Key("AccessKeyId") + objectKey.String(*v.AccessKeyId) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteAccountAliasInput(v *DeleteAccountAliasInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AccountAlias != nil { + objectKey := object.Key("AccountAlias") + objectKey.String(*v.AccountAlias) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteGroupInput(v *DeleteGroupInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteGroupPolicyInput(v *DeleteGroupPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteInstanceProfileInput(v *DeleteInstanceProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceProfileName != nil { + objectKey := object.Key("InstanceProfileName") + objectKey.String(*v.InstanceProfileName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteLoginProfileInput(v *DeleteLoginProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteOpenIDConnectProviderInput(v *DeleteOpenIDConnectProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.OpenIDConnectProviderArn != nil { + objectKey := object.Key("OpenIDConnectProviderArn") + objectKey.String(*v.OpenIDConnectProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeletePolicyInput(v *DeletePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeletePolicyVersionInput(v *DeletePolicyVersionInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.VersionId != nil { + objectKey := object.Key("VersionId") + objectKey.String(*v.VersionId) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteRoleInput(v *DeleteRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteRolePermissionsBoundaryInput(v *DeleteRolePermissionsBoundaryInput, value query.Value) error { + object := value.Object() + _ = object + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteRolePolicyInput(v *DeleteRolePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteSAMLProviderInput(v *DeleteSAMLProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SAMLProviderArn != nil { + objectKey := object.Key("SAMLProviderArn") + objectKey.String(*v.SAMLProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteServerCertificateInput(v *DeleteServerCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServerCertificateName != nil { + objectKey := object.Key("ServerCertificateName") + objectKey.String(*v.ServerCertificateName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteServiceLinkedRoleInput(v *DeleteServiceLinkedRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteServiceSpecificCredentialInput(v *DeleteServiceSpecificCredentialInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServiceSpecificCredentialId != nil { + objectKey := object.Key("ServiceSpecificCredentialId") + objectKey.String(*v.ServiceSpecificCredentialId) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteSigningCertificateInput(v *DeleteSigningCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.CertificateId != nil { + objectKey := object.Key("CertificateId") + objectKey.String(*v.CertificateId) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteSSHPublicKeyInput(v *DeleteSSHPublicKeyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SSHPublicKeyId != nil { + objectKey := object.Key("SSHPublicKeyId") + objectKey.String(*v.SSHPublicKeyId) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteUserInput(v *DeleteUserInput, value query.Value) error { + object := value.Object() + _ = object + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteUserPermissionsBoundaryInput(v *DeleteUserPermissionsBoundaryInput, value query.Value) error { + object := value.Object() + _ = object + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteUserPolicyInput(v *DeleteUserPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDeleteVirtualMFADeviceInput(v *DeleteVirtualMFADeviceInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SerialNumber != nil { + objectKey := object.Key("SerialNumber") + objectKey.String(*v.SerialNumber) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDetachGroupPolicyInput(v *DetachGroupPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDetachRolePolicyInput(v *DetachRolePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentDetachUserPolicyInput(v *DetachUserPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentEnableMFADeviceInput(v *EnableMFADeviceInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AuthenticationCode1 != nil { + objectKey := object.Key("AuthenticationCode1") + objectKey.String(*v.AuthenticationCode1) + } + + if v.AuthenticationCode2 != nil { + objectKey := object.Key("AuthenticationCode2") + objectKey.String(*v.AuthenticationCode2) + } + + if v.SerialNumber != nil { + objectKey := object.Key("SerialNumber") + objectKey.String(*v.SerialNumber) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGenerateOrganizationsAccessReportInput(v *GenerateOrganizationsAccessReportInput, value query.Value) error { + object := value.Object() + _ = object + + if v.EntityPath != nil { + objectKey := object.Key("EntityPath") + objectKey.String(*v.EntityPath) + } + + if v.OrganizationsPolicyId != nil { + objectKey := object.Key("OrganizationsPolicyId") + objectKey.String(*v.OrganizationsPolicyId) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGenerateServiceLastAccessedDetailsInput(v *GenerateServiceLastAccessedDetailsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Arn != nil { + objectKey := object.Key("Arn") + objectKey.String(*v.Arn) + } + + if len(v.Granularity) > 0 { + objectKey := object.Key("Granularity") + objectKey.String(string(v.Granularity)) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetAccessKeyLastUsedInput(v *GetAccessKeyLastUsedInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AccessKeyId != nil { + objectKey := object.Key("AccessKeyId") + objectKey.String(*v.AccessKeyId) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetAccountAuthorizationDetailsInput(v *GetAccountAuthorizationDetailsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Filter != nil { + objectKey := object.Key("Filter") + if err := awsAwsquery_serializeDocumentEntityListType(v.Filter, objectKey); err != nil { + return err + } + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetContextKeysForCustomPolicyInput(v *GetContextKeysForCustomPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyInputList != nil { + objectKey := object.Key("PolicyInputList") + if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PolicyInputList, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetContextKeysForPrincipalPolicyInput(v *GetContextKeysForPrincipalPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyInputList != nil { + objectKey := object.Key("PolicyInputList") + if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PolicyInputList, objectKey); err != nil { + return err + } + } + + if v.PolicySourceArn != nil { + objectKey := object.Key("PolicySourceArn") + objectKey.String(*v.PolicySourceArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetGroupInput(v *GetGroupInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetGroupPolicyInput(v *GetGroupPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetInstanceProfileInput(v *GetInstanceProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceProfileName != nil { + objectKey := object.Key("InstanceProfileName") + objectKey.String(*v.InstanceProfileName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetLoginProfileInput(v *GetLoginProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetMFADeviceInput(v *GetMFADeviceInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SerialNumber != nil { + objectKey := object.Key("SerialNumber") + objectKey.String(*v.SerialNumber) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetOpenIDConnectProviderInput(v *GetOpenIDConnectProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.OpenIDConnectProviderArn != nil { + objectKey := object.Key("OpenIDConnectProviderArn") + objectKey.String(*v.OpenIDConnectProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetOrganizationsAccessReportInput(v *GetOrganizationsAccessReportInput, value query.Value) error { + object := value.Object() + _ = object + + if v.JobId != nil { + objectKey := object.Key("JobId") + objectKey.String(*v.JobId) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if len(v.SortKey) > 0 { + objectKey := object.Key("SortKey") + objectKey.String(string(v.SortKey)) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetPolicyInput(v *GetPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetPolicyVersionInput(v *GetPolicyVersionInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.VersionId != nil { + objectKey := object.Key("VersionId") + objectKey.String(*v.VersionId) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetRoleInput(v *GetRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetRolePolicyInput(v *GetRolePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetSAMLProviderInput(v *GetSAMLProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SAMLProviderArn != nil { + objectKey := object.Key("SAMLProviderArn") + objectKey.String(*v.SAMLProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetServerCertificateInput(v *GetServerCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServerCertificateName != nil { + objectKey := object.Key("ServerCertificateName") + objectKey.String(*v.ServerCertificateName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetServiceLastAccessedDetailsInput(v *GetServiceLastAccessedDetailsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.JobId != nil { + objectKey := object.Key("JobId") + objectKey.String(*v.JobId) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetServiceLastAccessedDetailsWithEntitiesInput(v *GetServiceLastAccessedDetailsWithEntitiesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.JobId != nil { + objectKey := object.Key("JobId") + objectKey.String(*v.JobId) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.ServiceNamespace != nil { + objectKey := object.Key("ServiceNamespace") + objectKey.String(*v.ServiceNamespace) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetServiceLinkedRoleDeletionStatusInput(v *GetServiceLinkedRoleDeletionStatusInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DeletionTaskId != nil { + objectKey := object.Key("DeletionTaskId") + objectKey.String(*v.DeletionTaskId) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetSSHPublicKeyInput(v *GetSSHPublicKeyInput, value query.Value) error { + object := value.Object() + _ = object + + if len(v.Encoding) > 0 { + objectKey := object.Key("Encoding") + objectKey.String(string(v.Encoding)) + } + + if v.SSHPublicKeyId != nil { + objectKey := object.Key("SSHPublicKeyId") + objectKey.String(*v.SSHPublicKeyId) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetUserInput(v *GetUserInput, value query.Value) error { + object := value.Object() + _ = object + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentGetUserPolicyInput(v *GetUserPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListAccessKeysInput(v *ListAccessKeysInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListAccountAliasesInput(v *ListAccountAliasesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListAttachedGroupPoliciesInput(v *ListAttachedGroupPoliciesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListAttachedRolePoliciesInput(v *ListAttachedRolePoliciesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListAttachedUserPoliciesInput(v *ListAttachedUserPoliciesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListEntitiesForPolicyInput(v *ListEntitiesForPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if len(v.EntityFilter) > 0 { + objectKey := object.Key("EntityFilter") + objectKey.String(string(v.EntityFilter)) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if len(v.PolicyUsageFilter) > 0 { + objectKey := object.Key("PolicyUsageFilter") + objectKey.String(string(v.PolicyUsageFilter)) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListGroupPoliciesInput(v *ListGroupPoliciesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListGroupsForUserInput(v *ListGroupsForUserInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListGroupsInput(v *ListGroupsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListInstanceProfilesForRoleInput(v *ListInstanceProfilesForRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListInstanceProfilesInput(v *ListInstanceProfilesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListInstanceProfileTagsInput(v *ListInstanceProfileTagsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceProfileName != nil { + objectKey := object.Key("InstanceProfileName") + objectKey.String(*v.InstanceProfileName) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListMFADevicesInput(v *ListMFADevicesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListMFADeviceTagsInput(v *ListMFADeviceTagsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.SerialNumber != nil { + objectKey := object.Key("SerialNumber") + objectKey.String(*v.SerialNumber) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListOpenIDConnectProvidersInput(v *ListOpenIDConnectProvidersInput, value query.Value) error { + object := value.Object() + _ = object + + return nil +} + +func awsAwsquery_serializeOpDocumentListOpenIDConnectProviderTagsInput(v *ListOpenIDConnectProviderTagsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.OpenIDConnectProviderArn != nil { + objectKey := object.Key("OpenIDConnectProviderArn") + objectKey.String(*v.OpenIDConnectProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListPoliciesGrantingServiceAccessInput(v *ListPoliciesGrantingServiceAccessInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Arn != nil { + objectKey := object.Key("Arn") + objectKey.String(*v.Arn) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.ServiceNamespaces != nil { + objectKey := object.Key("ServiceNamespaces") + if err := awsAwsquery_serializeDocumentServiceNamespaceListType(v.ServiceNamespaces, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListPoliciesInput(v *ListPoliciesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.OnlyAttached { + objectKey := object.Key("OnlyAttached") + objectKey.Boolean(v.OnlyAttached) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + if len(v.PolicyUsageFilter) > 0 { + objectKey := object.Key("PolicyUsageFilter") + objectKey.String(string(v.PolicyUsageFilter)) + } + + if len(v.Scope) > 0 { + objectKey := object.Key("Scope") + objectKey.String(string(v.Scope)) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListPolicyTagsInput(v *ListPolicyTagsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListPolicyVersionsInput(v *ListPolicyVersionsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListRolePoliciesInput(v *ListRolePoliciesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListRolesInput(v *ListRolesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListRoleTagsInput(v *ListRoleTagsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListSAMLProvidersInput(v *ListSAMLProvidersInput, value query.Value) error { + object := value.Object() + _ = object + + return nil +} + +func awsAwsquery_serializeOpDocumentListSAMLProviderTagsInput(v *ListSAMLProviderTagsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.SAMLProviderArn != nil { + objectKey := object.Key("SAMLProviderArn") + objectKey.String(*v.SAMLProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListServerCertificatesInput(v *ListServerCertificatesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListServerCertificateTagsInput(v *ListServerCertificateTagsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.ServerCertificateName != nil { + objectKey := object.Key("ServerCertificateName") + objectKey.String(*v.ServerCertificateName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListServiceSpecificCredentialsInput(v *ListServiceSpecificCredentialsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServiceName != nil { + objectKey := object.Key("ServiceName") + objectKey.String(*v.ServiceName) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListSigningCertificatesInput(v *ListSigningCertificatesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListSSHPublicKeysInput(v *ListSSHPublicKeysInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListUserPoliciesInput(v *ListUserPoliciesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListUsersInput(v *ListUsersInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PathPrefix != nil { + objectKey := object.Key("PathPrefix") + objectKey.String(*v.PathPrefix) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListUserTagsInput(v *ListUserTagsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentListVirtualMFADevicesInput(v *ListVirtualMFADevicesInput, value query.Value) error { + object := value.Object() + _ = object + + if len(v.AssignmentStatus) > 0 { + objectKey := object.Key("AssignmentStatus") + objectKey.String(string(v.AssignmentStatus)) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentPutGroupPolicyInput(v *PutGroupPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.PolicyDocument != nil { + objectKey := object.Key("PolicyDocument") + objectKey.String(*v.PolicyDocument) + } + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentPutRolePermissionsBoundaryInput(v *PutRolePermissionsBoundaryInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PermissionsBoundary != nil { + objectKey := object.Key("PermissionsBoundary") + objectKey.String(*v.PermissionsBoundary) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentPutRolePolicyInput(v *PutRolePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyDocument != nil { + objectKey := object.Key("PolicyDocument") + objectKey.String(*v.PolicyDocument) + } + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentPutUserPermissionsBoundaryInput(v *PutUserPermissionsBoundaryInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PermissionsBoundary != nil { + objectKey := object.Key("PermissionsBoundary") + objectKey.String(*v.PermissionsBoundary) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentPutUserPolicyInput(v *PutUserPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyDocument != nil { + objectKey := object.Key("PolicyDocument") + objectKey.String(*v.PolicyDocument) + } + + if v.PolicyName != nil { + objectKey := object.Key("PolicyName") + objectKey.String(*v.PolicyName) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentRemoveClientIDFromOpenIDConnectProviderInput(v *RemoveClientIDFromOpenIDConnectProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ClientID != nil { + objectKey := object.Key("ClientID") + objectKey.String(*v.ClientID) + } + + if v.OpenIDConnectProviderArn != nil { + objectKey := object.Key("OpenIDConnectProviderArn") + objectKey.String(*v.OpenIDConnectProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentRemoveRoleFromInstanceProfileInput(v *RemoveRoleFromInstanceProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceProfileName != nil { + objectKey := object.Key("InstanceProfileName") + objectKey.String(*v.InstanceProfileName) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentRemoveUserFromGroupInput(v *RemoveUserFromGroupInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentResetServiceSpecificCredentialInput(v *ResetServiceSpecificCredentialInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServiceSpecificCredentialId != nil { + objectKey := object.Key("ServiceSpecificCredentialId") + objectKey.String(*v.ServiceSpecificCredentialId) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentResyncMFADeviceInput(v *ResyncMFADeviceInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AuthenticationCode1 != nil { + objectKey := object.Key("AuthenticationCode1") + objectKey.String(*v.AuthenticationCode1) + } + + if v.AuthenticationCode2 != nil { + objectKey := object.Key("AuthenticationCode2") + objectKey.String(*v.AuthenticationCode2) + } + + if v.SerialNumber != nil { + objectKey := object.Key("SerialNumber") + objectKey.String(*v.SerialNumber) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentSetDefaultPolicyVersionInput(v *SetDefaultPolicyVersionInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.VersionId != nil { + objectKey := object.Key("VersionId") + objectKey.String(*v.VersionId) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentSetSecurityTokenServicePreferencesInput(v *SetSecurityTokenServicePreferencesInput, value query.Value) error { + object := value.Object() + _ = object + + if len(v.GlobalEndpointTokenVersion) > 0 { + objectKey := object.Key("GlobalEndpointTokenVersion") + objectKey.String(string(v.GlobalEndpointTokenVersion)) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentSimulateCustomPolicyInput(v *SimulateCustomPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ActionNames != nil { + objectKey := object.Key("ActionNames") + if err := awsAwsquery_serializeDocumentActionNameListType(v.ActionNames, objectKey); err != nil { + return err + } + } + + if v.CallerArn != nil { + objectKey := object.Key("CallerArn") + objectKey.String(*v.CallerArn) + } + + if v.ContextEntries != nil { + objectKey := object.Key("ContextEntries") + if err := awsAwsquery_serializeDocumentContextEntryListType(v.ContextEntries, objectKey); err != nil { + return err + } + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PermissionsBoundaryPolicyInputList != nil { + objectKey := object.Key("PermissionsBoundaryPolicyInputList") + if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PermissionsBoundaryPolicyInputList, objectKey); err != nil { + return err + } + } + + if v.PolicyInputList != nil { + objectKey := object.Key("PolicyInputList") + if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PolicyInputList, objectKey); err != nil { + return err + } + } + + if v.ResourceArns != nil { + objectKey := object.Key("ResourceArns") + if err := awsAwsquery_serializeDocumentResourceNameListType(v.ResourceArns, objectKey); err != nil { + return err + } + } + + if v.ResourceHandlingOption != nil { + objectKey := object.Key("ResourceHandlingOption") + objectKey.String(*v.ResourceHandlingOption) + } + + if v.ResourceOwner != nil { + objectKey := object.Key("ResourceOwner") + objectKey.String(*v.ResourceOwner) + } + + if v.ResourcePolicy != nil { + objectKey := object.Key("ResourcePolicy") + objectKey.String(*v.ResourcePolicy) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentSimulatePrincipalPolicyInput(v *SimulatePrincipalPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ActionNames != nil { + objectKey := object.Key("ActionNames") + if err := awsAwsquery_serializeDocumentActionNameListType(v.ActionNames, objectKey); err != nil { + return err + } + } + + if v.CallerArn != nil { + objectKey := object.Key("CallerArn") + objectKey.String(*v.CallerArn) + } + + if v.ContextEntries != nil { + objectKey := object.Key("ContextEntries") + if err := awsAwsquery_serializeDocumentContextEntryListType(v.ContextEntries, objectKey); err != nil { + return err + } + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxItems != nil { + objectKey := object.Key("MaxItems") + objectKey.Integer(*v.MaxItems) + } + + if v.PermissionsBoundaryPolicyInputList != nil { + objectKey := object.Key("PermissionsBoundaryPolicyInputList") + if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PermissionsBoundaryPolicyInputList, objectKey); err != nil { + return err + } + } + + if v.PolicyInputList != nil { + objectKey := object.Key("PolicyInputList") + if err := awsAwsquery_serializeDocumentSimulationPolicyListType(v.PolicyInputList, objectKey); err != nil { + return err + } + } + + if v.PolicySourceArn != nil { + objectKey := object.Key("PolicySourceArn") + objectKey.String(*v.PolicySourceArn) + } + + if v.ResourceArns != nil { + objectKey := object.Key("ResourceArns") + if err := awsAwsquery_serializeDocumentResourceNameListType(v.ResourceArns, objectKey); err != nil { + return err + } + } + + if v.ResourceHandlingOption != nil { + objectKey := object.Key("ResourceHandlingOption") + objectKey.String(*v.ResourceHandlingOption) + } + + if v.ResourceOwner != nil { + objectKey := object.Key("ResourceOwner") + objectKey.String(*v.ResourceOwner) + } + + if v.ResourcePolicy != nil { + objectKey := object.Key("ResourcePolicy") + objectKey.String(*v.ResourcePolicy) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentTagInstanceProfileInput(v *TagInstanceProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceProfileName != nil { + objectKey := object.Key("InstanceProfileName") + objectKey.String(*v.InstanceProfileName) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentTagMFADeviceInput(v *TagMFADeviceInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SerialNumber != nil { + objectKey := object.Key("SerialNumber") + objectKey.String(*v.SerialNumber) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentTagOpenIDConnectProviderInput(v *TagOpenIDConnectProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.OpenIDConnectProviderArn != nil { + objectKey := object.Key("OpenIDConnectProviderArn") + objectKey.String(*v.OpenIDConnectProviderArn) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentTagPolicyInput(v *TagPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentTagRoleInput(v *TagRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentTagSAMLProviderInput(v *TagSAMLProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SAMLProviderArn != nil { + objectKey := object.Key("SAMLProviderArn") + objectKey.String(*v.SAMLProviderArn) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentTagServerCertificateInput(v *TagServerCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServerCertificateName != nil { + objectKey := object.Key("ServerCertificateName") + objectKey.String(*v.ServerCertificateName) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentTagUserInput(v *TagUserInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUntagInstanceProfileInput(v *UntagInstanceProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.InstanceProfileName != nil { + objectKey := object.Key("InstanceProfileName") + objectKey.String(*v.InstanceProfileName) + } + + if v.TagKeys != nil { + objectKey := object.Key("TagKeys") + if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUntagMFADeviceInput(v *UntagMFADeviceInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SerialNumber != nil { + objectKey := object.Key("SerialNumber") + objectKey.String(*v.SerialNumber) + } + + if v.TagKeys != nil { + objectKey := object.Key("TagKeys") + if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUntagOpenIDConnectProviderInput(v *UntagOpenIDConnectProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.OpenIDConnectProviderArn != nil { + objectKey := object.Key("OpenIDConnectProviderArn") + objectKey.String(*v.OpenIDConnectProviderArn) + } + + if v.TagKeys != nil { + objectKey := object.Key("TagKeys") + if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUntagPolicyInput(v *UntagPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyArn != nil { + objectKey := object.Key("PolicyArn") + objectKey.String(*v.PolicyArn) + } + + if v.TagKeys != nil { + objectKey := object.Key("TagKeys") + if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUntagRoleInput(v *UntagRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + if v.TagKeys != nil { + objectKey := object.Key("TagKeys") + if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUntagSAMLProviderInput(v *UntagSAMLProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SAMLProviderArn != nil { + objectKey := object.Key("SAMLProviderArn") + objectKey.String(*v.SAMLProviderArn) + } + + if v.TagKeys != nil { + objectKey := object.Key("TagKeys") + if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUntagServerCertificateInput(v *UntagServerCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServerCertificateName != nil { + objectKey := object.Key("ServerCertificateName") + objectKey.String(*v.ServerCertificateName) + } + + if v.TagKeys != nil { + objectKey := object.Key("TagKeys") + if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUntagUserInput(v *UntagUserInput, value query.Value) error { + object := value.Object() + _ = object + + if v.TagKeys != nil { + objectKey := object.Key("TagKeys") + if err := awsAwsquery_serializeDocumentTagKeyListType(v.TagKeys, objectKey); err != nil { + return err + } + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateAccessKeyInput(v *UpdateAccessKeyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AccessKeyId != nil { + objectKey := object.Key("AccessKeyId") + objectKey.String(*v.AccessKeyId) + } + + if len(v.Status) > 0 { + objectKey := object.Key("Status") + objectKey.String(string(v.Status)) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateAccountPasswordPolicyInput(v *UpdateAccountPasswordPolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.AllowUsersToChangePassword { + objectKey := object.Key("AllowUsersToChangePassword") + objectKey.Boolean(v.AllowUsersToChangePassword) + } + + if v.HardExpiry != nil { + objectKey := object.Key("HardExpiry") + objectKey.Boolean(*v.HardExpiry) + } + + if v.MaxPasswordAge != nil { + objectKey := object.Key("MaxPasswordAge") + objectKey.Integer(*v.MaxPasswordAge) + } + + if v.MinimumPasswordLength != nil { + objectKey := object.Key("MinimumPasswordLength") + objectKey.Integer(*v.MinimumPasswordLength) + } + + if v.PasswordReusePrevention != nil { + objectKey := object.Key("PasswordReusePrevention") + objectKey.Integer(*v.PasswordReusePrevention) + } + + if v.RequireLowercaseCharacters { + objectKey := object.Key("RequireLowercaseCharacters") + objectKey.Boolean(v.RequireLowercaseCharacters) + } + + if v.RequireNumbers { + objectKey := object.Key("RequireNumbers") + objectKey.Boolean(v.RequireNumbers) + } + + if v.RequireSymbols { + objectKey := object.Key("RequireSymbols") + objectKey.Boolean(v.RequireSymbols) + } + + if v.RequireUppercaseCharacters { + objectKey := object.Key("RequireUppercaseCharacters") + objectKey.Boolean(v.RequireUppercaseCharacters) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateAssumeRolePolicyInput(v *UpdateAssumeRolePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.PolicyDocument != nil { + objectKey := object.Key("PolicyDocument") + objectKey.String(*v.PolicyDocument) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateGroupInput(v *UpdateGroupInput, value query.Value) error { + object := value.Object() + _ = object + + if v.GroupName != nil { + objectKey := object.Key("GroupName") + objectKey.String(*v.GroupName) + } + + if v.NewGroupName != nil { + objectKey := object.Key("NewGroupName") + objectKey.String(*v.NewGroupName) + } + + if v.NewPath != nil { + objectKey := object.Key("NewPath") + objectKey.String(*v.NewPath) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateLoginProfileInput(v *UpdateLoginProfileInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Password != nil { + objectKey := object.Key("Password") + objectKey.String(*v.Password) + } + + if v.PasswordResetRequired != nil { + objectKey := object.Key("PasswordResetRequired") + objectKey.Boolean(*v.PasswordResetRequired) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateOpenIDConnectProviderThumbprintInput(v *UpdateOpenIDConnectProviderThumbprintInput, value query.Value) error { + object := value.Object() + _ = object + + if v.OpenIDConnectProviderArn != nil { + objectKey := object.Key("OpenIDConnectProviderArn") + objectKey.String(*v.OpenIDConnectProviderArn) + } + + if v.ThumbprintList != nil { + objectKey := object.Key("ThumbprintList") + if err := awsAwsquery_serializeDocumentThumbprintListType(v.ThumbprintList, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateRoleDescriptionInput(v *UpdateRoleDescriptionInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Description != nil { + objectKey := object.Key("Description") + objectKey.String(*v.Description) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateRoleInput(v *UpdateRoleInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Description != nil { + objectKey := object.Key("Description") + objectKey.String(*v.Description) + } + + if v.MaxSessionDuration != nil { + objectKey := object.Key("MaxSessionDuration") + objectKey.Integer(*v.MaxSessionDuration) + } + + if v.RoleName != nil { + objectKey := object.Key("RoleName") + objectKey.String(*v.RoleName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateSAMLProviderInput(v *UpdateSAMLProviderInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SAMLMetadataDocument != nil { + objectKey := object.Key("SAMLMetadataDocument") + objectKey.String(*v.SAMLMetadataDocument) + } + + if v.SAMLProviderArn != nil { + objectKey := object.Key("SAMLProviderArn") + objectKey.String(*v.SAMLProviderArn) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateServerCertificateInput(v *UpdateServerCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.NewPath != nil { + objectKey := object.Key("NewPath") + objectKey.String(*v.NewPath) + } + + if v.NewServerCertificateName != nil { + objectKey := object.Key("NewServerCertificateName") + objectKey.String(*v.NewServerCertificateName) + } + + if v.ServerCertificateName != nil { + objectKey := object.Key("ServerCertificateName") + objectKey.String(*v.ServerCertificateName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateServiceSpecificCredentialInput(v *UpdateServiceSpecificCredentialInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ServiceSpecificCredentialId != nil { + objectKey := object.Key("ServiceSpecificCredentialId") + objectKey.String(*v.ServiceSpecificCredentialId) + } + + if len(v.Status) > 0 { + objectKey := object.Key("Status") + objectKey.String(string(v.Status)) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateSigningCertificateInput(v *UpdateSigningCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.CertificateId != nil { + objectKey := object.Key("CertificateId") + objectKey.String(*v.CertificateId) + } + + if len(v.Status) > 0 { + objectKey := object.Key("Status") + objectKey.String(string(v.Status)) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateSSHPublicKeyInput(v *UpdateSSHPublicKeyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SSHPublicKeyId != nil { + objectKey := object.Key("SSHPublicKeyId") + objectKey.String(*v.SSHPublicKeyId) + } + + if len(v.Status) > 0 { + objectKey := object.Key("Status") + objectKey.String(string(v.Status)) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value query.Value) error { + object := value.Object() + _ = object + + if v.NewPath != nil { + objectKey := object.Key("NewPath") + objectKey.String(*v.NewPath) + } + + if v.NewUserName != nil { + objectKey := object.Key("NewUserName") + objectKey.String(*v.NewUserName) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUploadServerCertificateInput(v *UploadServerCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.CertificateBody != nil { + objectKey := object.Key("CertificateBody") + objectKey.String(*v.CertificateBody) + } + + if v.CertificateChain != nil { + objectKey := object.Key("CertificateChain") + objectKey.String(*v.CertificateChain) + } + + if v.Path != nil { + objectKey := object.Key("Path") + objectKey.String(*v.Path) + } + + if v.PrivateKey != nil { + objectKey := object.Key("PrivateKey") + objectKey.String(*v.PrivateKey) + } + + if v.ServerCertificateName != nil { + objectKey := object.Key("ServerCertificateName") + objectKey.String(*v.ServerCertificateName) + } + + if v.Tags != nil { + objectKey := object.Key("Tags") + if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUploadSigningCertificateInput(v *UploadSigningCertificateInput, value query.Value) error { + object := value.Object() + _ = object + + if v.CertificateBody != nil { + objectKey := object.Key("CertificateBody") + objectKey.String(*v.CertificateBody) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} + +func awsAwsquery_serializeOpDocumentUploadSSHPublicKeyInput(v *UploadSSHPublicKeyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.SSHPublicKeyBody != nil { + objectKey := object.Key("SSHPublicKeyBody") + objectKey.String(*v.SSHPublicKeyBody) + } + + if v.UserName != nil { + objectKey := object.Key("UserName") + objectKey.String(*v.UserName) + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/enums.go new file mode 100644 index 0000000000000..0100b4f3d856f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/enums.go @@ -0,0 +1,466 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AccessAdvisorUsageGranularityType string + +// Enum values for AccessAdvisorUsageGranularityType +const ( + AccessAdvisorUsageGranularityTypeServiceLevel AccessAdvisorUsageGranularityType = "SERVICE_LEVEL" + AccessAdvisorUsageGranularityTypeActionLevel AccessAdvisorUsageGranularityType = "ACTION_LEVEL" +) + +// Values returns all known values for AccessAdvisorUsageGranularityType. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (AccessAdvisorUsageGranularityType) Values() []AccessAdvisorUsageGranularityType { + return []AccessAdvisorUsageGranularityType{ + "SERVICE_LEVEL", + "ACTION_LEVEL", + } +} + +type AssignmentStatusType string + +// Enum values for AssignmentStatusType +const ( + AssignmentStatusTypeAssigned AssignmentStatusType = "Assigned" + AssignmentStatusTypeUnassigned AssignmentStatusType = "Unassigned" + AssignmentStatusTypeAny AssignmentStatusType = "Any" +) + +// Values returns all known values for AssignmentStatusType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AssignmentStatusType) Values() []AssignmentStatusType { + return []AssignmentStatusType{ + "Assigned", + "Unassigned", + "Any", + } +} + +type ContextKeyTypeEnum string + +// Enum values for ContextKeyTypeEnum +const ( + ContextKeyTypeEnumString ContextKeyTypeEnum = "string" + ContextKeyTypeEnumStringList ContextKeyTypeEnum = "stringList" + ContextKeyTypeEnumNumeric ContextKeyTypeEnum = "numeric" + ContextKeyTypeEnumNumericList ContextKeyTypeEnum = "numericList" + ContextKeyTypeEnumBoolean ContextKeyTypeEnum = "boolean" + ContextKeyTypeEnumBooleanList ContextKeyTypeEnum = "booleanList" + ContextKeyTypeEnumIp ContextKeyTypeEnum = "ip" + ContextKeyTypeEnumIpList ContextKeyTypeEnum = "ipList" + ContextKeyTypeEnumBinary ContextKeyTypeEnum = "binary" + ContextKeyTypeEnumBinaryList ContextKeyTypeEnum = "binaryList" + ContextKeyTypeEnumDate ContextKeyTypeEnum = "date" + ContextKeyTypeEnumDateList ContextKeyTypeEnum = "dateList" +) + +// Values returns all known values for ContextKeyTypeEnum. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ContextKeyTypeEnum) Values() []ContextKeyTypeEnum { + return []ContextKeyTypeEnum{ + "string", + "stringList", + "numeric", + "numericList", + "boolean", + "booleanList", + "ip", + "ipList", + "binary", + "binaryList", + "date", + "dateList", + } +} + +type DeletionTaskStatusType string + +// Enum values for DeletionTaskStatusType +const ( + DeletionTaskStatusTypeSucceeded DeletionTaskStatusType = "SUCCEEDED" + DeletionTaskStatusTypeInProgress DeletionTaskStatusType = "IN_PROGRESS" + DeletionTaskStatusTypeFailed DeletionTaskStatusType = "FAILED" + DeletionTaskStatusTypeNotStarted DeletionTaskStatusType = "NOT_STARTED" +) + +// Values returns all known values for DeletionTaskStatusType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DeletionTaskStatusType) Values() []DeletionTaskStatusType { + return []DeletionTaskStatusType{ + "SUCCEEDED", + "IN_PROGRESS", + "FAILED", + "NOT_STARTED", + } +} + +type EncodingType string + +// Enum values for EncodingType +const ( + EncodingTypeSsh EncodingType = "SSH" + EncodingTypePem EncodingType = "PEM" +) + +// Values returns all known values for EncodingType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (EncodingType) Values() []EncodingType { + return []EncodingType{ + "SSH", + "PEM", + } +} + +type EntityType string + +// Enum values for EntityType +const ( + EntityTypeUser EntityType = "User" + EntityTypeRole EntityType = "Role" + EntityTypeGroup EntityType = "Group" + EntityTypeLocalManagedPolicy EntityType = "LocalManagedPolicy" + EntityTypeAWSManagedPolicy EntityType = "AWSManagedPolicy" +) + +// Values returns all known values for EntityType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (EntityType) Values() []EntityType { + return []EntityType{ + "User", + "Role", + "Group", + "LocalManagedPolicy", + "AWSManagedPolicy", + } +} + +type GlobalEndpointTokenVersion string + +// Enum values for GlobalEndpointTokenVersion +const ( + GlobalEndpointTokenVersionV1Token GlobalEndpointTokenVersion = "v1Token" + GlobalEndpointTokenVersionV2Token GlobalEndpointTokenVersion = "v2Token" +) + +// Values returns all known values for GlobalEndpointTokenVersion. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (GlobalEndpointTokenVersion) Values() []GlobalEndpointTokenVersion { + return []GlobalEndpointTokenVersion{ + "v1Token", + "v2Token", + } +} + +type JobStatusType string + +// Enum values for JobStatusType +const ( + JobStatusTypeInProgress JobStatusType = "IN_PROGRESS" + JobStatusTypeCompleted JobStatusType = "COMPLETED" + JobStatusTypeFailed JobStatusType = "FAILED" +) + +// Values returns all known values for JobStatusType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (JobStatusType) Values() []JobStatusType { + return []JobStatusType{ + "IN_PROGRESS", + "COMPLETED", + "FAILED", + } +} + +type PermissionsBoundaryAttachmentType string + +// Enum values for PermissionsBoundaryAttachmentType +const ( + PermissionsBoundaryAttachmentTypePolicy PermissionsBoundaryAttachmentType = "PermissionsBoundaryPolicy" +) + +// Values returns all known values for PermissionsBoundaryAttachmentType. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (PermissionsBoundaryAttachmentType) Values() []PermissionsBoundaryAttachmentType { + return []PermissionsBoundaryAttachmentType{ + "PermissionsBoundaryPolicy", + } +} + +type PolicyEvaluationDecisionType string + +// Enum values for PolicyEvaluationDecisionType +const ( + PolicyEvaluationDecisionTypeAllowed PolicyEvaluationDecisionType = "allowed" + PolicyEvaluationDecisionTypeExplicitDeny PolicyEvaluationDecisionType = "explicitDeny" + PolicyEvaluationDecisionTypeImplicitDeny PolicyEvaluationDecisionType = "implicitDeny" +) + +// Values returns all known values for PolicyEvaluationDecisionType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (PolicyEvaluationDecisionType) Values() []PolicyEvaluationDecisionType { + return []PolicyEvaluationDecisionType{ + "allowed", + "explicitDeny", + "implicitDeny", + } +} + +type PolicyOwnerEntityType string + +// Enum values for PolicyOwnerEntityType +const ( + PolicyOwnerEntityTypeUser PolicyOwnerEntityType = "USER" + PolicyOwnerEntityTypeRole PolicyOwnerEntityType = "ROLE" + PolicyOwnerEntityTypeGroup PolicyOwnerEntityType = "GROUP" +) + +// Values returns all known values for PolicyOwnerEntityType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PolicyOwnerEntityType) Values() []PolicyOwnerEntityType { + return []PolicyOwnerEntityType{ + "USER", + "ROLE", + "GROUP", + } +} + +type PolicyScopeType string + +// Enum values for PolicyScopeType +const ( + PolicyScopeTypeAll PolicyScopeType = "All" + PolicyScopeTypeAws PolicyScopeType = "AWS" + PolicyScopeTypeLocal PolicyScopeType = "Local" +) + +// Values returns all known values for PolicyScopeType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PolicyScopeType) Values() []PolicyScopeType { + return []PolicyScopeType{ + "All", + "AWS", + "Local", + } +} + +type PolicySourceType string + +// Enum values for PolicySourceType +const ( + PolicySourceTypeUser PolicySourceType = "user" + PolicySourceTypeGroup PolicySourceType = "group" + PolicySourceTypeRole PolicySourceType = "role" + PolicySourceTypeAwsManaged PolicySourceType = "aws-managed" + PolicySourceTypeUserManaged PolicySourceType = "user-managed" + PolicySourceTypeResource PolicySourceType = "resource" + PolicySourceTypeNone PolicySourceType = "none" +) + +// Values returns all known values for PolicySourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PolicySourceType) Values() []PolicySourceType { + return []PolicySourceType{ + "user", + "group", + "role", + "aws-managed", + "user-managed", + "resource", + "none", + } +} + +type PolicyType string + +// Enum values for PolicyType +const ( + PolicyTypeInline PolicyType = "INLINE" + PolicyTypeManaged PolicyType = "MANAGED" +) + +// Values returns all known values for PolicyType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (PolicyType) Values() []PolicyType { + return []PolicyType{ + "INLINE", + "MANAGED", + } +} + +type PolicyUsageType string + +// Enum values for PolicyUsageType +const ( + PolicyUsageTypePermissionsPolicy PolicyUsageType = "PermissionsPolicy" + PolicyUsageTypePermissionsBoundary PolicyUsageType = "PermissionsBoundary" +) + +// Values returns all known values for PolicyUsageType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PolicyUsageType) Values() []PolicyUsageType { + return []PolicyUsageType{ + "PermissionsPolicy", + "PermissionsBoundary", + } +} + +type ReportFormatType string + +// Enum values for ReportFormatType +const ( + ReportFormatTypeTextCsv ReportFormatType = "text/csv" +) + +// Values returns all known values for ReportFormatType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ReportFormatType) Values() []ReportFormatType { + return []ReportFormatType{ + "text/csv", + } +} + +type ReportStateType string + +// Enum values for ReportStateType +const ( + ReportStateTypeStarted ReportStateType = "STARTED" + ReportStateTypeInprogress ReportStateType = "INPROGRESS" + ReportStateTypeComplete ReportStateType = "COMPLETE" +) + +// Values returns all known values for ReportStateType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ReportStateType) Values() []ReportStateType { + return []ReportStateType{ + "STARTED", + "INPROGRESS", + "COMPLETE", + } +} + +type SortKeyType string + +// Enum values for SortKeyType +const ( + SortKeyTypeServiceNamespaceAscending SortKeyType = "SERVICE_NAMESPACE_ASCENDING" + SortKeyTypeServiceNamespaceDescending SortKeyType = "SERVICE_NAMESPACE_DESCENDING" + SortKeyTypeLastAuthenticatedTimeAscending SortKeyType = "LAST_AUTHENTICATED_TIME_ASCENDING" + SortKeyTypeLastAuthenticatedTimeDescending SortKeyType = "LAST_AUTHENTICATED_TIME_DESCENDING" +) + +// Values returns all known values for SortKeyType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (SortKeyType) Values() []SortKeyType { + return []SortKeyType{ + "SERVICE_NAMESPACE_ASCENDING", + "SERVICE_NAMESPACE_DESCENDING", + "LAST_AUTHENTICATED_TIME_ASCENDING", + "LAST_AUTHENTICATED_TIME_DESCENDING", + } +} + +type StatusType string + +// Enum values for StatusType +const ( + StatusTypeActive StatusType = "Active" + StatusTypeInactive StatusType = "Inactive" +) + +// Values returns all known values for StatusType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (StatusType) Values() []StatusType { + return []StatusType{ + "Active", + "Inactive", + } +} + +type SummaryKeyType string + +// Enum values for SummaryKeyType +const ( + SummaryKeyTypeUsers SummaryKeyType = "Users" + SummaryKeyTypeUsersQuota SummaryKeyType = "UsersQuota" + SummaryKeyTypeGroups SummaryKeyType = "Groups" + SummaryKeyTypeGroupsQuota SummaryKeyType = "GroupsQuota" + SummaryKeyTypeServerCertificates SummaryKeyType = "ServerCertificates" + SummaryKeyTypeServerCertificatesQuota SummaryKeyType = "ServerCertificatesQuota" + SummaryKeyTypeUserPolicySizeQuota SummaryKeyType = "UserPolicySizeQuota" + SummaryKeyTypeGroupPolicySizeQuota SummaryKeyType = "GroupPolicySizeQuota" + SummaryKeyTypeGroupsPerUserQuota SummaryKeyType = "GroupsPerUserQuota" + SummaryKeyTypeSigningCertificatesPerUserQuota SummaryKeyType = "SigningCertificatesPerUserQuota" + SummaryKeyTypeAccessKeysPerUserQuota SummaryKeyType = "AccessKeysPerUserQuota" + SummaryKeyTypeMFADevices SummaryKeyType = "MFADevices" + SummaryKeyTypeMFADevicesInUse SummaryKeyType = "MFADevicesInUse" + SummaryKeyTypeAccountMFAEnabled SummaryKeyType = "AccountMFAEnabled" + SummaryKeyTypeAccountAccessKeysPresent SummaryKeyType = "AccountAccessKeysPresent" + SummaryKeyTypeAccountSigningCertificatesPresent SummaryKeyType = "AccountSigningCertificatesPresent" + SummaryKeyTypeAttachedPoliciesPerGroupQuota SummaryKeyType = "AttachedPoliciesPerGroupQuota" + SummaryKeyTypeAttachedPoliciesPerRoleQuota SummaryKeyType = "AttachedPoliciesPerRoleQuota" + SummaryKeyTypeAttachedPoliciesPerUserQuota SummaryKeyType = "AttachedPoliciesPerUserQuota" + SummaryKeyTypePolicies SummaryKeyType = "Policies" + SummaryKeyTypePoliciesQuota SummaryKeyType = "PoliciesQuota" + SummaryKeyTypePolicySizeQuota SummaryKeyType = "PolicySizeQuota" + SummaryKeyTypePolicyVersionsInUse SummaryKeyType = "PolicyVersionsInUse" + SummaryKeyTypePolicyVersionsInUseQuota SummaryKeyType = "PolicyVersionsInUseQuota" + SummaryKeyTypeVersionsPerPolicyQuota SummaryKeyType = "VersionsPerPolicyQuota" + SummaryKeyTypeGlobalEndpointTokenVersion SummaryKeyType = "GlobalEndpointTokenVersion" +) + +// Values returns all known values for SummaryKeyType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (SummaryKeyType) Values() []SummaryKeyType { + return []SummaryKeyType{ + "Users", + "UsersQuota", + "Groups", + "GroupsQuota", + "ServerCertificates", + "ServerCertificatesQuota", + "UserPolicySizeQuota", + "GroupPolicySizeQuota", + "GroupsPerUserQuota", + "SigningCertificatesPerUserQuota", + "AccessKeysPerUserQuota", + "MFADevices", + "MFADevicesInUse", + "AccountMFAEnabled", + "AccountAccessKeysPresent", + "AccountSigningCertificatesPresent", + "AttachedPoliciesPerGroupQuota", + "AttachedPoliciesPerRoleQuota", + "AttachedPoliciesPerUserQuota", + "Policies", + "PoliciesQuota", + "PolicySizeQuota", + "PolicyVersionsInUse", + "PolicyVersionsInUseQuota", + "VersionsPerPolicyQuota", + "GlobalEndpointTokenVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/errors.go new file mode 100644 index 0000000000000..cf3ad6a2196b9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/errors.go @@ -0,0 +1,752 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// The request was rejected because multiple requests to change this object were +// submitted simultaneously. Wait a few minutes and submit your request again. +type ConcurrentModificationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConcurrentModificationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConcurrentModificationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConcurrentModificationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConcurrentModification" + } + return *e.ErrorCodeOverride +} +func (e *ConcurrentModificationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the most recent credential report has expired. +// To generate a new credential report, use GenerateCredentialReport . For more +// information about credential report expiration, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) +// in the IAM User Guide. +type CredentialReportExpiredException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CredentialReportExpiredException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CredentialReportExpiredException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CredentialReportExpiredException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ReportExpired" + } + return *e.ErrorCodeOverride +} +func (e *CredentialReportExpiredException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the credential report does not exist. To +// generate a credential report, use GenerateCredentialReport . +type CredentialReportNotPresentException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CredentialReportNotPresentException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CredentialReportNotPresentException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CredentialReportNotPresentException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ReportNotPresent" + } + return *e.ErrorCodeOverride +} +func (e *CredentialReportNotPresentException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The request was rejected because the credential report is still being generated. +type CredentialReportNotReadyException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CredentialReportNotReadyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CredentialReportNotReadyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CredentialReportNotReadyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ReportInProgress" + } + return *e.ErrorCodeOverride +} +func (e *CredentialReportNotReadyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because it attempted to delete a resource that has +// attached subordinate entities. The error message describes these entities. +type DeleteConflictException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DeleteConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DeleteConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DeleteConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DeleteConflict" + } + return *e.ErrorCodeOverride +} +func (e *DeleteConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the same certificate is associated with an IAM +// user in the account. +type DuplicateCertificateException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DuplicateCertificateException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DuplicateCertificateException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DuplicateCertificateException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DuplicateCertificate" + } + return *e.ErrorCodeOverride +} +func (e *DuplicateCertificateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the SSH public key is already associated with +// the specified IAM user. +type DuplicateSSHPublicKeyException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DuplicateSSHPublicKeyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DuplicateSSHPublicKeyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DuplicateSSHPublicKeyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DuplicateSSHPublicKey" + } + return *e.ErrorCodeOverride +} +func (e *DuplicateSSHPublicKeyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because it attempted to create a resource that already +// exists. +type EntityAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *EntityAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EntityAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EntityAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EntityAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *EntityAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because it referenced an entity that is temporarily +// unmodifiable, such as a user name that was deleted and then recreated. The error +// indicates that the request is likely to succeed if you try again after waiting +// several minutes. The error message describes the entity. +type EntityTemporarilyUnmodifiableException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *EntityTemporarilyUnmodifiableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EntityTemporarilyUnmodifiableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EntityTemporarilyUnmodifiableException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EntityTemporarilyUnmodifiable" + } + return *e.ErrorCodeOverride +} +func (e *EntityTemporarilyUnmodifiableException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The request was rejected because the authentication code was not recognized. +// The error message describes the specific error. +type InvalidAuthenticationCodeException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidAuthenticationCodeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidAuthenticationCodeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidAuthenticationCodeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidAuthenticationCode" + } + return *e.ErrorCodeOverride +} +func (e *InvalidAuthenticationCodeException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The request was rejected because the certificate is invalid. +type InvalidCertificateException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidCertificateException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidCertificateException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidCertificateException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidCertificate" + } + return *e.ErrorCodeOverride +} +func (e *InvalidCertificateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +type InvalidInputException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInputException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInputException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInputException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInput" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInputException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the public key is malformed or otherwise +// invalid. +type InvalidPublicKeyException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidPublicKeyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPublicKeyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPublicKeyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPublicKey" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPublicKeyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the type of user for the transaction was +// incorrect. +type InvalidUserTypeException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidUserTypeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidUserTypeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidUserTypeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidUserType" + } + return *e.ErrorCodeOverride +} +func (e *InvalidUserTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the public key certificate and the private key +// do not match. +type KeyPairMismatchException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *KeyPairMismatchException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KeyPairMismatchException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KeyPairMismatchException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KeyPairMismatch" + } + return *e.ErrorCodeOverride +} +func (e *KeyPairMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because it attempted to create resources beyond the +// current Amazon Web Services account limits. The error message describes the +// limit exceeded. +type LimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *LimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *LimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *LimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "LimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the certificate was malformed or expired. The +// error message describes the specific error. +type MalformedCertificateException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *MalformedCertificateException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MalformedCertificateException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MalformedCertificateException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MalformedCertificate" + } + return *e.ErrorCodeOverride +} +func (e *MalformedCertificateException) 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 { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *MalformedPolicyDocumentException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MalformedPolicyDocumentException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MalformedPolicyDocumentException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MalformedPolicyDocument" + } + return *e.ErrorCodeOverride +} +func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because it referenced a resource entity that does not +// exist. The error message describes the resource. +type NoSuchEntityException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchEntityException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchEntityException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchEntityException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchEntity" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the provided password did not meet the +// requirements imposed by the account password policy. +type PasswordPolicyViolationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PasswordPolicyViolationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PasswordPolicyViolationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PasswordPolicyViolationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PasswordPolicyViolation" + } + return *e.ErrorCodeOverride +} +func (e *PasswordPolicyViolationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request failed because a provided policy could not be successfully +// evaluated. An additional detailed message indicates the source of the failure. +type PolicyEvaluationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PolicyEvaluationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PolicyEvaluationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PolicyEvaluationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PolicyEvaluation" + } + return *e.ErrorCodeOverride +} +func (e *PolicyEvaluationException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The request failed because Amazon Web Services service role policies can only +// be attached to the service-linked role for that service. +type PolicyNotAttachableException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PolicyNotAttachableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PolicyNotAttachableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PolicyNotAttachableException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PolicyNotAttachable" + } + return *e.ErrorCodeOverride +} +func (e *PolicyNotAttachableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request failed because the maximum number of concurrent requests for this +// account are already running. +type ReportGenerationLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ReportGenerationLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ReportGenerationLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ReportGenerationLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ReportGenerationLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *ReportGenerationLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The request processing has failed because of an unknown error, exception or +// failure. +type ServiceFailureException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceFailureException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceFailureException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceFailureException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceFailure" + } + return *e.ErrorCodeOverride +} +func (e *ServiceFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The specified service does not support service-specific credentials. +type ServiceNotSupportedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceNotSupportedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceNotSupportedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceNotSupportedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NotSupportedService" + } + return *e.ErrorCodeOverride +} +func (e *ServiceNotSupportedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because service-linked roles are protected Amazon Web +// Services resources. Only the service that depends on the service-linked role can +// modify or delete the role on your behalf. The error message includes the name of +// the service that depends on this service-linked role. You must request the +// change through that service. +type UnmodifiableEntityException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnmodifiableEntityException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnmodifiableEntityException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnmodifiableEntityException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnmodifiableEntity" + } + return *e.ErrorCodeOverride +} +func (e *UnmodifiableEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because the public key encoding format is unsupported +// or unrecognized. +type UnrecognizedPublicKeyEncodingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnrecognizedPublicKeyEncodingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnrecognizedPublicKeyEncodingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnrecognizedPublicKeyEncodingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnrecognizedPublicKeyEncoding" + } + return *e.ErrorCodeOverride +} +func (e *UnrecognizedPublicKeyEncodingException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go new file mode 100644 index 0000000000000..5de4fb1019809 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go @@ -0,0 +1,1726 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// An object that contains details about when a principal in the reported +// Organizations entity last attempted to access an Amazon Web Services service. A +// principal can be an IAM user, an IAM role, or the Amazon Web Services account +// root user within the reported Organizations entity. This data type is a response +// element in the GetOrganizationsAccessReport operation. +type AccessDetail struct { + + // The name of the service in which access was attempted. + // + // This member is required. + ServiceName *string + + // The namespace of the service in which access was attempted. To learn the + // service namespace of a service, see Actions, resources, and condition keys for + // Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) + // in the Service Authorization Reference. Choose the name of the service to view + // details for that service. In the first paragraph, find the service prefix. For + // example, (service prefix: a4b) . For more information about service namespaces, + // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + // + // This member is required. + ServiceNamespace *string + + // The path of the Organizations entity (root, organizational unit, or account) + // from which an authenticated principal last attempted to access the service. + // Amazon Web Services does not report unauthenticated requests. This field is null + // if no principals (IAM users, IAM roles, or root user) in the reported + // Organizations entity attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + EntityPath *string + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when an authenticated principal most recently attempted to access the service. + // Amazon Web Services does not report unauthenticated requests. This field is null + // if no principals in the reported Organizations entity attempted to access the + // service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + LastAuthenticatedTime *time.Time + + // The Region where the last service access attempt occurred. This field is null + // if no principals in the reported Organizations entity attempted to access the + // service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + Region *string + + // The number of accounts with authenticated principals (root user, IAM users, and + // IAM roles) that attempted to access the service in the tracking period. + TotalAuthenticatedEntities *int32 + + noSmithyDocumentSerde +} + +// Contains information about an Amazon Web Services access key. This data type is +// used as a response element in the CreateAccessKey and ListAccessKeys +// operations. The SecretAccessKey value is returned only in response to +// CreateAccessKey . You can get a secret access key only when you first create an +// access key; you cannot recover the secret access key later. If you lose a secret +// access key, you must create a new access key. +type AccessKey struct { + + // The ID for this access key. + // + // This member is required. + AccessKeyId *string + + // The secret key used to sign requests. + // + // This member is required. + SecretAccessKey *string + + // The status of the access key. Active means that the key is valid for API calls, + // while Inactive means it is not. + // + // This member is required. + Status StatusType + + // The name of the IAM user that the access key is associated with. + // + // This member is required. + UserName *string + + // The date when the access key was created. + CreateDate *time.Time + + noSmithyDocumentSerde +} + +// Contains information about the last time an Amazon Web Services access key was +// used since IAM began tracking this information on April 22, 2015. This data type +// is used as a response element in the GetAccessKeyLastUsed operation. +type AccessKeyLastUsed struct { + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the access key was most recently used. This field is null in the + // following situations: + // - The user does not have an access key. + // - An access key exists but has not been used since IAM began tracking this + // information. + // - There is no sign-in data associated with the user. + // + // This member is required. + LastUsedDate *time.Time + + // The Amazon Web Services Region where this access key was most recently used. + // The value for this field is "N/A" in the following situations: + // - The user does not have an access key. + // - An access key exists but has not been used since IAM began tracking this + // information. + // - There is no sign-in data associated with the user. + // For more information about Amazon Web Services Regions, see Regions and + // endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html) in the + // Amazon Web Services General Reference. + // + // This member is required. + Region *string + + // The name of the Amazon Web Services service with which this access key was most + // recently used. The value of this field is "N/A" in the following situations: + // - The user does not have an access key. + // - An access key exists but has not been used since IAM started tracking this + // information. + // - There is no sign-in data associated with the user. + // + // This member is required. + ServiceName *string + + noSmithyDocumentSerde +} + +// Contains information about an Amazon Web Services access key, without its +// secret key. This data type is used as a response element in the ListAccessKeys +// operation. +type AccessKeyMetadata struct { + + // The ID for this access key. + AccessKeyId *string + + // The date when the access key was created. + CreateDate *time.Time + + // The status of the access key. Active means that the key is valid for API calls; + // Inactive means it is not. + Status StatusType + + // The name of the IAM user that the key is associated with. + UserName *string + + noSmithyDocumentSerde +} + +// Contains information about an attached permissions boundary. An attached +// permissions boundary is a managed policy that has been attached to a user or +// role to set the permissions boundary. For more information about permissions +// boundaries, see Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) +// in the IAM User Guide. +type AttachedPermissionsBoundary struct { + + // The ARN of the policy used to set the permissions boundary for the user or role. + PermissionsBoundaryArn *string + + // The permissions boundary usage type that indicates what type of IAM resource is + // used as the permissions boundary for an entity. This data type can only have a + // value of Policy . + PermissionsBoundaryType PermissionsBoundaryAttachmentType + + noSmithyDocumentSerde +} + +// Contains information about an attached policy. An attached policy is a managed +// policy that has been attached to a user, group, or role. This data type is used +// as a response element in the ListAttachedGroupPolicies , +// ListAttachedRolePolicies , ListAttachedUserPolicies , and +// GetAccountAuthorizationDetails operations. For more information about managed +// policies, refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +type AttachedPolicy struct { + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + PolicyArn *string + + // The friendly name of the attached policy. + PolicyName *string + + noSmithyDocumentSerde +} + +// Contains information about a condition context key. It includes the name of the +// key and specifies the value (or values, if the context key supports multiple +// values) to use in the simulation. This information is used when evaluating the +// Condition elements of the input policies. This data type is used as an input +// parameter to SimulateCustomPolicy and SimulatePrincipalPolicy . +type ContextEntry struct { + + // The full name of a condition context key, including the service prefix. For + // example, aws:SourceIp or s3:VersionId . + ContextKeyName *string + + // The data type of the value (or values) specified in the ContextKeyValues + // parameter. + ContextKeyType ContextKeyTypeEnum + + // The value (or values, if the condition context key supports multiple values) to + // provide to the simulation when the key is referenced by a Condition element in + // an input policy. + ContextKeyValues []string + + noSmithyDocumentSerde +} + +// The reason that the service-linked role deletion failed. This data type is used +// as a response element in the GetServiceLinkedRoleDeletionStatus operation. +type DeletionTaskFailureReasonType struct { + + // A short description of the reason that the service-linked role deletion failed. + Reason *string + + // A list of objects that contains details about the service-linked role deletion + // failure, if that information is returned by the service. If the service-linked + // role has active sessions or if any resources that were used by the role have not + // been deleted from the linked service, the role can't be deleted. This parameter + // includes a list of the resources that are associated with the role and the + // Region in which the resources are being used. + RoleUsageList []RoleUsageType + + noSmithyDocumentSerde +} + +// An object that contains details about when the IAM entities (users or roles) +// were last used in an attempt to access the specified Amazon Web Services +// service. This data type is a response element in the +// GetServiceLastAccessedDetailsWithEntities operation. +type EntityDetails struct { + + // The EntityInfo object that contains details about the entity (user or role). + // + // This member is required. + EntityInfo *EntityInfo + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the authenticated entity last attempted to access Amazon Web Services. + // Amazon Web Services does not report unauthenticated requests. This field is null + // if no IAM entities attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + LastAuthenticated *time.Time + + noSmithyDocumentSerde +} + +// Contains details about the specified entity (user or role). This data type is +// an element of the EntityDetails object. +type EntityInfo struct { + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + Arn *string + + // The identifier of the entity (user or role). + // + // This member is required. + Id *string + + // The name of the entity (user or role). + // + // This member is required. + Name *string + + // The type of entity (user or role). + // + // This member is required. + Type PolicyOwnerEntityType + + // The path to the entity (user or role). For more information about paths, see + // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + Path *string + + noSmithyDocumentSerde +} + +// Contains information about the reason that the operation failed. This data type +// is used as a response element in the GetOrganizationsAccessReport , +// GetServiceLastAccessedDetails , and GetServiceLastAccessedDetailsWithEntities +// operations. +type ErrorDetails struct { + + // The error code associated with the operation failure. + // + // This member is required. + Code *string + + // Detailed information about the reason that the operation failed. + // + // This member is required. + Message *string + + noSmithyDocumentSerde +} + +// Contains the results of a simulation. This data type is used by the return +// parameter of SimulateCustomPolicy and SimulatePrincipalPolicy . +type EvaluationResult struct { + + // The name of the API operation tested on the indicated resource. + // + // This member is required. + EvalActionName *string + + // The result of the simulation. + // + // This member is required. + EvalDecision PolicyEvaluationDecisionType + + // Additional details about the results of the cross-account evaluation decision. + // This parameter is populated for only cross-account simulations. It contains a + // brief summary of how each policy type contributes to the final evaluation + // decision. If the simulation evaluates policies within the same account and + // includes a resource ARN, then the parameter is present but the response is + // empty. If the simulation evaluates policies within the same account and + // specifies all resources ( * ), then the parameter is not returned. When you make + // a cross-account request, Amazon Web Services evaluates the request in the + // trusting account and the trusted account. The request is allowed only if both + // evaluations return true . For more information about how policies are evaluated, + // see Evaluating policies within a single account (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) + // . If an Organizations SCP included in the evaluation denies access, the + // simulation ends. In this case, policy evaluation does not proceed any further + // and this parameter is not returned. + EvalDecisionDetails map[string]PolicyEvaluationDecisionType + + // The ARN of the resource that the indicated API operation was tested on. + EvalResourceName *string + + // A list of the statements in the input policies that determine the result for + // this scenario. Remember that even if multiple statements allow the operation on + // the resource, if only one statement denies that operation, then the explicit + // deny overrides any allow. In addition, the deny statement is the only entry + // included in the result. + MatchedStatements []Statement + + // A list of context keys that are required by the included input policies but + // that were not provided by one of the input parameters. This list is used when + // the resource in a simulation is "*", either explicitly, or when the ResourceArns + // parameter blank. If you include a list of resources, then any missing context + // values are instead included under the ResourceSpecificResults section. To + // discover the context keys used by a set of policies, you can call + // GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy . + MissingContextValues []string + + // A structure that details how Organizations and its service control policies + // affect the results of the simulation. Only applies if the simulated user's + // account is part of an organization. + OrganizationsDecisionDetail *OrganizationsDecisionDetail + + // Contains information about the effect that a permissions boundary has on a + // policy simulation when the boundary is applied to an IAM entity. + PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail + + // The individual results of the simulation of the API operation specified in + // EvalActionName on each resource. + ResourceSpecificResults []ResourceSpecificResult + + noSmithyDocumentSerde +} + +// Contains information about an IAM group entity. This data type is used as a +// response element in the following operations: +// - CreateGroup +// - GetGroup +// - ListGroups +type Group struct { + + // The Amazon Resource Name (ARN) specifying the group. For more information about + // ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + Arn *string + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the group was created. + // + // This member is required. + CreateDate *time.Time + + // The stable and unique string identifying the group. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + GroupId *string + + // The friendly name that identifies the group. + // + // This member is required. + GroupName *string + + // The path to the group. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + Path *string + + noSmithyDocumentSerde +} + +// Contains information about an IAM group, including all of the group's policies. +// This data type is used as a response element in the +// GetAccountAuthorizationDetails operation. +type GroupDetail struct { + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + Arn *string + + // A list of the managed policies attached to the group. + AttachedManagedPolicies []AttachedPolicy + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the group was created. + CreateDate *time.Time + + // The stable and unique string identifying the group. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + GroupId *string + + // The friendly name that identifies the group. + GroupName *string + + // A list of the inline policies embedded in the group. + GroupPolicyList []PolicyDetail + + // The path to the group. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + Path *string + + noSmithyDocumentSerde +} + +// Contains information about an instance profile. This data type is used as a +// response element in the following operations: +// - CreateInstanceProfile +// - GetInstanceProfile +// - ListInstanceProfiles +// - ListInstanceProfilesForRole +type InstanceProfile struct { + + // The Amazon Resource Name (ARN) specifying the instance profile. For more + // information about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + Arn *string + + // The date when the instance profile was created. + // + // This member is required. + CreateDate *time.Time + + // The stable and unique string identifying the instance profile. For more + // information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + InstanceProfileId *string + + // The name identifying the instance profile. + // + // This member is required. + InstanceProfileName *string + + // The path to the instance profile. For more information about paths, see IAM + // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + Path *string + + // The role associated with the instance profile. + // + // This member is required. + Roles []Role + + // A list of tags that are attached to the instance profile. For more information + // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []Tag + + noSmithyDocumentSerde +} + +// Contains details about the permissions policies that are attached to the +// specified identity (user, group, or role). This data type is used as a response +// element in the ListPoliciesGrantingServiceAccess operation. +type ListPoliciesGrantingServiceAccessEntry struct { + + // The PoliciesGrantingServiceAccess object that contains details about the policy. + Policies []PolicyGrantingServiceAccess + + // The namespace of the service that was accessed. To learn the service namespace + // of a service, see Actions, resources, and condition keys for Amazon Web + // Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) + // in the Service Authorization Reference. Choose the name of the service to view + // details for that service. In the first paragraph, find the service prefix. For + // example, (service prefix: a4b) . For more information about service namespaces, + // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + ServiceNamespace *string + + noSmithyDocumentSerde +} + +// Contains the user name and password create date for a user. This data type is +// used as a response element in the CreateLoginProfile and GetLoginProfile +// operations. +type LoginProfile struct { + + // The date when the password for the user was created. + // + // This member is required. + CreateDate *time.Time + + // The name of the user, which can be used for signing in to the Amazon Web + // Services Management Console. + // + // This member is required. + UserName *string + + // Specifies whether the user is required to set a new password on next sign-in. + PasswordResetRequired bool + + noSmithyDocumentSerde +} + +// Contains information about a managed policy, including the policy's ARN, +// versions, and the number of principal entities (users, groups, and roles) that +// the policy is attached to. This data type is used as a response element in the +// GetAccountAuthorizationDetails operation. For more information about managed +// policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +type ManagedPolicyDetail struct { + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + Arn *string + + // The number of principal entities (users, groups, and roles) that the policy is + // attached to. + AttachmentCount *int32 + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the policy was created. + CreateDate *time.Time + + // The identifier for the version of the policy that is set as the default + // (operative) version. For more information about policy versions, see Versioning + // for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) + // in the IAM User Guide. + DefaultVersionId *string + + // A friendly description of the policy. + Description *string + + // Specifies whether the policy can be attached to an IAM user, group, or role. + IsAttachable bool + + // The path to the policy. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + Path *string + + // The number of entities (users and roles) for which the policy is used as the + // permissions boundary. For more information about permissions boundaries, see + // Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundaryUsageCount *int32 + + // The stable and unique string identifying the policy. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + PolicyId *string + + // The friendly name (not ARN) identifying the policy. + PolicyName *string + + // A list containing information about the versions of the policy. + PolicyVersionList []PolicyVersion + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the policy was last updated. When a policy has only one version, this + // field contains the date and time when the policy was created. When a policy has + // more than one version, this field contains the date and time when the most + // recent policy version was created. + UpdateDate *time.Time + + noSmithyDocumentSerde +} + +// Contains information about an MFA device. This data type is used as a response +// element in the ListMFADevices operation. +type MFADevice struct { + + // The date when the MFA device was enabled for the user. + // + // This member is required. + EnableDate *time.Time + + // The serial number that uniquely identifies the MFA device. For virtual MFA + // devices, the serial number is the device ARN. + // + // This member is required. + SerialNumber *string + + // The user with whom the MFA device is associated. + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +// Contains the Amazon Resource Name (ARN) for an IAM OpenID Connect provider. +type OpenIDConnectProviderListEntry struct { + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + Arn *string + + noSmithyDocumentSerde +} + +// Contains information about the effect that Organizations has on a policy +// simulation. +type OrganizationsDecisionDetail struct { + + // Specifies whether the simulated operation is allowed by the Organizations + // service control policies that impact the simulated user's account. + AllowedByOrganizations bool + + noSmithyDocumentSerde +} + +// Contains information about the account password policy. This data type is used +// as a response element in the GetAccountPasswordPolicy operation. +type PasswordPolicy struct { + + // Specifies whether IAM users are allowed to change their own password. Gives IAM + // users permissions to iam:ChangePassword for only their user and to the + // iam:GetAccountPasswordPolicy action. This option does not attach a permissions + // policy to each user, rather the permissions are applied at the account-level for + // all users by IAM. + AllowUsersToChangePassword bool + + // Indicates whether passwords in the account expire. Returns true if + // MaxPasswordAge contains a value greater than 0. Returns false if MaxPasswordAge + // is 0 or not present. + ExpirePasswords bool + + // Specifies whether IAM users are prevented from setting a new password via the + // Amazon Web Services Management Console after their password has expired. The IAM + // user cannot access the console until an administrator resets the password. IAM + // users with iam:ChangePassword permission and active access keys can reset their + // own expired console password using the CLI or API. + HardExpiry *bool + + // The number of days that an IAM user password is valid. + MaxPasswordAge *int32 + + // Minimum length to require for IAM user passwords. + MinimumPasswordLength *int32 + + // Specifies the number of previous passwords that IAM users are prevented from + // reusing. + PasswordReusePrevention *int32 + + // Specifies whether IAM user passwords must contain at least one lowercase + // character (a to z). + RequireLowercaseCharacters bool + + // Specifies whether IAM user passwords must contain at least one numeric + // character (0 to 9). + RequireNumbers bool + + // Specifies whether IAM user passwords must contain at least one of the following + // symbols: ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' + RequireSymbols bool + + // Specifies whether IAM user passwords must contain at least one uppercase + // character (A to Z). + RequireUppercaseCharacters bool + + noSmithyDocumentSerde +} + +// Contains information about the effect that a permissions boundary has on a +// policy simulation when the boundary is applied to an IAM entity. +type PermissionsBoundaryDecisionDetail struct { + + // Specifies whether an action is allowed by a permissions boundary that is + // applied to an IAM entity (user or role). A value of true means that the + // permissions boundary does not deny the action. This means that the policy + // includes an Allow statement that matches the request. In this case, if an + // identity-based policy also allows the action, the request is allowed. A value of + // false means that either the requested action is not allowed (implicitly denied) + // or that the action is explicitly denied by the permissions boundary. In both of + // these cases, the action is not allowed, regardless of the identity-based policy. + AllowedByPermissionsBoundary bool + + noSmithyDocumentSerde +} + +// Contains information about a managed policy. This data type is used as a +// response element in the CreatePolicy , GetPolicy , and ListPolicies operations. +// For more information about managed policies, refer to Managed policies and +// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +type Policy struct { + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + Arn *string + + // The number of entities (users, groups, and roles) that the policy is attached + // to. + AttachmentCount *int32 + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the policy was created. + CreateDate *time.Time + + // The identifier for the version of the policy that is set as the default version. + DefaultVersionId *string + + // A friendly description of the policy. This element is included in the response + // to the GetPolicy operation. It is not included in the response to the + // ListPolicies operation. + Description *string + + // Specifies whether the policy can be attached to an IAM user, group, or role. + IsAttachable bool + + // The path to the policy. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + Path *string + + // The number of entities (users and roles) for which the policy is used to set + // the permissions boundary. For more information about permissions boundaries, see + // Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundaryUsageCount *int32 + + // The stable and unique string identifying the policy. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + PolicyId *string + + // The friendly name (not ARN) identifying the policy. + PolicyName *string + + // A list of tags that are attached to the instance profile. For more information + // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []Tag + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the policy was last updated. When a policy has only one version, this + // field contains the date and time when the policy was created. When a policy has + // more than one version, this field contains the date and time when the most + // recent policy version was created. + UpdateDate *time.Time + + noSmithyDocumentSerde +} + +// Contains information about an IAM policy, including the policy document. This +// data type is used as a response element in the GetAccountAuthorizationDetails +// operation. +type PolicyDetail struct { + + // The policy document. + PolicyDocument *string + + // The name of the policy. + PolicyName *string + + noSmithyDocumentSerde +} + +// Contains details about the permissions policies that are attached to the +// specified identity (user, group, or role). This data type is an element of the +// ListPoliciesGrantingServiceAccessEntry object. +type PolicyGrantingServiceAccess struct { + + // The policy name. + // + // This member is required. + PolicyName *string + + // The policy type. For more information about these policy types, see Managed + // policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) + // in the IAM User Guide. + // + // This member is required. + PolicyType PolicyType + + // The name of the entity (user or role) to which the inline policy is attached. + // This field is null for managed policies. For more information about these policy + // types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) + // in the IAM User Guide. + EntityName *string + + // The type of entity (user or role) that used the policy to access the service to + // which the inline policy is attached. This field is null for managed policies. + // For more information about these policy types, see Managed policies and inline + // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) + // in the IAM User Guide. + EntityType PolicyOwnerEntityType + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + PolicyArn *string + + noSmithyDocumentSerde +} + +// Contains information about a group that a managed policy is attached to. This +// data type is used as a response element in the ListEntitiesForPolicy operation. +// For more information about managed policies, refer to Managed policies and +// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +type PolicyGroup struct { + + // The stable and unique string identifying the group. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in the IAM User Guide. + GroupId *string + + // The name (friendly name, not ARN) identifying the group. + GroupName *string + + noSmithyDocumentSerde +} + +// Contains information about a role that a managed policy is attached to. This +// data type is used as a response element in the ListEntitiesForPolicy operation. +// For more information about managed policies, refer to Managed policies and +// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +type PolicyRole struct { + + // The stable and unique string identifying the role. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in the IAM User Guide. + RoleId *string + + // The name (friendly name, not ARN) identifying the role. + RoleName *string + + noSmithyDocumentSerde +} + +// Contains information about a user that a managed policy is attached to. This +// data type is used as a response element in the ListEntitiesForPolicy operation. +// For more information about managed policies, refer to Managed policies and +// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +type PolicyUser struct { + + // The stable and unique string identifying the user. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in the IAM User Guide. + UserId *string + + // The name (friendly name, not ARN) identifying the user. + UserName *string + + noSmithyDocumentSerde +} + +// Contains information about a version of a managed policy. This data type is +// used as a response element in the CreatePolicyVersion , GetPolicyVersion , +// ListPolicyVersions , and GetAccountAuthorizationDetails operations. For more +// information about managed policies, refer to Managed policies and inline +// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM User Guide. +type PolicyVersion struct { + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the policy version was created. + CreateDate *time.Time + + // The policy document. The policy document is returned in the response to the + // GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not + // returned in the response to the CreatePolicyVersion or ListPolicyVersions + // operations. The policy document returned in this structure is URL-encoded + // compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a + // URL decoding method to convert the policy back to plain JSON text. For example, + // if you use Java, you can use the decode method of the java.net.URLDecoder + // utility class in the Java SDK. Other languages and SDKs provide similar + // functionality. + Document *string + + // Specifies whether the policy version is set as the policy's default version. + IsDefaultVersion bool + + // The identifier for the policy version. Policy version identifiers always begin + // with v (always lowercase). When a policy is created, the first policy version + // is v1 . + VersionId *string + + noSmithyDocumentSerde +} + +// Contains the row and column of a location of a Statement element in a policy +// document. This data type is used as a member of the Statement type. +type Position struct { + + // The column in the line containing the specified position in the document. + Column int32 + + // The line containing the specified position in the document. + Line int32 + + noSmithyDocumentSerde +} + +// Contains the result of the simulation of a single API operation call on a +// single resource. This data type is used by a member of the EvaluationResult +// data type. +type ResourceSpecificResult struct { + + // The result of the simulation of the simulated API operation on the resource + // specified in EvalResourceName . + // + // This member is required. + EvalResourceDecision PolicyEvaluationDecisionType + + // The name of the simulated resource, in Amazon Resource Name (ARN) format. + // + // This member is required. + EvalResourceName *string + + // Additional details about the results of the evaluation decision on a single + // resource. This parameter is returned only for cross-account simulations. This + // parameter explains how each policy type contributes to the resource-specific + // evaluation decision. + EvalDecisionDetails map[string]PolicyEvaluationDecisionType + + // A list of the statements in the input policies that determine the result for + // this part of the simulation. Remember that even if multiple statements allow the + // operation on the resource, if any statement denies that operation, then the + // explicit deny overrides any allow. In addition, the deny statement is the only + // entry included in the result. + MatchedStatements []Statement + + // A list of context keys that are required by the included input policies but + // that were not provided by one of the input parameters. This list is used when a + // list of ARNs is included in the ResourceArns parameter instead of "*". If you + // do not specify individual resources, by setting ResourceArns to "*" or by not + // including the ResourceArns parameter, then any missing context values are + // instead included under the EvaluationResults section. To discover the context + // keys used by a set of policies, you can call GetContextKeysForCustomPolicy or + // GetContextKeysForPrincipalPolicy . + MissingContextValues []string + + // Contains information about the effect that a permissions boundary has on a + // policy simulation when that boundary is applied to an IAM entity. + PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail + + noSmithyDocumentSerde +} + +// Contains information about an IAM role. This structure is returned as a +// response element in several API operations that interact with roles. +type Role struct { + + // The Amazon Resource Name (ARN) specifying the role. For more information about + // ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide guide. + // + // This member is required. + Arn *string + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the role was created. + // + // This member is required. + CreateDate *time.Time + + // The path to the role. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + Path *string + + // The stable and unique string identifying the role. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + RoleId *string + + // The friendly name that identifies the role. + // + // This member is required. + RoleName *string + + // The policy that grants an entity permission to assume the role. + AssumeRolePolicyDocument *string + + // A description of the role that you provide. + Description *string + + // The maximum session duration (in seconds) for the specified role. Anyone who + // uses the CLI, or API to assume the role can specify the duration using the + // optional DurationSeconds API parameter or duration-seconds CLI parameter. + MaxSessionDuration *int32 + + // The ARN of the policy used to set the permissions boundary for the role. For + // more information about permissions boundaries, see Permissions boundaries for + // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary + + // Contains information about the last time that an IAM role was used. This + // includes the date and time and the Region in which the role was last used. + // Activity is only reported for the trailing 400 days. This period can be shorter + // if your Region began supporting these features within the last year. The role + // might have been used more than 400 days ago. For more information, see Regions + // where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) + // in the IAM user Guide. + RoleLastUsed *RoleLastUsed + + // A list of tags that are attached to the role. For more information about + // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []Tag + + noSmithyDocumentSerde +} + +// Contains information about an IAM role, including all of the role's policies. +// This data type is used as a response element in the +// GetAccountAuthorizationDetails operation. +type RoleDetail struct { + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + Arn *string + + // The trust policy that grants permission to assume the role. + AssumeRolePolicyDocument *string + + // A list of managed policies attached to the role. These policies are the role's + // access (permissions) policies. + AttachedManagedPolicies []AttachedPolicy + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the role was created. + CreateDate *time.Time + + // A list of instance profiles that contain this role. + InstanceProfileList []InstanceProfile + + // The path to the role. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + Path *string + + // The ARN of the policy used to set the permissions boundary for the role. For + // more information about permissions boundaries, see Permissions boundaries for + // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary + + // The stable and unique string identifying the role. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + RoleId *string + + // Contains information about the last time that an IAM role was used. This + // includes the date and time and the Region in which the role was last used. + // Activity is only reported for the trailing 400 days. This period can be shorter + // if your Region began supporting these features within the last year. The role + // might have been used more than 400 days ago. For more information, see Regions + // where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) + // in the IAM User Guide. + RoleLastUsed *RoleLastUsed + + // The friendly name that identifies the role. + RoleName *string + + // A list of inline policies embedded in the role. These policies are the role's + // access (permissions) policies. + RolePolicyList []PolicyDetail + + // A list of tags that are attached to the role. For more information about + // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []Tag + + noSmithyDocumentSerde +} + +// Contains information about the last time that an IAM role was used. This +// includes the date and time and the Region in which the role was last used. +// Activity is only reported for the trailing 400 days. This period can be shorter +// if your Region began supporting these features within the last year. The role +// might have been used more than 400 days ago. For more information, see Regions +// where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) +// in the IAM user Guide. This data type is returned as a response element in the +// GetRole and GetAccountAuthorizationDetails operations. +type RoleLastUsed struct { + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // that the role was last used. This field is null if the role has not been used + // within the IAM tracking period. For more information about the tracking period, + // see Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) + // in the IAM User Guide. + LastUsedDate *time.Time + + // The name of the Amazon Web Services Region in which the role was last used. + Region *string + + noSmithyDocumentSerde +} + +// An object that contains details about how a service-linked role is used, if +// that information is returned by the service. This data type is used as a +// response element in the GetServiceLinkedRoleDeletionStatus operation. +type RoleUsageType struct { + + // The name of the Region where the service-linked role is being used. + Region *string + + // The name of the resource that is using the service-linked role. + Resources []string + + noSmithyDocumentSerde +} + +// Contains the list of SAML providers for this account. +type SAMLProviderListEntry struct { + + // The Amazon Resource Name (ARN) of the SAML provider. + Arn *string + + // The date and time when the SAML provider was created. + CreateDate *time.Time + + // The expiration date and time for the SAML provider. + ValidUntil *time.Time + + noSmithyDocumentSerde +} + +// Contains information about a server certificate. This data type is used as a +// response element in the GetServerCertificate operation. +type ServerCertificate struct { + + // The contents of the public key certificate. + // + // This member is required. + CertificateBody *string + + // The meta information of the server certificate, such as its name, path, ID, and + // ARN. + // + // This member is required. + ServerCertificateMetadata *ServerCertificateMetadata + + // The contents of the public key certificate chain. + CertificateChain *string + + // A list of tags that are attached to the server certificate. For more + // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []Tag + + noSmithyDocumentSerde +} + +// Contains information about a server certificate without its certificate body, +// certificate chain, and private key. This data type is used as a response element +// in the UploadServerCertificate and ListServerCertificates operations. +type ServerCertificateMetadata struct { + + // The Amazon Resource Name (ARN) specifying the server certificate. For more + // information about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + Arn *string + + // The path to the server certificate. For more information about paths, see IAM + // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + Path *string + + // The stable and unique string identifying the server certificate. For more + // information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + ServerCertificateId *string + + // The name that identifies the server certificate. + // + // This member is required. + ServerCertificateName *string + + // The date on which the certificate is set to expire. + Expiration *time.Time + + // The date when the server certificate was uploaded. + UploadDate *time.Time + + noSmithyDocumentSerde +} + +// Contains details about the most recent attempt to access the service. This data +// type is used as a response element in the GetServiceLastAccessedDetails +// operation. +type ServiceLastAccessed struct { + + // The name of the service in which access was attempted. + // + // This member is required. + ServiceName *string + + // The namespace of the service in which access was attempted. To learn the + // service namespace of a service, see Actions, resources, and condition keys for + // Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) + // in the Service Authorization Reference. Choose the name of the service to view + // details for that service. In the first paragraph, find the service prefix. For + // example, (service prefix: a4b) . For more information about service namespaces, + // see Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the Amazon Web Services General Reference. + // + // This member is required. + ServiceNamespace *string + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when an authenticated entity most recently attempted to access the service. + // Amazon Web Services does not report unauthenticated requests. This field is null + // if no IAM entities attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + LastAuthenticated *time.Time + + // The ARN of the authenticated entity (user or role) that last attempted to + // access the service. Amazon Web Services does not report unauthenticated + // requests. This field is null if no IAM entities attempted to access the service + // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + LastAuthenticatedEntity *string + + // The Region from which the authenticated entity (user or role) last attempted to + // access the service. Amazon Web Services does not report unauthenticated + // requests. This field is null if no IAM entities attempted to access the service + // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + LastAuthenticatedRegion *string + + // The total number of authenticated principals (root user, IAM users, or IAM + // roles) that have attempted to access the service. This field is null if no + // principals attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + TotalAuthenticatedEntities *int32 + + // An object that contains details about the most recent attempt to access a + // tracked action within the service. This field is null if there no tracked + // actions or if the principal did not use the tracked actions within the tracking + // period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . This field is also null if the report was generated at the service level and + // not the action level. For more information, see the Granularity field in + // GenerateServiceLastAccessedDetails . + TrackedActionsLastAccessed []TrackedActionLastAccessed + + noSmithyDocumentSerde +} + +// Contains the details of a service-specific credential. +type ServiceSpecificCredential struct { + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the service-specific credential were created. + // + // This member is required. + CreateDate *time.Time + + // The name of the service associated with the service-specific credential. + // + // This member is required. + ServiceName *string + + // The generated password for the service-specific credential. + // + // This member is required. + ServicePassword *string + + // The unique identifier for the service-specific credential. + // + // This member is required. + ServiceSpecificCredentialId *string + + // The generated user name for the service-specific credential. This value is + // generated by combining the IAM user's name combined with the ID number of the + // Amazon Web Services account, as in jane-at-123456789012 , for example. This + // value cannot be configured by the user. + // + // This member is required. + ServiceUserName *string + + // The status of the service-specific credential. Active means that the key is + // valid for API calls, while Inactive means it is not. + // + // This member is required. + Status StatusType + + // The name of the IAM user associated with the service-specific credential. + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +// Contains additional details about a service-specific credential. +type ServiceSpecificCredentialMetadata struct { + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the service-specific credential were created. + // + // This member is required. + CreateDate *time.Time + + // The name of the service associated with the service-specific credential. + // + // This member is required. + ServiceName *string + + // The unique identifier for the service-specific credential. + // + // This member is required. + ServiceSpecificCredentialId *string + + // The generated user name for the service-specific credential. + // + // This member is required. + ServiceUserName *string + + // The status of the service-specific credential. Active means that the key is + // valid for API calls, while Inactive means it is not. + // + // This member is required. + Status StatusType + + // The name of the IAM user associated with the service-specific credential. + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +// Contains information about an X.509 signing certificate. This data type is used +// as a response element in the UploadSigningCertificate and +// ListSigningCertificates operations. +type SigningCertificate struct { + + // The contents of the signing certificate. + // + // This member is required. + CertificateBody *string + + // The ID for the signing certificate. + // + // This member is required. + CertificateId *string + + // The status of the signing certificate. Active means that the key is valid for + // API calls, while Inactive means it is not. + // + // This member is required. + Status StatusType + + // The name of the user the signing certificate is associated with. + // + // This member is required. + UserName *string + + // The date when the signing certificate was uploaded. + UploadDate *time.Time + + noSmithyDocumentSerde +} + +// Contains information about an SSH public key. This data type is used as a +// response element in the GetSSHPublicKey and UploadSSHPublicKey operations. +type SSHPublicKey struct { + + // The MD5 message digest of the SSH public key. + // + // This member is required. + Fingerprint *string + + // The SSH public key. + // + // This member is required. + SSHPublicKeyBody *string + + // The unique identifier for the SSH public key. + // + // This member is required. + SSHPublicKeyId *string + + // The status of the SSH public key. Active means that the key can be used for + // authentication with an CodeCommit repository. Inactive means that the key + // cannot be used. + // + // This member is required. + Status StatusType + + // The name of the IAM user associated with the SSH public key. + // + // This member is required. + UserName *string + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the SSH public key was uploaded. + UploadDate *time.Time + + noSmithyDocumentSerde +} + +// Contains information about an SSH public key, without the key's body or +// fingerprint. This data type is used as a response element in the +// ListSSHPublicKeys operation. +type SSHPublicKeyMetadata struct { + + // The unique identifier for the SSH public key. + // + // This member is required. + SSHPublicKeyId *string + + // The status of the SSH public key. Active means that the key can be used for + // authentication with an CodeCommit repository. Inactive means that the key + // cannot be used. + // + // This member is required. + Status StatusType + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the SSH public key was uploaded. + // + // This member is required. + UploadDate *time.Time + + // The name of the IAM user associated with the SSH public key. + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +// Contains a reference to a Statement element in a policy document that +// determines the result of the simulation. This data type is used by the +// MatchedStatements member of the EvaluationResult type. +type Statement struct { + + // The row and column of the end of a Statement in an IAM policy. + EndPosition *Position + + // The identifier of the policy that was provided as an input. + SourcePolicyId *string + + // The type of the policy. + SourcePolicyType PolicySourceType + + // The row and column of the beginning of the Statement in an IAM policy. + StartPosition *Position + + noSmithyDocumentSerde +} + +// A structure that represents user-provided metadata that can be associated with +// an IAM resource. For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +type Tag struct { + + // The key name that can be used to look up or retrieve the associated value. For + // example, Department or Cost Center are common choices. + // + // This member is required. + Key *string + + // The value associated with this tag. For example, tags with a key name of + // Department could have values such as Human Resources , Accounting , and Support + // . Tags with a key name of Cost Center might have values that consist of the + // number associated with the different cost centers in your company. Typically, + // many resources have tags with the same key name but with different values. + // Amazon Web Services always interprets the tag Value as a single string. If you + // need to store an array, you can store comma-separated values in the string. + // However, you must interpret the value in your code. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Contains details about the most recent attempt to access an action within the +// service. This data type is used as a response element in the +// GetServiceLastAccessedDetails operation. +type TrackedActionLastAccessed struct { + + // The name of the tracked action to which access was attempted. Tracked actions + // are actions that report activity to IAM. + ActionName *string + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + LastAccessedEntity *string + + // The Region from which the authenticated entity (user or role) last attempted to + // access the tracked action. Amazon Web Services does not report unauthenticated + // requests. This field is null if no IAM entities attempted to access the service + // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + LastAccessedRegion *string + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when an authenticated entity most recently attempted to access the tracked + // service. Amazon Web Services does not report unauthenticated requests. This + // field is null if no IAM entities attempted to access the service within the + // tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) + // . + LastAccessedTime *time.Time + + noSmithyDocumentSerde +} + +// Contains information about an IAM user entity. This data type is used as a +// response element in the following operations: +// - CreateUser +// - GetUser +// - ListUsers +type User struct { + + // The Amazon Resource Name (ARN) that identifies the user. For more information + // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + Arn *string + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the user was created. + // + // This member is required. + CreateDate *time.Time + + // The path to the user. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. The ARN of the policy used to set the permissions + // boundary for the user. + // + // This member is required. + Path *string + + // The stable and unique string identifying the user. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + // + // This member is required. + UserId *string + + // The friendly name identifying the user. + // + // This member is required. + UserName *string + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the user's password was last used to sign in to an Amazon Web Services + // website. For a list of Amazon Web Services websites that capture a user's last + // sign-in time, see the Credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) + // topic in the IAM User Guide. If a password is used more than once in a + // five-minute span, only the first use is returned in this field. If the field is + // null (no value), then it indicates that they never signed in with a password. + // This can be because: + // - The user never had a password. + // - A password exists but has not been used since IAM started tracking this + // information on October 20, 2014. + // A null value does not mean that the user never had a password. Also, if the + // user does not currently have a password but had one in the past, then this field + // contains the date and time the most recent password was used. This value is + // returned only in the GetUser and ListUsers operations. + PasswordLastUsed *time.Time + + // For more information about permissions boundaries, see Permissions boundaries + // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary + + // A list of tags that are associated with the user. For more information about + // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []Tag + + noSmithyDocumentSerde +} + +// Contains information about an IAM user, including all the user's policies and +// all the IAM groups the user is in. This data type is used as a response element +// in the GetAccountAuthorizationDetails operation. +type UserDetail struct { + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web + // Services resources. For more information about ARNs, go to Amazon Resource + // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. + Arn *string + + // A list of the managed policies attached to the user. + AttachedManagedPolicies []AttachedPolicy + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) + // , when the user was created. + CreateDate *time.Time + + // A list of IAM groups that the user is in. + GroupList []string + + // The path to the user. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + Path *string + + // The ARN of the policy used to set the permissions boundary for the user. For + // more information about permissions boundaries, see Permissions boundaries for + // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary + + // A list of tags that are associated with the user. For more information about + // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []Tag + + // The stable and unique string identifying the user. For more information about + // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the IAM User Guide. + UserId *string + + // The friendly name identifying the user. + UserName *string + + // A list of the inline policies embedded in the user. + UserPolicyList []PolicyDetail + + noSmithyDocumentSerde +} + +// Contains information about a virtual MFA device. +type VirtualMFADevice struct { + + // The serial number associated with VirtualMFADevice . + // + // This member is required. + SerialNumber *string + + // The base32 seed defined as specified in RFC3548 (https://tools.ietf.org/html/rfc3548.txt) + // . The Base32StringSeed is base32-encoded. + Base32StringSeed []byte + + // The date and time on which the virtual MFA device was enabled. + EnableDate *time.Time + + // A QR code PNG image that encodes + // otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String where + // $virtualMFADeviceName is one of the create call arguments. AccountName is the + // user name if set (otherwise, the account ID otherwise), and Base32String is the + // seed in base32 format. The Base32String value is base64-encoded. + QRCodePNG []byte + + // A list of tags that are attached to the virtual MFA device. For more + // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []Tag + + // The IAM user associated with this virtual MFA device. + User *User + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/validators.go new file mode 100644 index 0000000000000..69084268dc4e4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/validators.go @@ -0,0 +1,5620 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAddClientIDToOpenIDConnectProvider struct { +} + +func (*validateOpAddClientIDToOpenIDConnectProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddClientIDToOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddClientIDToOpenIDConnectProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddClientIDToOpenIDConnectProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAddRoleToInstanceProfile struct { +} + +func (*validateOpAddRoleToInstanceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddRoleToInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddRoleToInstanceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddRoleToInstanceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAddUserToGroup struct { +} + +func (*validateOpAddUserToGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddUserToGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddUserToGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddUserToGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAttachGroupPolicy struct { +} + +func (*validateOpAttachGroupPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAttachGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AttachGroupPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAttachGroupPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAttachRolePolicy struct { +} + +func (*validateOpAttachRolePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAttachRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AttachRolePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAttachRolePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAttachUserPolicy struct { +} + +func (*validateOpAttachUserPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAttachUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AttachUserPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAttachUserPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpChangePassword struct { +} + +func (*validateOpChangePassword) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpChangePassword) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ChangePasswordInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpChangePasswordInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateAccountAlias struct { +} + +func (*validateOpCreateAccountAlias) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAccountAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAccountAliasInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAccountAliasInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateGroup struct { +} + +func (*validateOpCreateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateInstanceProfile struct { +} + +func (*validateOpCreateInstanceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateInstanceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateInstanceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateLoginProfile struct { +} + +func (*validateOpCreateLoginProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLoginProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLoginProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateOpenIDConnectProvider struct { +} + +func (*validateOpCreateOpenIDConnectProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOpenIDConnectProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOpenIDConnectProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreatePolicy struct { +} + +func (*validateOpCreatePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreatePolicyVersion struct { +} + +func (*validateOpCreatePolicyVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePolicyVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePolicyVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateRole struct { +} + +func (*validateOpCreateRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateSAMLProvider struct { +} + +func (*validateOpCreateSAMLProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateSAMLProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateSAMLProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateServiceLinkedRole struct { +} + +func (*validateOpCreateServiceLinkedRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateServiceLinkedRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateServiceLinkedRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateServiceLinkedRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateServiceSpecificCredential struct { +} + +func (*validateOpCreateServiceSpecificCredential) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateServiceSpecificCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateServiceSpecificCredentialInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateServiceSpecificCredentialInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateUser struct { +} + +func (*validateOpCreateUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateVirtualMFADevice struct { +} + +func (*validateOpCreateVirtualMFADevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateVirtualMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateVirtualMFADeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateVirtualMFADeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeactivateMFADevice struct { +} + +func (*validateOpDeactivateMFADevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeactivateMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeactivateMFADeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeactivateMFADeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAccessKey struct { +} + +func (*validateOpDeleteAccessKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAccessKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAccessKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAccessKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAccountAlias struct { +} + +func (*validateOpDeleteAccountAlias) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAccountAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAccountAliasInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAccountAliasInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteGroup struct { +} + +func (*validateOpDeleteGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteGroupPolicy struct { +} + +func (*validateOpDeleteGroupPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteGroupPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteGroupPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteInstanceProfile struct { +} + +func (*validateOpDeleteInstanceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteInstanceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteInstanceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLoginProfile struct { +} + +func (*validateOpDeleteLoginProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLoginProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLoginProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteOpenIDConnectProvider struct { +} + +func (*validateOpDeleteOpenIDConnectProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteOpenIDConnectProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteOpenIDConnectProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeletePolicy struct { +} + +func (*validateOpDeletePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeletePolicyVersion struct { +} + +func (*validateOpDeletePolicyVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePolicyVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePolicyVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteRole struct { +} + +func (*validateOpDeleteRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteRolePermissionsBoundary struct { +} + +func (*validateOpDeleteRolePermissionsBoundary) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRolePermissionsBoundary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRolePermissionsBoundaryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRolePermissionsBoundaryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteRolePolicy struct { +} + +func (*validateOpDeleteRolePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRolePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRolePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteSAMLProvider struct { +} + +func (*validateOpDeleteSAMLProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteSAMLProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteSAMLProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteServerCertificate struct { +} + +func (*validateOpDeleteServerCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteServerCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteServerCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteServiceLinkedRole struct { +} + +func (*validateOpDeleteServiceLinkedRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteServiceLinkedRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteServiceLinkedRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteServiceLinkedRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteServiceSpecificCredential struct { +} + +func (*validateOpDeleteServiceSpecificCredential) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteServiceSpecificCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteServiceSpecificCredentialInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteServiceSpecificCredentialInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteSigningCertificate struct { +} + +func (*validateOpDeleteSigningCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteSigningCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteSigningCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteSigningCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteSSHPublicKey struct { +} + +func (*validateOpDeleteSSHPublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteSSHPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteSSHPublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteSSHPublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteUser struct { +} + +func (*validateOpDeleteUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteUserPermissionsBoundary struct { +} + +func (*validateOpDeleteUserPermissionsBoundary) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteUserPermissionsBoundary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteUserPermissionsBoundaryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteUserPermissionsBoundaryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteUserPolicy struct { +} + +func (*validateOpDeleteUserPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteUserPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteUserPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteVirtualMFADevice struct { +} + +func (*validateOpDeleteVirtualMFADevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteVirtualMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteVirtualMFADeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteVirtualMFADeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDetachGroupPolicy struct { +} + +func (*validateOpDetachGroupPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDetachGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DetachGroupPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDetachGroupPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDetachRolePolicy struct { +} + +func (*validateOpDetachRolePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDetachRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DetachRolePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDetachRolePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDetachUserPolicy struct { +} + +func (*validateOpDetachUserPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDetachUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DetachUserPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDetachUserPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpEnableMFADevice struct { +} + +func (*validateOpEnableMFADevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpEnableMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*EnableMFADeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpEnableMFADeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGenerateOrganizationsAccessReport struct { +} + +func (*validateOpGenerateOrganizationsAccessReport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGenerateOrganizationsAccessReport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GenerateOrganizationsAccessReportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGenerateOrganizationsAccessReportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGenerateServiceLastAccessedDetails struct { +} + +func (*validateOpGenerateServiceLastAccessedDetails) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGenerateServiceLastAccessedDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GenerateServiceLastAccessedDetailsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGenerateServiceLastAccessedDetailsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAccessKeyLastUsed struct { +} + +func (*validateOpGetAccessKeyLastUsed) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAccessKeyLastUsed) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAccessKeyLastUsedInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAccessKeyLastUsedInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetContextKeysForCustomPolicy struct { +} + +func (*validateOpGetContextKeysForCustomPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetContextKeysForCustomPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetContextKeysForCustomPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetContextKeysForCustomPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetContextKeysForPrincipalPolicy struct { +} + +func (*validateOpGetContextKeysForPrincipalPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetContextKeysForPrincipalPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetContextKeysForPrincipalPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetContextKeysForPrincipalPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetGroup struct { +} + +func (*validateOpGetGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetGroupPolicy struct { +} + +func (*validateOpGetGroupPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetGroupPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetGroupPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetInstanceProfile struct { +} + +func (*validateOpGetInstanceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetInstanceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetInstanceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLoginProfile struct { +} + +func (*validateOpGetLoginProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLoginProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLoginProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetMFADevice struct { +} + +func (*validateOpGetMFADevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMFADeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMFADeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOpenIDConnectProvider struct { +} + +func (*validateOpGetOpenIDConnectProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOpenIDConnectProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOpenIDConnectProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOrganizationsAccessReport struct { +} + +func (*validateOpGetOrganizationsAccessReport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOrganizationsAccessReport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOrganizationsAccessReportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOrganizationsAccessReportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPolicy struct { +} + +func (*validateOpGetPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPolicyVersion struct { +} + +func (*validateOpGetPolicyVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPolicyVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPolicyVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetRole struct { +} + +func (*validateOpGetRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetRolePolicy struct { +} + +func (*validateOpGetRolePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRolePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRolePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetSAMLProvider struct { +} + +func (*validateOpGetSAMLProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSAMLProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSAMLProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetServerCertificate struct { +} + +func (*validateOpGetServerCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetServerCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetServerCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetServiceLastAccessedDetails struct { +} + +func (*validateOpGetServiceLastAccessedDetails) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetServiceLastAccessedDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetServiceLastAccessedDetailsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetServiceLastAccessedDetailsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetServiceLastAccessedDetailsWithEntities struct { +} + +func (*validateOpGetServiceLastAccessedDetailsWithEntities) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetServiceLastAccessedDetailsWithEntities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetServiceLastAccessedDetailsWithEntitiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetServiceLastAccessedDetailsWithEntitiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetServiceLinkedRoleDeletionStatus struct { +} + +func (*validateOpGetServiceLinkedRoleDeletionStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetServiceLinkedRoleDeletionStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetServiceLinkedRoleDeletionStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetServiceLinkedRoleDeletionStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetSSHPublicKey struct { +} + +func (*validateOpGetSSHPublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSSHPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSSHPublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSSHPublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetUserPolicy struct { +} + +func (*validateOpGetUserPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetUserPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetUserPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAttachedGroupPolicies struct { +} + +func (*validateOpListAttachedGroupPolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAttachedGroupPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAttachedGroupPoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAttachedGroupPoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAttachedRolePolicies struct { +} + +func (*validateOpListAttachedRolePolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAttachedRolePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAttachedRolePoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAttachedRolePoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAttachedUserPolicies struct { +} + +func (*validateOpListAttachedUserPolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAttachedUserPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAttachedUserPoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAttachedUserPoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListEntitiesForPolicy struct { +} + +func (*validateOpListEntitiesForPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListEntitiesForPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEntitiesForPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEntitiesForPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListGroupPolicies struct { +} + +func (*validateOpListGroupPolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListGroupPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListGroupPoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListGroupPoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListGroupsForUser struct { +} + +func (*validateOpListGroupsForUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListGroupsForUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListGroupsForUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListGroupsForUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListInstanceProfilesForRole struct { +} + +func (*validateOpListInstanceProfilesForRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListInstanceProfilesForRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListInstanceProfilesForRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListInstanceProfilesForRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListInstanceProfileTags struct { +} + +func (*validateOpListInstanceProfileTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListInstanceProfileTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListInstanceProfileTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListInstanceProfileTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListMFADeviceTags struct { +} + +func (*validateOpListMFADeviceTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListMFADeviceTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListMFADeviceTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListMFADeviceTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListOpenIDConnectProviderTags struct { +} + +func (*validateOpListOpenIDConnectProviderTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListOpenIDConnectProviderTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListOpenIDConnectProviderTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListOpenIDConnectProviderTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListPoliciesGrantingServiceAccess struct { +} + +func (*validateOpListPoliciesGrantingServiceAccess) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPoliciesGrantingServiceAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPoliciesGrantingServiceAccessInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPoliciesGrantingServiceAccessInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListPolicyTags struct { +} + +func (*validateOpListPolicyTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPolicyTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPolicyTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPolicyTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListPolicyVersions struct { +} + +func (*validateOpListPolicyVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPolicyVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPolicyVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPolicyVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListRolePolicies struct { +} + +func (*validateOpListRolePolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRolePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRolePoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRolePoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListRoleTags struct { +} + +func (*validateOpListRoleTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRoleTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRoleTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRoleTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListSAMLProviderTags struct { +} + +func (*validateOpListSAMLProviderTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListSAMLProviderTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListSAMLProviderTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListSAMLProviderTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListServerCertificateTags struct { +} + +func (*validateOpListServerCertificateTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListServerCertificateTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListServerCertificateTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListServerCertificateTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListUserPolicies struct { +} + +func (*validateOpListUserPolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListUserPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListUserPoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListUserPoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListUserTags struct { +} + +func (*validateOpListUserTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListUserTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListUserTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListUserTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutGroupPolicy struct { +} + +func (*validateOpPutGroupPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutGroupPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutGroupPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutRolePermissionsBoundary struct { +} + +func (*validateOpPutRolePermissionsBoundary) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutRolePermissionsBoundary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutRolePermissionsBoundaryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutRolePermissionsBoundaryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutRolePolicy struct { +} + +func (*validateOpPutRolePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutRolePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutRolePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutUserPermissionsBoundary struct { +} + +func (*validateOpPutUserPermissionsBoundary) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutUserPermissionsBoundary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutUserPermissionsBoundaryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutUserPermissionsBoundaryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutUserPolicy struct { +} + +func (*validateOpPutUserPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutUserPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutUserPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutUserPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemoveClientIDFromOpenIDConnectProvider struct { +} + +func (*validateOpRemoveClientIDFromOpenIDConnectProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveClientIDFromOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveClientIDFromOpenIDConnectProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveClientIDFromOpenIDConnectProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemoveRoleFromInstanceProfile struct { +} + +func (*validateOpRemoveRoleFromInstanceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveRoleFromInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveRoleFromInstanceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveRoleFromInstanceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemoveUserFromGroup struct { +} + +func (*validateOpRemoveUserFromGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveUserFromGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveUserFromGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveUserFromGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpResetServiceSpecificCredential struct { +} + +func (*validateOpResetServiceSpecificCredential) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpResetServiceSpecificCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ResetServiceSpecificCredentialInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpResetServiceSpecificCredentialInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpResyncMFADevice struct { +} + +func (*validateOpResyncMFADevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpResyncMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ResyncMFADeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpResyncMFADeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSetDefaultPolicyVersion struct { +} + +func (*validateOpSetDefaultPolicyVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSetDefaultPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SetDefaultPolicyVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSetDefaultPolicyVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSetSecurityTokenServicePreferences struct { +} + +func (*validateOpSetSecurityTokenServicePreferences) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSetSecurityTokenServicePreferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SetSecurityTokenServicePreferencesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSetSecurityTokenServicePreferencesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSimulateCustomPolicy struct { +} + +func (*validateOpSimulateCustomPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSimulateCustomPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SimulateCustomPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSimulateCustomPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSimulatePrincipalPolicy struct { +} + +func (*validateOpSimulatePrincipalPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSimulatePrincipalPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SimulatePrincipalPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSimulatePrincipalPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagInstanceProfile struct { +} + +func (*validateOpTagInstanceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagInstanceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagInstanceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagMFADevice struct { +} + +func (*validateOpTagMFADevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagMFADeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagMFADeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagOpenIDConnectProvider struct { +} + +func (*validateOpTagOpenIDConnectProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagOpenIDConnectProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagOpenIDConnectProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagPolicy struct { +} + +func (*validateOpTagPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagRole struct { +} + +func (*validateOpTagRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagSAMLProvider struct { +} + +func (*validateOpTagSAMLProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagSAMLProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagSAMLProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagServerCertificate struct { +} + +func (*validateOpTagServerCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagServerCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagServerCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagUser struct { +} + +func (*validateOpTagUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagInstanceProfile struct { +} + +func (*validateOpUntagInstanceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagInstanceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagInstanceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagMFADevice struct { +} + +func (*validateOpUntagMFADevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagMFADevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagMFADeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagMFADeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagOpenIDConnectProvider struct { +} + +func (*validateOpUntagOpenIDConnectProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagOpenIDConnectProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagOpenIDConnectProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagOpenIDConnectProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagPolicy struct { +} + +func (*validateOpUntagPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagRole struct { +} + +func (*validateOpUntagRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagSAMLProvider struct { +} + +func (*validateOpUntagSAMLProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagSAMLProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagSAMLProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagServerCertificate struct { +} + +func (*validateOpUntagServerCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagServerCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagServerCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagUser struct { +} + +func (*validateOpUntagUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateAccessKey struct { +} + +func (*validateOpUpdateAccessKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAccessKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAccessKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAccessKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateAssumeRolePolicy struct { +} + +func (*validateOpUpdateAssumeRolePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAssumeRolePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAssumeRolePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAssumeRolePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateGroup struct { +} + +func (*validateOpUpdateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLoginProfile struct { +} + +func (*validateOpUpdateLoginProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLoginProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLoginProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateOpenIDConnectProviderThumbprint struct { +} + +func (*validateOpUpdateOpenIDConnectProviderThumbprint) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOpenIDConnectProviderThumbprint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOpenIDConnectProviderThumbprintInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOpenIDConnectProviderThumbprintInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateRoleDescription struct { +} + +func (*validateOpUpdateRoleDescription) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRoleDescription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRoleDescriptionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRoleDescriptionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateRole struct { +} + +func (*validateOpUpdateRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateSAMLProvider struct { +} + +func (*validateOpUpdateSAMLProvider) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSAMLProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSAMLProviderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSAMLProviderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateServerCertificate struct { +} + +func (*validateOpUpdateServerCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateServerCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateServerCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateServiceSpecificCredential struct { +} + +func (*validateOpUpdateServiceSpecificCredential) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateServiceSpecificCredential) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateServiceSpecificCredentialInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateServiceSpecificCredentialInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateSigningCertificate struct { +} + +func (*validateOpUpdateSigningCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSigningCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSigningCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSigningCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateSSHPublicKey struct { +} + +func (*validateOpUpdateSSHPublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSSHPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSSHPublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSSHPublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateUser struct { +} + +func (*validateOpUpdateUser) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateUserInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateUserInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUploadServerCertificate struct { +} + +func (*validateOpUploadServerCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUploadServerCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UploadServerCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUploadServerCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUploadSigningCertificate struct { +} + +func (*validateOpUploadSigningCertificate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUploadSigningCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UploadSigningCertificateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUploadSigningCertificateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUploadSSHPublicKey struct { +} + +func (*validateOpUploadSSHPublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUploadSSHPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UploadSSHPublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUploadSSHPublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAddClientIDToOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddClientIDToOpenIDConnectProvider{}, middleware.After) +} + +func addOpAddRoleToInstanceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddRoleToInstanceProfile{}, middleware.After) +} + +func addOpAddUserToGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddUserToGroup{}, middleware.After) +} + +func addOpAttachGroupPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAttachGroupPolicy{}, middleware.After) +} + +func addOpAttachRolePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAttachRolePolicy{}, middleware.After) +} + +func addOpAttachUserPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAttachUserPolicy{}, middleware.After) +} + +func addOpChangePasswordValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpChangePassword{}, middleware.After) +} + +func addOpCreateAccountAliasValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAccountAlias{}, middleware.After) +} + +func addOpCreateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateGroup{}, middleware.After) +} + +func addOpCreateInstanceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateInstanceProfile{}, middleware.After) +} + +func addOpCreateLoginProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLoginProfile{}, middleware.After) +} + +func addOpCreateOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOpenIDConnectProvider{}, middleware.After) +} + +func addOpCreatePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePolicy{}, middleware.After) +} + +func addOpCreatePolicyVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePolicyVersion{}, middleware.After) +} + +func addOpCreateRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRole{}, middleware.After) +} + +func addOpCreateSAMLProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateSAMLProvider{}, middleware.After) +} + +func addOpCreateServiceLinkedRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateServiceLinkedRole{}, middleware.After) +} + +func addOpCreateServiceSpecificCredentialValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateServiceSpecificCredential{}, middleware.After) +} + +func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) +} + +func addOpCreateVirtualMFADeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateVirtualMFADevice{}, middleware.After) +} + +func addOpDeactivateMFADeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeactivateMFADevice{}, middleware.After) +} + +func addOpDeleteAccessKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAccessKey{}, middleware.After) +} + +func addOpDeleteAccountAliasValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAccountAlias{}, middleware.After) +} + +func addOpDeleteGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteGroup{}, middleware.After) +} + +func addOpDeleteGroupPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteGroupPolicy{}, middleware.After) +} + +func addOpDeleteInstanceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteInstanceProfile{}, middleware.After) +} + +func addOpDeleteLoginProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLoginProfile{}, middleware.After) +} + +func addOpDeleteOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteOpenIDConnectProvider{}, middleware.After) +} + +func addOpDeletePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePolicy{}, middleware.After) +} + +func addOpDeletePolicyVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePolicyVersion{}, middleware.After) +} + +func addOpDeleteRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRole{}, middleware.After) +} + +func addOpDeleteRolePermissionsBoundaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRolePermissionsBoundary{}, middleware.After) +} + +func addOpDeleteRolePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRolePolicy{}, middleware.After) +} + +func addOpDeleteSAMLProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSAMLProvider{}, middleware.After) +} + +func addOpDeleteServerCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteServerCertificate{}, middleware.After) +} + +func addOpDeleteServiceLinkedRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteServiceLinkedRole{}, middleware.After) +} + +func addOpDeleteServiceSpecificCredentialValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteServiceSpecificCredential{}, middleware.After) +} + +func addOpDeleteSigningCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSigningCertificate{}, middleware.After) +} + +func addOpDeleteSSHPublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSSHPublicKey{}, middleware.After) +} + +func addOpDeleteUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteUser{}, middleware.After) +} + +func addOpDeleteUserPermissionsBoundaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteUserPermissionsBoundary{}, middleware.After) +} + +func addOpDeleteUserPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteUserPolicy{}, middleware.After) +} + +func addOpDeleteVirtualMFADeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteVirtualMFADevice{}, middleware.After) +} + +func addOpDetachGroupPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDetachGroupPolicy{}, middleware.After) +} + +func addOpDetachRolePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDetachRolePolicy{}, middleware.After) +} + +func addOpDetachUserPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDetachUserPolicy{}, middleware.After) +} + +func addOpEnableMFADeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpEnableMFADevice{}, middleware.After) +} + +func addOpGenerateOrganizationsAccessReportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGenerateOrganizationsAccessReport{}, middleware.After) +} + +func addOpGenerateServiceLastAccessedDetailsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGenerateServiceLastAccessedDetails{}, middleware.After) +} + +func addOpGetAccessKeyLastUsedValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAccessKeyLastUsed{}, middleware.After) +} + +func addOpGetContextKeysForCustomPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetContextKeysForCustomPolicy{}, middleware.After) +} + +func addOpGetContextKeysForPrincipalPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetContextKeysForPrincipalPolicy{}, middleware.After) +} + +func addOpGetGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetGroup{}, middleware.After) +} + +func addOpGetGroupPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetGroupPolicy{}, middleware.After) +} + +func addOpGetInstanceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetInstanceProfile{}, middleware.After) +} + +func addOpGetLoginProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLoginProfile{}, middleware.After) +} + +func addOpGetMFADeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMFADevice{}, middleware.After) +} + +func addOpGetOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOpenIDConnectProvider{}, middleware.After) +} + +func addOpGetOrganizationsAccessReportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOrganizationsAccessReport{}, middleware.After) +} + +func addOpGetPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPolicy{}, middleware.After) +} + +func addOpGetPolicyVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPolicyVersion{}, middleware.After) +} + +func addOpGetRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRole{}, middleware.After) +} + +func addOpGetRolePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRolePolicy{}, middleware.After) +} + +func addOpGetSAMLProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSAMLProvider{}, middleware.After) +} + +func addOpGetServerCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetServerCertificate{}, middleware.After) +} + +func addOpGetServiceLastAccessedDetailsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetServiceLastAccessedDetails{}, middleware.After) +} + +func addOpGetServiceLastAccessedDetailsWithEntitiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetServiceLastAccessedDetailsWithEntities{}, middleware.After) +} + +func addOpGetServiceLinkedRoleDeletionStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetServiceLinkedRoleDeletionStatus{}, middleware.After) +} + +func addOpGetSSHPublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSSHPublicKey{}, middleware.After) +} + +func addOpGetUserPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetUserPolicy{}, middleware.After) +} + +func addOpListAttachedGroupPoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAttachedGroupPolicies{}, middleware.After) +} + +func addOpListAttachedRolePoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAttachedRolePolicies{}, middleware.After) +} + +func addOpListAttachedUserPoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAttachedUserPolicies{}, middleware.After) +} + +func addOpListEntitiesForPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEntitiesForPolicy{}, middleware.After) +} + +func addOpListGroupPoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListGroupPolicies{}, middleware.After) +} + +func addOpListGroupsForUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListGroupsForUser{}, middleware.After) +} + +func addOpListInstanceProfilesForRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListInstanceProfilesForRole{}, middleware.After) +} + +func addOpListInstanceProfileTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListInstanceProfileTags{}, middleware.After) +} + +func addOpListMFADeviceTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListMFADeviceTags{}, middleware.After) +} + +func addOpListOpenIDConnectProviderTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListOpenIDConnectProviderTags{}, middleware.After) +} + +func addOpListPoliciesGrantingServiceAccessValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPoliciesGrantingServiceAccess{}, middleware.After) +} + +func addOpListPolicyTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPolicyTags{}, middleware.After) +} + +func addOpListPolicyVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPolicyVersions{}, middleware.After) +} + +func addOpListRolePoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRolePolicies{}, middleware.After) +} + +func addOpListRoleTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRoleTags{}, middleware.After) +} + +func addOpListSAMLProviderTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListSAMLProviderTags{}, middleware.After) +} + +func addOpListServerCertificateTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListServerCertificateTags{}, middleware.After) +} + +func addOpListUserPoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListUserPolicies{}, middleware.After) +} + +func addOpListUserTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListUserTags{}, middleware.After) +} + +func addOpPutGroupPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutGroupPolicy{}, middleware.After) +} + +func addOpPutRolePermissionsBoundaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutRolePermissionsBoundary{}, middleware.After) +} + +func addOpPutRolePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutRolePolicy{}, middleware.After) +} + +func addOpPutUserPermissionsBoundaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutUserPermissionsBoundary{}, middleware.After) +} + +func addOpPutUserPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutUserPolicy{}, middleware.After) +} + +func addOpRemoveClientIDFromOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveClientIDFromOpenIDConnectProvider{}, middleware.After) +} + +func addOpRemoveRoleFromInstanceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveRoleFromInstanceProfile{}, middleware.After) +} + +func addOpRemoveUserFromGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveUserFromGroup{}, middleware.After) +} + +func addOpResetServiceSpecificCredentialValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpResetServiceSpecificCredential{}, middleware.After) +} + +func addOpResyncMFADeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpResyncMFADevice{}, middleware.After) +} + +func addOpSetDefaultPolicyVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSetDefaultPolicyVersion{}, middleware.After) +} + +func addOpSetSecurityTokenServicePreferencesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSetSecurityTokenServicePreferences{}, middleware.After) +} + +func addOpSimulateCustomPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSimulateCustomPolicy{}, middleware.After) +} + +func addOpSimulatePrincipalPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSimulatePrincipalPolicy{}, middleware.After) +} + +func addOpTagInstanceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagInstanceProfile{}, middleware.After) +} + +func addOpTagMFADeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagMFADevice{}, middleware.After) +} + +func addOpTagOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagOpenIDConnectProvider{}, middleware.After) +} + +func addOpTagPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagPolicy{}, middleware.After) +} + +func addOpTagRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagRole{}, middleware.After) +} + +func addOpTagSAMLProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagSAMLProvider{}, middleware.After) +} + +func addOpTagServerCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagServerCertificate{}, middleware.After) +} + +func addOpTagUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagUser{}, middleware.After) +} + +func addOpUntagInstanceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagInstanceProfile{}, middleware.After) +} + +func addOpUntagMFADeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagMFADevice{}, middleware.After) +} + +func addOpUntagOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagOpenIDConnectProvider{}, middleware.After) +} + +func addOpUntagPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagPolicy{}, middleware.After) +} + +func addOpUntagRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagRole{}, middleware.After) +} + +func addOpUntagSAMLProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagSAMLProvider{}, middleware.After) +} + +func addOpUntagServerCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagServerCertificate{}, middleware.After) +} + +func addOpUntagUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagUser{}, middleware.After) +} + +func addOpUpdateAccessKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAccessKey{}, middleware.After) +} + +func addOpUpdateAssumeRolePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAssumeRolePolicy{}, middleware.After) +} + +func addOpUpdateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateGroup{}, middleware.After) +} + +func addOpUpdateLoginProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLoginProfile{}, middleware.After) +} + +func addOpUpdateOpenIDConnectProviderThumbprintValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOpenIDConnectProviderThumbprint{}, middleware.After) +} + +func addOpUpdateRoleDescriptionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRoleDescription{}, middleware.After) +} + +func addOpUpdateRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRole{}, middleware.After) +} + +func addOpUpdateSAMLProviderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSAMLProvider{}, middleware.After) +} + +func addOpUpdateServerCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateServerCertificate{}, middleware.After) +} + +func addOpUpdateServiceSpecificCredentialValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateServiceSpecificCredential{}, middleware.After) +} + +func addOpUpdateSigningCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSigningCertificate{}, middleware.After) +} + +func addOpUpdateSSHPublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSSHPublicKey{}, middleware.After) +} + +func addOpUpdateUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateUser{}, middleware.After) +} + +func addOpUploadServerCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUploadServerCertificate{}, middleware.After) +} + +func addOpUploadSigningCertificateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUploadSigningCertificate{}, middleware.After) +} + +func addOpUploadSSHPublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUploadSSHPublicKey{}, 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 validateOpAddClientIDToOpenIDConnectProviderInput(v *AddClientIDToOpenIDConnectProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddClientIDToOpenIDConnectProviderInput"} + if v.OpenIDConnectProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if v.ClientID == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAddRoleToInstanceProfileInput(v *AddRoleToInstanceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddRoleToInstanceProfileInput"} + if v.InstanceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) + } + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAddUserToGroupInput(v *AddUserToGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddUserToGroupInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAttachGroupPolicyInput(v *AttachGroupPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AttachGroupPolicyInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAttachRolePolicyInput(v *AttachRolePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AttachRolePolicyInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAttachUserPolicyInput(v *AttachUserPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AttachUserPolicyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpChangePasswordInput(v *ChangePasswordInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ChangePasswordInput"} + if v.OldPassword == nil { + invalidParams.Add(smithy.NewErrParamRequired("OldPassword")) + } + if v.NewPassword == nil { + invalidParams.Add(smithy.NewErrParamRequired("NewPassword")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAccountAliasInput(v *CreateAccountAliasInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAccountAliasInput"} + if v.AccountAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountAlias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateGroupInput(v *CreateGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateGroupInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateInstanceProfileInput(v *CreateInstanceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateInstanceProfileInput"} + if v.InstanceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) + } + 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 validateOpCreateLoginProfileInput(v *CreateLoginProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLoginProfileInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.Password == nil { + invalidParams.Add(smithy.NewErrParamRequired("Password")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOpenIDConnectProviderInput(v *CreateOpenIDConnectProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOpenIDConnectProviderInput"} + if v.Url == nil { + invalidParams.Add(smithy.NewErrParamRequired("Url")) + } + if v.ThumbprintList == nil { + invalidParams.Add(smithy.NewErrParamRequired("ThumbprintList")) + } + 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 validateOpCreatePolicyInput(v *CreatePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePolicyInput"} + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + 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 validateOpCreatePolicyVersionInput(v *CreatePolicyVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePolicyVersionInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateRoleInput(v *CreateRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRoleInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.AssumeRolePolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssumeRolePolicyDocument")) + } + 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 validateOpCreateSAMLProviderInput(v *CreateSAMLProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateSAMLProviderInput"} + if v.SAMLMetadataDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLMetadataDocument")) + } + 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 + } +} + +func validateOpCreateServiceLinkedRoleInput(v *CreateServiceLinkedRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateServiceLinkedRoleInput"} + if v.AWSServiceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("AWSServiceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateServiceSpecificCredentialInput(v *CreateServiceSpecificCredentialInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateServiceSpecificCredentialInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.ServiceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateUserInput(v *CreateUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + 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 validateOpCreateVirtualMFADeviceInput(v *CreateVirtualMFADeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateVirtualMFADeviceInput"} + if v.VirtualMFADeviceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("VirtualMFADeviceName")) + } + 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 validateOpDeactivateMFADeviceInput(v *DeactivateMFADeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeactivateMFADeviceInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.SerialNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAccessKeyInput(v *DeleteAccessKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAccessKeyInput"} + if v.AccessKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAccountAliasInput(v *DeleteAccountAliasInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAccountAliasInput"} + if v.AccountAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountAlias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteGroupInput(v *DeleteGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteGroupInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteGroupPolicyInput(v *DeleteGroupPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteGroupPolicyInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteInstanceProfileInput(v *DeleteInstanceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteInstanceProfileInput"} + if v.InstanceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLoginProfileInput(v *DeleteLoginProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLoginProfileInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteOpenIDConnectProviderInput(v *DeleteOpenIDConnectProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteOpenIDConnectProviderInput"} + if v.OpenIDConnectProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeletePolicyInput(v *DeletePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePolicyInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeletePolicyVersionInput(v *DeletePolicyVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePolicyVersionInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if v.VersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteRoleInput(v *DeleteRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRoleInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteRolePermissionsBoundaryInput(v *DeleteRolePermissionsBoundaryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRolePermissionsBoundaryInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteRolePolicyInput(v *DeleteRolePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRolePolicyInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteSAMLProviderInput(v *DeleteSAMLProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteSAMLProviderInput"} + if v.SAMLProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteServerCertificateInput(v *DeleteServerCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteServerCertificateInput"} + if v.ServerCertificateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteServiceLinkedRoleInput(v *DeleteServiceLinkedRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceLinkedRoleInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteServiceSpecificCredentialInput(v *DeleteServiceSpecificCredentialInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceSpecificCredentialInput"} + if v.ServiceSpecificCredentialId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceSpecificCredentialId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteSigningCertificateInput(v *DeleteSigningCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteSigningCertificateInput"} + if v.CertificateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CertificateId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteSSHPublicKeyInput(v *DeleteSSHPublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteSSHPublicKeyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.SSHPublicKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SSHPublicKeyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteUserInput(v *DeleteUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteUserInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteUserPermissionsBoundaryInput(v *DeleteUserPermissionsBoundaryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteUserPermissionsBoundaryInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteUserPolicyInput(v *DeleteUserPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteUserPolicyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteVirtualMFADeviceInput(v *DeleteVirtualMFADeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteVirtualMFADeviceInput"} + if v.SerialNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDetachGroupPolicyInput(v *DetachGroupPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DetachGroupPolicyInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDetachRolePolicyInput(v *DetachRolePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DetachRolePolicyInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDetachUserPolicyInput(v *DetachUserPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DetachUserPolicyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpEnableMFADeviceInput(v *EnableMFADeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EnableMFADeviceInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.SerialNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) + } + if v.AuthenticationCode1 == nil { + invalidParams.Add(smithy.NewErrParamRequired("AuthenticationCode1")) + } + if v.AuthenticationCode2 == nil { + invalidParams.Add(smithy.NewErrParamRequired("AuthenticationCode2")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGenerateOrganizationsAccessReportInput(v *GenerateOrganizationsAccessReportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GenerateOrganizationsAccessReportInput"} + if v.EntityPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGenerateServiceLastAccessedDetailsInput(v *GenerateServiceLastAccessedDetailsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GenerateServiceLastAccessedDetailsInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAccessKeyLastUsedInput(v *GetAccessKeyLastUsedInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAccessKeyLastUsedInput"} + if v.AccessKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetContextKeysForCustomPolicyInput(v *GetContextKeysForCustomPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetContextKeysForCustomPolicyInput"} + if v.PolicyInputList == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyInputList")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetContextKeysForPrincipalPolicyInput(v *GetContextKeysForPrincipalPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetContextKeysForPrincipalPolicyInput"} + if v.PolicySourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicySourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetGroupInput(v *GetGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetGroupInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetGroupPolicyInput(v *GetGroupPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetGroupPolicyInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetInstanceProfileInput(v *GetInstanceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetInstanceProfileInput"} + if v.InstanceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLoginProfileInput(v *GetLoginProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLoginProfileInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetMFADeviceInput(v *GetMFADeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMFADeviceInput"} + if v.SerialNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOpenIDConnectProviderInput(v *GetOpenIDConnectProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOpenIDConnectProviderInput"} + if v.OpenIDConnectProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOrganizationsAccessReportInput(v *GetOrganizationsAccessReportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOrganizationsAccessReportInput"} + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPolicyInput(v *GetPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPolicyInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPolicyVersionInput(v *GetPolicyVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPolicyVersionInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if v.VersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetRoleInput(v *GetRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRoleInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetRolePolicyInput(v *GetRolePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRolePolicyInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetSAMLProviderInput(v *GetSAMLProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSAMLProviderInput"} + if v.SAMLProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetServerCertificateInput(v *GetServerCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetServerCertificateInput"} + if v.ServerCertificateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetServiceLastAccessedDetailsInput(v *GetServiceLastAccessedDetailsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetServiceLastAccessedDetailsInput"} + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetServiceLastAccessedDetailsWithEntitiesInput(v *GetServiceLastAccessedDetailsWithEntitiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetServiceLastAccessedDetailsWithEntitiesInput"} + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if v.ServiceNamespace == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceNamespace")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetServiceLinkedRoleDeletionStatusInput(v *GetServiceLinkedRoleDeletionStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetServiceLinkedRoleDeletionStatusInput"} + if v.DeletionTaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeletionTaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetSSHPublicKeyInput(v *GetSSHPublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSSHPublicKeyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.SSHPublicKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SSHPublicKeyId")) + } + if len(v.Encoding) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Encoding")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetUserPolicyInput(v *GetUserPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetUserPolicyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAttachedGroupPoliciesInput(v *ListAttachedGroupPoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAttachedGroupPoliciesInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAttachedRolePoliciesInput(v *ListAttachedRolePoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAttachedRolePoliciesInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAttachedUserPoliciesInput(v *ListAttachedUserPoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAttachedUserPoliciesInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListEntitiesForPolicyInput(v *ListEntitiesForPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListEntitiesForPolicyInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListGroupPoliciesInput(v *ListGroupPoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListGroupPoliciesInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListGroupsForUserInput(v *ListGroupsForUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListGroupsForUserInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListInstanceProfilesForRoleInput(v *ListInstanceProfilesForRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListInstanceProfilesForRoleInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListInstanceProfileTagsInput(v *ListInstanceProfileTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListInstanceProfileTagsInput"} + if v.InstanceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListMFADeviceTagsInput(v *ListMFADeviceTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListMFADeviceTagsInput"} + if v.SerialNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListOpenIDConnectProviderTagsInput(v *ListOpenIDConnectProviderTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOpenIDConnectProviderTagsInput"} + if v.OpenIDConnectProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListPoliciesGrantingServiceAccessInput(v *ListPoliciesGrantingServiceAccessInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPoliciesGrantingServiceAccessInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.ServiceNamespaces == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceNamespaces")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListPolicyTagsInput(v *ListPolicyTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPolicyTagsInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListPolicyVersionsInput(v *ListPolicyVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPolicyVersionsInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListRolePoliciesInput(v *ListRolePoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRolePoliciesInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListRoleTagsInput(v *ListRoleTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRoleTagsInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListSAMLProviderTagsInput(v *ListSAMLProviderTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListSAMLProviderTagsInput"} + if v.SAMLProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListServerCertificateTagsInput(v *ListServerCertificateTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListServerCertificateTagsInput"} + if v.ServerCertificateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListUserPoliciesInput(v *ListUserPoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListUserPoliciesInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListUserTagsInput(v *ListUserTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListUserTagsInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutGroupPolicyInput(v *PutGroupPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutGroupPolicyInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutRolePermissionsBoundaryInput(v *PutRolePermissionsBoundaryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutRolePermissionsBoundaryInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.PermissionsBoundary == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionsBoundary")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutRolePolicyInput(v *PutRolePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutRolePolicyInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutUserPermissionsBoundaryInput(v *PutUserPermissionsBoundaryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutUserPermissionsBoundaryInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.PermissionsBoundary == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionsBoundary")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutUserPolicyInput(v *PutUserPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutUserPolicyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemoveClientIDFromOpenIDConnectProviderInput(v *RemoveClientIDFromOpenIDConnectProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveClientIDFromOpenIDConnectProviderInput"} + if v.OpenIDConnectProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if v.ClientID == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemoveRoleFromInstanceProfileInput(v *RemoveRoleFromInstanceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveRoleFromInstanceProfileInput"} + if v.InstanceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) + } + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemoveUserFromGroupInput(v *RemoveUserFromGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveUserFromGroupInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpResetServiceSpecificCredentialInput(v *ResetServiceSpecificCredentialInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResetServiceSpecificCredentialInput"} + if v.ServiceSpecificCredentialId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceSpecificCredentialId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpResyncMFADeviceInput(v *ResyncMFADeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResyncMFADeviceInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.SerialNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) + } + if v.AuthenticationCode1 == nil { + invalidParams.Add(smithy.NewErrParamRequired("AuthenticationCode1")) + } + if v.AuthenticationCode2 == nil { + invalidParams.Add(smithy.NewErrParamRequired("AuthenticationCode2")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSetDefaultPolicyVersionInput(v *SetDefaultPolicyVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SetDefaultPolicyVersionInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if v.VersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSetSecurityTokenServicePreferencesInput(v *SetSecurityTokenServicePreferencesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SetSecurityTokenServicePreferencesInput"} + if len(v.GlobalEndpointTokenVersion) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("GlobalEndpointTokenVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSimulateCustomPolicyInput(v *SimulateCustomPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SimulateCustomPolicyInput"} + if v.PolicyInputList == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyInputList")) + } + if v.ActionNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActionNames")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSimulatePrincipalPolicyInput(v *SimulatePrincipalPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SimulatePrincipalPolicyInput"} + if v.PolicySourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicySourceArn")) + } + if v.ActionNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActionNames")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagInstanceProfileInput(v *TagInstanceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagInstanceProfileInput"} + if v.InstanceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else 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 validateOpTagMFADeviceInput(v *TagMFADeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagMFADeviceInput"} + if v.SerialNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else 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 validateOpTagOpenIDConnectProviderInput(v *TagOpenIDConnectProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagOpenIDConnectProviderInput"} + if v.OpenIDConnectProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else 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 validateOpTagPolicyInput(v *TagPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagPolicyInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else 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 validateOpTagRoleInput(v *TagRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagRoleInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else 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 validateOpTagSAMLProviderInput(v *TagSAMLProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagSAMLProviderInput"} + if v.SAMLProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else 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 validateOpTagServerCertificateInput(v *TagServerCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagServerCertificateInput"} + if v.ServerCertificateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else 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 validateOpTagUserInput(v *TagUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagUserInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else 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 validateOpUntagInstanceProfileInput(v *UntagInstanceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagInstanceProfileInput"} + if v.InstanceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileName")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagMFADeviceInput(v *UntagMFADeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagMFADeviceInput"} + if v.SerialNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagOpenIDConnectProviderInput(v *UntagOpenIDConnectProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagOpenIDConnectProviderInput"} + if v.OpenIDConnectProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagPolicyInput(v *UntagPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagPolicyInput"} + if v.PolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagRoleInput(v *UntagRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagRoleInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagSAMLProviderInput(v *UntagSAMLProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagSAMLProviderInput"} + if v.SAMLProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagServerCertificateInput(v *UntagServerCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagServerCertificateInput"} + if v.ServerCertificateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagUserInput(v *UntagUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagUserInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAccessKeyInput(v *UpdateAccessKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAccessKeyInput"} + if v.AccessKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId")) + } + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAssumeRolePolicyInput(v *UpdateAssumeRolePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAssumeRolePolicyInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateGroupInput(v *UpdateGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateGroupInput"} + if v.GroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLoginProfileInput(v *UpdateLoginProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLoginProfileInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateOpenIDConnectProviderThumbprintInput(v *UpdateOpenIDConnectProviderThumbprintInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOpenIDConnectProviderThumbprintInput"} + if v.OpenIDConnectProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if v.ThumbprintList == nil { + invalidParams.Add(smithy.NewErrParamRequired("ThumbprintList")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateRoleDescriptionInput(v *UpdateRoleDescriptionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRoleDescriptionInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if v.Description == nil { + invalidParams.Add(smithy.NewErrParamRequired("Description")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateRoleInput(v *UpdateRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRoleInput"} + if v.RoleName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateSAMLProviderInput(v *UpdateSAMLProviderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSAMLProviderInput"} + if v.SAMLMetadataDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLMetadataDocument")) + } + if v.SAMLProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLProviderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateServerCertificateInput(v *UpdateServerCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateServerCertificateInput"} + if v.ServerCertificateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateServiceSpecificCredentialInput(v *UpdateServiceSpecificCredentialInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceSpecificCredentialInput"} + if v.ServiceSpecificCredentialId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceSpecificCredentialId")) + } + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateSigningCertificateInput(v *UpdateSigningCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSigningCertificateInput"} + if v.CertificateId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CertificateId")) + } + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateSSHPublicKeyInput(v *UpdateSSHPublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSSHPublicKeyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.SSHPublicKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SSHPublicKeyId")) + } + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateUserInput(v *UpdateUserInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateUserInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUploadServerCertificateInput(v *UploadServerCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UploadServerCertificateInput"} + if v.ServerCertificateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateName")) + } + if v.CertificateBody == nil { + invalidParams.Add(smithy.NewErrParamRequired("CertificateBody")) + } + if v.PrivateKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrivateKey")) + } + 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 validateOpUploadSigningCertificateInput(v *UploadSigningCertificateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UploadSigningCertificateInput"} + if v.CertificateBody == nil { + invalidParams.Add(smithy.NewErrParamRequired("CertificateBody")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUploadSSHPublicKeyInput(v *UploadSSHPublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UploadSSHPublicKeyInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.SSHPublicKeyBody == nil { + invalidParams.Add(smithy.NewErrParamRequired("SSHPublicKeyBody")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go deleted file mode 100644 index 389613848bf02..0000000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ /dev/null @@ -1,41673 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iam - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -const opAddClientIDToOpenIDConnectProvider = "AddClientIDToOpenIDConnectProvider" - -// AddClientIDToOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the AddClientIDToOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddClientIDToOpenIDConnectProvider for more information on using the AddClientIDToOpenIDConnectProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the AddClientIDToOpenIDConnectProviderRequest method. -// req, resp := client.AddClientIDToOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddClientIDToOpenIDConnectProvider -func (c *IAM) AddClientIDToOpenIDConnectProviderRequest(input *AddClientIDToOpenIDConnectProviderInput) (req *request.Request, output *AddClientIDToOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opAddClientIDToOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddClientIDToOpenIDConnectProviderInput{} - } - - output = &AddClientIDToOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddClientIDToOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Adds a new client ID (also known as audience) to the list of client IDs already -// registered for the specified IAM OpenID Connect (OIDC) provider resource. -// -// This operation is idempotent; it does not fail or return an error if you -// add an existing client ID to the provider. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation AddClientIDToOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddClientIDToOpenIDConnectProvider -func (c *IAM) AddClientIDToOpenIDConnectProvider(input *AddClientIDToOpenIDConnectProviderInput) (*AddClientIDToOpenIDConnectProviderOutput, error) { - req, out := c.AddClientIDToOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// AddClientIDToOpenIDConnectProviderWithContext is the same as AddClientIDToOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See AddClientIDToOpenIDConnectProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) AddClientIDToOpenIDConnectProviderWithContext(ctx aws.Context, input *AddClientIDToOpenIDConnectProviderInput, opts ...request.Option) (*AddClientIDToOpenIDConnectProviderOutput, error) { - req, out := c.AddClientIDToOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddRoleToInstanceProfile = "AddRoleToInstanceProfile" - -// AddRoleToInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the AddRoleToInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddRoleToInstanceProfile for more information on using the AddRoleToInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the AddRoleToInstanceProfileRequest method. -// req, resp := client.AddRoleToInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddRoleToInstanceProfile -func (c *IAM) AddRoleToInstanceProfileRequest(input *AddRoleToInstanceProfileInput) (req *request.Request, output *AddRoleToInstanceProfileOutput) { - op := &request.Operation{ - Name: opAddRoleToInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddRoleToInstanceProfileInput{} - } - - output = &AddRoleToInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddRoleToInstanceProfile API operation for AWS Identity and Access Management. -// -// Adds the specified IAM role to the specified instance profile. An instance -// profile can contain only one role, and this quota cannot be increased. You -// can remove the existing role and then add a different role to an instance -// profile. You must then wait for the change to appear across all of Amazon -// Web Services because of eventual consistency (https://en.wikipedia.org/wiki/Eventual_consistency). -// To force the change, you must disassociate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html) -// and then associate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html), -// or you can stop your instance and then restart it. -// -// The caller of this operation must be granted the PassRole permission on the -// IAM role by a permissions policy. -// -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For more information about instance profiles, see -// Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation AddRoleToInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddRoleToInstanceProfile -func (c *IAM) AddRoleToInstanceProfile(input *AddRoleToInstanceProfileInput) (*AddRoleToInstanceProfileOutput, error) { - req, out := c.AddRoleToInstanceProfileRequest(input) - return out, req.Send() -} - -// AddRoleToInstanceProfileWithContext is the same as AddRoleToInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See AddRoleToInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) AddRoleToInstanceProfileWithContext(ctx aws.Context, input *AddRoleToInstanceProfileInput, opts ...request.Option) (*AddRoleToInstanceProfileOutput, error) { - req, out := c.AddRoleToInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddUserToGroup = "AddUserToGroup" - -// AddUserToGroupRequest generates a "aws/request.Request" representing the -// client's request for the AddUserToGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AddUserToGroup for more information on using the AddUserToGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the AddUserToGroupRequest method. -// req, resp := client.AddUserToGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddUserToGroup -func (c *IAM) AddUserToGroupRequest(input *AddUserToGroupInput) (req *request.Request, output *AddUserToGroupOutput) { - op := &request.Operation{ - Name: opAddUserToGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddUserToGroupInput{} - } - - output = &AddUserToGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddUserToGroup API operation for AWS Identity and Access Management. -// -// Adds the specified user to the specified group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation AddUserToGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddUserToGroup -func (c *IAM) AddUserToGroup(input *AddUserToGroupInput) (*AddUserToGroupOutput, error) { - req, out := c.AddUserToGroupRequest(input) - return out, req.Send() -} - -// AddUserToGroupWithContext is the same as AddUserToGroup with the addition of -// the ability to pass a context and additional request options. -// -// See AddUserToGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) AddUserToGroupWithContext(ctx aws.Context, input *AddUserToGroupInput, opts ...request.Option) (*AddUserToGroupOutput, error) { - req, out := c.AddUserToGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachGroupPolicy = "AttachGroupPolicy" - -// AttachGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachGroupPolicy for more information on using the AttachGroupPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the AttachGroupPolicyRequest method. -// req, resp := client.AttachGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachGroupPolicy -func (c *IAM) AttachGroupPolicyRequest(input *AttachGroupPolicyInput) (req *request.Request, output *AttachGroupPolicyOutput) { - op := &request.Operation{ - Name: opAttachGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachGroupPolicyInput{} - } - - output = &AttachGroupPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachGroupPolicy API operation for AWS Identity and Access Management. -// -// Attaches the specified managed policy to the specified IAM group. -// -// You use this operation to attach a managed policy to a group. To embed an -// inline policy in a group, use PutGroupPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutGroupPolicy.html). -// -// As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation AttachGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachGroupPolicy -func (c *IAM) AttachGroupPolicy(input *AttachGroupPolicyInput) (*AttachGroupPolicyOutput, error) { - req, out := c.AttachGroupPolicyRequest(input) - return out, req.Send() -} - -// AttachGroupPolicyWithContext is the same as AttachGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachGroupPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) AttachGroupPolicyWithContext(ctx aws.Context, input *AttachGroupPolicyInput, opts ...request.Option) (*AttachGroupPolicyOutput, error) { - req, out := c.AttachGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachRolePolicy = "AttachRolePolicy" - -// AttachRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachRolePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachRolePolicy for more information on using the AttachRolePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the AttachRolePolicyRequest method. -// req, resp := client.AttachRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachRolePolicy -func (c *IAM) AttachRolePolicyRequest(input *AttachRolePolicyInput) (req *request.Request, output *AttachRolePolicyOutput) { - op := &request.Operation{ - Name: opAttachRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachRolePolicyInput{} - } - - output = &AttachRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachRolePolicy API operation for AWS Identity and Access Management. -// -// Attaches the specified managed policy to the specified IAM role. When you -// attach a managed policy to a role, the managed policy becomes part of the -// role's permission (access) policy. -// -// You cannot use a managed policy as the role's trust policy. The role's trust -// policy is created at the same time as the role, using CreateRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html). -// You can update a role's trust policy using UpdateAssumerolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html). -// -// Use this operation to attach a managed policy to a role. To embed an inline -// policy in a role, use PutRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutRolePolicy.html). -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation AttachRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachRolePolicy -func (c *IAM) AttachRolePolicy(input *AttachRolePolicyInput) (*AttachRolePolicyOutput, error) { - req, out := c.AttachRolePolicyRequest(input) - return out, req.Send() -} - -// AttachRolePolicyWithContext is the same as AttachRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachRolePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) AttachRolePolicyWithContext(ctx aws.Context, input *AttachRolePolicyInput, opts ...request.Option) (*AttachRolePolicyOutput, error) { - req, out := c.AttachRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachUserPolicy = "AttachUserPolicy" - -// AttachUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachUserPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AttachUserPolicy for more information on using the AttachUserPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the AttachUserPolicyRequest method. -// req, resp := client.AttachUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachUserPolicy -func (c *IAM) AttachUserPolicyRequest(input *AttachUserPolicyInput) (req *request.Request, output *AttachUserPolicyOutput) { - op := &request.Operation{ - Name: opAttachUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachUserPolicyInput{} - } - - output = &AttachUserPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachUserPolicy API operation for AWS Identity and Access Management. -// -// Attaches the specified managed policy to the specified user. -// -// You use this operation to attach a managed policy to a user. To embed an -// inline policy in a user, use PutUserPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html). -// -// As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation AttachUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachUserPolicy -func (c *IAM) AttachUserPolicy(input *AttachUserPolicyInput) (*AttachUserPolicyOutput, error) { - req, out := c.AttachUserPolicyRequest(input) - return out, req.Send() -} - -// AttachUserPolicyWithContext is the same as AttachUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachUserPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) AttachUserPolicyWithContext(ctx aws.Context, input *AttachUserPolicyInput, opts ...request.Option) (*AttachUserPolicyOutput, error) { - req, out := c.AttachUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opChangePassword = "ChangePassword" - -// ChangePasswordRequest generates a "aws/request.Request" representing the -// client's request for the ChangePassword operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ChangePassword for more information on using the ChangePassword -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ChangePasswordRequest method. -// req, resp := client.ChangePasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ChangePassword -func (c *IAM) ChangePasswordRequest(input *ChangePasswordInput) (req *request.Request, output *ChangePasswordOutput) { - op := &request.Operation{ - Name: opChangePassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ChangePasswordInput{} - } - - output = &ChangePasswordOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ChangePassword API operation for AWS Identity and Access Management. -// -// Changes the password of the IAM user who is calling this operation. This -// operation can be performed using the CLI, the Amazon Web Services API, or -// the My Security Credentials page in the Amazon Web Services Management Console. -// The Amazon Web Services account root user password is not affected by this -// operation. -// -// Use UpdateLoginProfile to use the CLI, the Amazon Web Services API, or the -// Users page in the IAM console to change the password for any IAM user. For -// more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ChangePassword for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidUserTypeException "InvalidUserType" -// The request was rejected because the type of user for the transaction was -// incorrect. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodePasswordPolicyViolationException "PasswordPolicyViolation" -// The request was rejected because the provided password did not meet the requirements -// imposed by the account password policy. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ChangePassword -func (c *IAM) ChangePassword(input *ChangePasswordInput) (*ChangePasswordOutput, error) { - req, out := c.ChangePasswordRequest(input) - return out, req.Send() -} - -// ChangePasswordWithContext is the same as ChangePassword with the addition of -// the ability to pass a context and additional request options. -// -// See ChangePassword for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ChangePasswordWithContext(ctx aws.Context, input *ChangePasswordInput, opts ...request.Option) (*ChangePasswordOutput, error) { - req, out := c.ChangePasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAccessKey = "CreateAccessKey" - -// CreateAccessKeyRequest generates a "aws/request.Request" representing the -// client's request for the CreateAccessKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAccessKey for more information on using the CreateAccessKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateAccessKeyRequest method. -// req, resp := client.CreateAccessKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccessKey -func (c *IAM) CreateAccessKeyRequest(input *CreateAccessKeyInput) (req *request.Request, output *CreateAccessKeyOutput) { - op := &request.Operation{ - Name: opCreateAccessKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAccessKeyInput{} - } - - output = &CreateAccessKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAccessKey API operation for AWS Identity and Access Management. -// -// Creates a new Amazon Web Services secret access key and corresponding Amazon -// Web Services access key ID for the specified user. The default status for -// new keys is Active. -// -// If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID signing the request. This -// operation works for access keys under the Amazon Web Services account. Consequently, -// you can use this operation to manage Amazon Web Services account root user -// credentials. This is true even if the Amazon Web Services account has no -// associated users. -// -// For information about quotas on the number of keys you can create, see IAM -// and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// To ensure the security of your Amazon Web Services account, the secret access -// key is accessible only during key and user creation. You must save the key -// (for example, in a text file) if you want to be able to access it again. -// If a secret key is lost, you can delete the access keys for the associated -// user and then create new keys. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateAccessKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccessKey -func (c *IAM) CreateAccessKey(input *CreateAccessKeyInput) (*CreateAccessKeyOutput, error) { - req, out := c.CreateAccessKeyRequest(input) - return out, req.Send() -} - -// CreateAccessKeyWithContext is the same as CreateAccessKey with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAccessKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateAccessKeyWithContext(ctx aws.Context, input *CreateAccessKeyInput, opts ...request.Option) (*CreateAccessKeyOutput, error) { - req, out := c.CreateAccessKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAccountAlias = "CreateAccountAlias" - -// CreateAccountAliasRequest generates a "aws/request.Request" representing the -// client's request for the CreateAccountAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAccountAlias for more information on using the CreateAccountAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateAccountAliasRequest method. -// req, resp := client.CreateAccountAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccountAlias -func (c *IAM) CreateAccountAliasRequest(input *CreateAccountAliasInput) (req *request.Request, output *CreateAccountAliasOutput) { - op := &request.Operation{ - Name: opCreateAccountAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAccountAliasInput{} - } - - output = &CreateAccountAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateAccountAlias API operation for AWS Identity and Access Management. -// -// Creates an alias for your Amazon Web Services account. For information about -// using an Amazon Web Services account alias, see Creating, deleting, and listing -// an Amazon Web Services account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateAccountAlias for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccountAlias -func (c *IAM) CreateAccountAlias(input *CreateAccountAliasInput) (*CreateAccountAliasOutput, error) { - req, out := c.CreateAccountAliasRequest(input) - return out, req.Send() -} - -// CreateAccountAliasWithContext is the same as CreateAccountAlias with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAccountAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateAccountAliasWithContext(ctx aws.Context, input *CreateAccountAliasInput, opts ...request.Option) (*CreateAccountAliasOutput, error) { - req, out := c.CreateAccountAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGroup = "CreateGroup" - -// CreateGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateGroup for more information on using the CreateGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateGroupRequest method. -// req, resp := client.CreateGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateGroup -func (c *IAM) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { - op := &request.Operation{ - Name: opCreateGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateGroupInput{} - } - - output = &CreateGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGroup API operation for AWS Identity and Access Management. -// -// Creates a new group. -// -// For information about the number of groups you can create, see IAM and STS -// quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateGroup -func (c *IAM) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) { - req, out := c.CreateGroupRequest(input) - return out, req.Send() -} - -// CreateGroupWithContext is the same as CreateGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) { - req, out := c.CreateGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInstanceProfile = "CreateInstanceProfile" - -// CreateInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateInstanceProfile for more information on using the CreateInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateInstanceProfileRequest method. -// req, resp := client.CreateInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateInstanceProfile -func (c *IAM) CreateInstanceProfileRequest(input *CreateInstanceProfileInput) (req *request.Request, output *CreateInstanceProfileOutput) { - op := &request.Operation{ - Name: opCreateInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInstanceProfileInput{} - } - - output = &CreateInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInstanceProfile API operation for AWS Identity and Access Management. -// -// Creates a new instance profile. For information about instance profiles, -// see Using roles for applications on Amazon EC2 (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html) -// in the IAM User Guide, and Instance profiles (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile) -// in the Amazon EC2 User Guide. -// -// For information about the number of instance profiles you can create, see -// IAM object quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateInstanceProfile -func (c *IAM) CreateInstanceProfile(input *CreateInstanceProfileInput) (*CreateInstanceProfileOutput, error) { - req, out := c.CreateInstanceProfileRequest(input) - return out, req.Send() -} - -// CreateInstanceProfileWithContext is the same as CreateInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateInstanceProfileWithContext(ctx aws.Context, input *CreateInstanceProfileInput, opts ...request.Option) (*CreateInstanceProfileOutput, error) { - req, out := c.CreateInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoginProfile = "CreateLoginProfile" - -// CreateLoginProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoginProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateLoginProfile for more information on using the CreateLoginProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateLoginProfileRequest method. -// req, resp := client.CreateLoginProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateLoginProfile -func (c *IAM) CreateLoginProfileRequest(input *CreateLoginProfileInput) (req *request.Request, output *CreateLoginProfileOutput) { - op := &request.Operation{ - Name: opCreateLoginProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoginProfileInput{} - } - - output = &CreateLoginProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLoginProfile API operation for AWS Identity and Access Management. -// -// Creates a password for the specified IAM user. A password allows an IAM user -// to access Amazon Web Services services through the Amazon Web Services Management -// Console. -// -// You can use the CLI, the Amazon Web Services API, or the Users page in the -// IAM console to create a password for any IAM user. Use ChangePassword to -// update your own existing password in the My Security Credentials page in -// the Amazon Web Services Management Console. -// -// For more information about managing passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateLoginProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodePasswordPolicyViolationException "PasswordPolicyViolation" -// The request was rejected because the provided password did not meet the requirements -// imposed by the account password policy. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateLoginProfile -func (c *IAM) CreateLoginProfile(input *CreateLoginProfileInput) (*CreateLoginProfileOutput, error) { - req, out := c.CreateLoginProfileRequest(input) - return out, req.Send() -} - -// CreateLoginProfileWithContext is the same as CreateLoginProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoginProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateLoginProfileWithContext(ctx aws.Context, input *CreateLoginProfileInput, opts ...request.Option) (*CreateLoginProfileOutput, error) { - req, out := c.CreateLoginProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOpenIDConnectProvider = "CreateOpenIDConnectProvider" - -// CreateOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the CreateOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateOpenIDConnectProvider for more information on using the CreateOpenIDConnectProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateOpenIDConnectProviderRequest method. -// req, resp := client.CreateOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateOpenIDConnectProvider -func (c *IAM) CreateOpenIDConnectProviderRequest(input *CreateOpenIDConnectProviderInput) (req *request.Request, output *CreateOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opCreateOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateOpenIDConnectProviderInput{} - } - - output = &CreateOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Creates an IAM entity to describe an identity provider (IdP) that supports -// OpenID Connect (OIDC) (http://openid.net/connect/). -// -// The OIDC provider that you create with this operation can be used as a principal -// in a role's trust policy. Such a policy establishes a trust relationship -// between Amazon Web Services and the OIDC provider. -// -// If you are using an OIDC identity provider from Google, Facebook, or Amazon -// Cognito, you don't need to create a separate IAM identity provider. These -// OIDC identity providers are already built-in to Amazon Web Services and are -// available for your use. Instead, you can move directly to creating new roles -// using your identity provider. To learn more, see Creating a role for web -// identity or OpenID connect federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html) -// in the IAM User Guide. -// -// When you create the IAM OIDC provider, you specify the following: -// -// - The URL of the OIDC identity provider (IdP) to trust -// -// - A list of client IDs (also known as audiences) that identify the application -// or applications allowed to authenticate using the OIDC provider -// -// - A list of tags that are attached to the specified IAM OIDC provider -// -// - A list of thumbprints of one or more server certificates that the IdP -// uses -// -// You get all of this information from the OIDC IdP you want to use to access -// Amazon Web Services. -// -// Amazon Web Services secures communication with some OIDC identity providers -// (IdPs) through our library of trusted root certificate authorities (CAs) -// instead of using a certificate thumbprint to verify your IdP server certificate. -// In these cases, your legacy thumbprint remains in your configuration, but -// is no longer used for validation. These OIDC IdPs include Auth0, GitHub, -// GitLab, Google, and those that use an Amazon S3 bucket to host a JSON Web -// Key Set (JWKS) endpoint. -// -// The trust for the OIDC provider is derived from the IAM provider that this -// operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider -// operation to highly privileged users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateOpenIDConnectProvider -func (c *IAM) CreateOpenIDConnectProvider(input *CreateOpenIDConnectProviderInput) (*CreateOpenIDConnectProviderOutput, error) { - req, out := c.CreateOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// CreateOpenIDConnectProviderWithContext is the same as CreateOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOpenIDConnectProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateOpenIDConnectProviderWithContext(ctx aws.Context, input *CreateOpenIDConnectProviderInput, opts ...request.Option) (*CreateOpenIDConnectProviderOutput, error) { - req, out := c.CreateOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePolicy = "CreatePolicy" - -// CreatePolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreatePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePolicy for more information on using the CreatePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreatePolicyRequest method. -// req, resp := client.CreatePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicy -func (c *IAM) CreatePolicyRequest(input *CreatePolicyInput) (req *request.Request, output *CreatePolicyOutput) { - op := &request.Operation{ - Name: opCreatePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePolicyInput{} - } - - output = &CreatePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePolicy API operation for AWS Identity and Access Management. -// -// Creates a new managed policy for your Amazon Web Services account. -// -// This operation creates a policy version with a version identifier of v1 and -// sets v1 as the policy's default version. For more information about policy -// versions, see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. -// -// As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. -// -// For more information about managed policies in general, see Managed policies -// and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreatePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicy -func (c *IAM) CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error) { - req, out := c.CreatePolicyRequest(input) - return out, req.Send() -} - -// CreatePolicyWithContext is the same as CreatePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreatePolicyWithContext(ctx aws.Context, input *CreatePolicyInput, opts ...request.Option) (*CreatePolicyOutput, error) { - req, out := c.CreatePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePolicyVersion = "CreatePolicyVersion" - -// CreatePolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreatePolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreatePolicyVersion for more information on using the CreatePolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreatePolicyVersionRequest method. -// req, resp := client.CreatePolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicyVersion -func (c *IAM) CreatePolicyVersionRequest(input *CreatePolicyVersionInput) (req *request.Request, output *CreatePolicyVersionOutput) { - op := &request.Operation{ - Name: opCreatePolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePolicyVersionInput{} - } - - output = &CreatePolicyVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePolicyVersion API operation for AWS Identity and Access Management. -// -// Creates a new version of the specified managed policy. To update a managed -// policy, you create a new policy version. A managed policy can have up to -// five versions. If the policy has five versions, you must delete an existing -// version using DeletePolicyVersion before you create a new version. -// -// Optionally, you can set the new version as the policy's default version. -// The default version is the version that is in effect for the IAM users, groups, -// and roles to which the policy is attached. -// -// For more information about managed policy versions, see Versioning for managed -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreatePolicyVersion for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicyVersion -func (c *IAM) CreatePolicyVersion(input *CreatePolicyVersionInput) (*CreatePolicyVersionOutput, error) { - req, out := c.CreatePolicyVersionRequest(input) - return out, req.Send() -} - -// CreatePolicyVersionWithContext is the same as CreatePolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreatePolicyVersionWithContext(ctx aws.Context, input *CreatePolicyVersionInput, opts ...request.Option) (*CreatePolicyVersionOutput, error) { - req, out := c.CreatePolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRole = "CreateRole" - -// CreateRoleRequest generates a "aws/request.Request" representing the -// client's request for the CreateRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateRole for more information on using the CreateRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateRoleRequest method. -// req, resp := client.CreateRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateRole -func (c *IAM) CreateRoleRequest(input *CreateRoleInput) (req *request.Request, output *CreateRoleOutput) { - op := &request.Operation{ - Name: opCreateRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRoleInput{} - } - - output = &CreateRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRole API operation for AWS Identity and Access Management. -// -// Creates a new role for your Amazon Web Services account. -// -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For information about quotas for role names and the -// number of roles you can create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateRole -func (c *IAM) CreateRole(input *CreateRoleInput) (*CreateRoleOutput, error) { - req, out := c.CreateRoleRequest(input) - return out, req.Send() -} - -// CreateRoleWithContext is the same as CreateRole with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateRoleWithContext(ctx aws.Context, input *CreateRoleInput, opts ...request.Option) (*CreateRoleOutput, error) { - req, out := c.CreateRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSAMLProvider = "CreateSAMLProvider" - -// CreateSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the CreateSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateSAMLProvider for more information on using the CreateSAMLProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateSAMLProviderRequest method. -// req, resp := client.CreateSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateSAMLProvider -func (c *IAM) CreateSAMLProviderRequest(input *CreateSAMLProviderInput) (req *request.Request, output *CreateSAMLProviderOutput) { - op := &request.Operation{ - Name: opCreateSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSAMLProviderInput{} - } - - output = &CreateSAMLProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSAMLProvider API operation for AWS Identity and Access Management. -// -// Creates an IAM resource that describes an identity provider (IdP) that supports -// SAML 2.0. -// -// The SAML provider resource that you create with this operation can be used -// as a principal in an IAM role's trust policy. Such a policy can enable federated -// users who sign in using the SAML IdP to assume the role. You can create an -// IAM role that supports Web-based single sign-on (SSO) to the Amazon Web Services -// Management Console or one that supports API access to Amazon Web Services. -// -// When you create the SAML provider resource, you upload a SAML metadata document -// that you get from your IdP. That document includes the issuer's name, expiration -// information, and keys that can be used to validate the SAML authentication -// response (assertions) that the IdP sends. You must generate the metadata -// document using the identity management software that is used as your organization's -// IdP. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// For more information, see Enabling SAML 2.0 federated users to access the -// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html) -// and About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateSAMLProvider -func (c *IAM) CreateSAMLProvider(input *CreateSAMLProviderInput) (*CreateSAMLProviderOutput, error) { - req, out := c.CreateSAMLProviderRequest(input) - return out, req.Send() -} - -// CreateSAMLProviderWithContext is the same as CreateSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSAMLProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateSAMLProviderWithContext(ctx aws.Context, input *CreateSAMLProviderInput, opts ...request.Option) (*CreateSAMLProviderOutput, error) { - req, out := c.CreateSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateServiceLinkedRole = "CreateServiceLinkedRole" - -// CreateServiceLinkedRoleRequest generates a "aws/request.Request" representing the -// client's request for the CreateServiceLinkedRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateServiceLinkedRole for more information on using the CreateServiceLinkedRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateServiceLinkedRoleRequest method. -// req, resp := client.CreateServiceLinkedRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceLinkedRole -func (c *IAM) CreateServiceLinkedRoleRequest(input *CreateServiceLinkedRoleInput) (req *request.Request, output *CreateServiceLinkedRoleOutput) { - op := &request.Operation{ - Name: opCreateServiceLinkedRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateServiceLinkedRoleInput{} - } - - output = &CreateServiceLinkedRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateServiceLinkedRole API operation for AWS Identity and Access Management. -// -// Creates an IAM role that is linked to a specific Amazon Web Services service. -// The service controls the attached policies and when the role can be deleted. -// This helps ensure that the service is not broken by an unexpectedly changed -// or deleted role, which could put your Amazon Web Services resources into -// an unknown state. Allowing the service to control the role helps improve -// service stability and proper cleanup when a service and its role are no longer -// needed. For more information, see Using service-linked roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) -// in the IAM User Guide. -// -// To attach a policy to this service-linked role, you must make the request -// using the Amazon Web Services service that depends on this role. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateServiceLinkedRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceLinkedRole -func (c *IAM) CreateServiceLinkedRole(input *CreateServiceLinkedRoleInput) (*CreateServiceLinkedRoleOutput, error) { - req, out := c.CreateServiceLinkedRoleRequest(input) - return out, req.Send() -} - -// CreateServiceLinkedRoleWithContext is the same as CreateServiceLinkedRole with the addition of -// the ability to pass a context and additional request options. -// -// See CreateServiceLinkedRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateServiceLinkedRoleWithContext(ctx aws.Context, input *CreateServiceLinkedRoleInput, opts ...request.Option) (*CreateServiceLinkedRoleOutput, error) { - req, out := c.CreateServiceLinkedRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateServiceSpecificCredential = "CreateServiceSpecificCredential" - -// CreateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the -// client's request for the CreateServiceSpecificCredential operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateServiceSpecificCredential for more information on using the CreateServiceSpecificCredential -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateServiceSpecificCredentialRequest method. -// req, resp := client.CreateServiceSpecificCredentialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceSpecificCredential -func (c *IAM) CreateServiceSpecificCredentialRequest(input *CreateServiceSpecificCredentialInput) (req *request.Request, output *CreateServiceSpecificCredentialOutput) { - op := &request.Operation{ - Name: opCreateServiceSpecificCredential, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateServiceSpecificCredentialInput{} - } - - output = &CreateServiceSpecificCredentialOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateServiceSpecificCredential API operation for AWS Identity and Access Management. -// -// Generates a set of credentials consisting of a user name and password that -// can be used to access the service specified in the request. These credentials -// are generated by IAM, and can be used only for the specified service. -// -// You can have a maximum of two sets of service-specific credentials for each -// supported service per user. -// -// You can create service-specific credentials for CodeCommit and Amazon Keyspaces -// (for Apache Cassandra). -// -// You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential. -// -// For more information about service-specific credentials, see Using IAM with -// CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateServiceSpecificCredential for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceNotSupportedException "NotSupportedService" -// The specified service does not support service-specific credentials. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceSpecificCredential -func (c *IAM) CreateServiceSpecificCredential(input *CreateServiceSpecificCredentialInput) (*CreateServiceSpecificCredentialOutput, error) { - req, out := c.CreateServiceSpecificCredentialRequest(input) - return out, req.Send() -} - -// CreateServiceSpecificCredentialWithContext is the same as CreateServiceSpecificCredential with the addition of -// the ability to pass a context and additional request options. -// -// See CreateServiceSpecificCredential for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateServiceSpecificCredentialWithContext(ctx aws.Context, input *CreateServiceSpecificCredentialInput, opts ...request.Option) (*CreateServiceSpecificCredentialOutput, error) { - req, out := c.CreateServiceSpecificCredentialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUser = "CreateUser" - -// CreateUserRequest generates a "aws/request.Request" representing the -// client's request for the CreateUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateUser for more information on using the CreateUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateUserRequest method. -// req, resp := client.CreateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateUser -func (c *IAM) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) { - op := &request.Operation{ - Name: opCreateUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserInput{} - } - - output = &CreateUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUser API operation for AWS Identity and Access Management. -// -// Creates a new IAM user for your Amazon Web Services account. -// -// For information about quotas for the number of IAM users you can create, -// see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateUser -func (c *IAM) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) { - req, out := c.CreateUserRequest(input) - return out, req.Send() -} - -// CreateUserWithContext is the same as CreateUser with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) { - req, out := c.CreateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVirtualMFADevice = "CreateVirtualMFADevice" - -// CreateVirtualMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the CreateVirtualMFADevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateVirtualMFADevice for more information on using the CreateVirtualMFADevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateVirtualMFADeviceRequest method. -// req, resp := client.CreateVirtualMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateVirtualMFADevice -func (c *IAM) CreateVirtualMFADeviceRequest(input *CreateVirtualMFADeviceInput) (req *request.Request, output *CreateVirtualMFADeviceOutput) { - op := &request.Operation{ - Name: opCreateVirtualMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVirtualMFADeviceInput{} - } - - output = &CreateVirtualMFADeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVirtualMFADevice API operation for AWS Identity and Access Management. -// -// Creates a new virtual MFA device for the Amazon Web Services account. After -// creating the virtual MFA, use EnableMFADevice to attach the MFA device to -// an IAM user. For more information about creating and working with virtual -// MFA devices, see Using a virtual MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) -// in the IAM User Guide. -// -// For information about the maximum number of MFA devices you can create, see -// IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// The seed information contained in the QR code and the Base32 string should -// be treated like any other secret access information. In other words, protect -// the seed information as you would your Amazon Web Services access keys or -// your passwords. After you provision your virtual device, you should ensure -// that the information is destroyed following secure procedures. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateVirtualMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateVirtualMFADevice -func (c *IAM) CreateVirtualMFADevice(input *CreateVirtualMFADeviceInput) (*CreateVirtualMFADeviceOutput, error) { - req, out := c.CreateVirtualMFADeviceRequest(input) - return out, req.Send() -} - -// CreateVirtualMFADeviceWithContext is the same as CreateVirtualMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVirtualMFADevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) CreateVirtualMFADeviceWithContext(ctx aws.Context, input *CreateVirtualMFADeviceInput, opts ...request.Option) (*CreateVirtualMFADeviceOutput, error) { - req, out := c.CreateVirtualMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeactivateMFADevice = "DeactivateMFADevice" - -// DeactivateMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the DeactivateMFADevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeactivateMFADevice for more information on using the DeactivateMFADevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeactivateMFADeviceRequest method. -// req, resp := client.DeactivateMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeactivateMFADevice -func (c *IAM) DeactivateMFADeviceRequest(input *DeactivateMFADeviceInput) (req *request.Request, output *DeactivateMFADeviceOutput) { - op := &request.Operation{ - Name: opDeactivateMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeactivateMFADeviceInput{} - } - - output = &DeactivateMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeactivateMFADevice API operation for AWS Identity and Access Management. -// -// Deactivates the specified MFA device and removes it from association with -// the user name for which it was originally enabled. -// -// For more information about creating and working with virtual MFA devices, -// see Enabling a virtual multi-factor authentication (MFA) device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeactivateMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeactivateMFADevice -func (c *IAM) DeactivateMFADevice(input *DeactivateMFADeviceInput) (*DeactivateMFADeviceOutput, error) { - req, out := c.DeactivateMFADeviceRequest(input) - return out, req.Send() -} - -// DeactivateMFADeviceWithContext is the same as DeactivateMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See DeactivateMFADevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeactivateMFADeviceWithContext(ctx aws.Context, input *DeactivateMFADeviceInput, opts ...request.Option) (*DeactivateMFADeviceOutput, error) { - req, out := c.DeactivateMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccessKey = "DeleteAccessKey" - -// DeleteAccessKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccessKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAccessKey for more information on using the DeleteAccessKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteAccessKeyRequest method. -// req, resp := client.DeleteAccessKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccessKey -func (c *IAM) DeleteAccessKeyRequest(input *DeleteAccessKeyInput) (req *request.Request, output *DeleteAccessKeyOutput) { - op := &request.Operation{ - Name: opDeleteAccessKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAccessKeyInput{} - } - - output = &DeleteAccessKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccessKey API operation for AWS Identity and Access Management. -// -// Deletes the access key pair associated with the specified IAM user. -// -// If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID signing the request. This -// operation works for access keys under the Amazon Web Services account. Consequently, -// you can use this operation to manage Amazon Web Services account root user -// credentials even if the Amazon Web Services account has no associated users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteAccessKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccessKey -func (c *IAM) DeleteAccessKey(input *DeleteAccessKeyInput) (*DeleteAccessKeyOutput, error) { - req, out := c.DeleteAccessKeyRequest(input) - return out, req.Send() -} - -// DeleteAccessKeyWithContext is the same as DeleteAccessKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccessKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteAccessKeyWithContext(ctx aws.Context, input *DeleteAccessKeyInput, opts ...request.Option) (*DeleteAccessKeyOutput, error) { - req, out := c.DeleteAccessKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccountAlias = "DeleteAccountAlias" - -// DeleteAccountAliasRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccountAlias operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAccountAlias for more information on using the DeleteAccountAlias -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteAccountAliasRequest method. -// req, resp := client.DeleteAccountAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountAlias -func (c *IAM) DeleteAccountAliasRequest(input *DeleteAccountAliasInput) (req *request.Request, output *DeleteAccountAliasOutput) { - op := &request.Operation{ - Name: opDeleteAccountAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAccountAliasInput{} - } - - output = &DeleteAccountAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccountAlias API operation for AWS Identity and Access Management. -// -// Deletes the specified Amazon Web Services account alias. For information -// about using an Amazon Web Services account alias, see Creating, deleting, -// and listing an Amazon Web Services account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteAccountAlias for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountAlias -func (c *IAM) DeleteAccountAlias(input *DeleteAccountAliasInput) (*DeleteAccountAliasOutput, error) { - req, out := c.DeleteAccountAliasRequest(input) - return out, req.Send() -} - -// DeleteAccountAliasWithContext is the same as DeleteAccountAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccountAlias for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteAccountAliasWithContext(ctx aws.Context, input *DeleteAccountAliasInput, opts ...request.Option) (*DeleteAccountAliasOutput, error) { - req, out := c.DeleteAccountAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccountPasswordPolicy = "DeleteAccountPasswordPolicy" - -// DeleteAccountPasswordPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccountPasswordPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAccountPasswordPolicy for more information on using the DeleteAccountPasswordPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteAccountPasswordPolicyRequest method. -// req, resp := client.DeleteAccountPasswordPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountPasswordPolicy -func (c *IAM) DeleteAccountPasswordPolicyRequest(input *DeleteAccountPasswordPolicyInput) (req *request.Request, output *DeleteAccountPasswordPolicyOutput) { - op := &request.Operation{ - Name: opDeleteAccountPasswordPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAccountPasswordPolicyInput{} - } - - output = &DeleteAccountPasswordPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccountPasswordPolicy API operation for AWS Identity and Access Management. -// -// Deletes the password policy for the Amazon Web Services account. There are -// no parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteAccountPasswordPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountPasswordPolicy -func (c *IAM) DeleteAccountPasswordPolicy(input *DeleteAccountPasswordPolicyInput) (*DeleteAccountPasswordPolicyOutput, error) { - req, out := c.DeleteAccountPasswordPolicyRequest(input) - return out, req.Send() -} - -// DeleteAccountPasswordPolicyWithContext is the same as DeleteAccountPasswordPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccountPasswordPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteAccountPasswordPolicyWithContext(ctx aws.Context, input *DeleteAccountPasswordPolicyInput, opts ...request.Option) (*DeleteAccountPasswordPolicyOutput, error) { - req, out := c.DeleteAccountPasswordPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGroup = "DeleteGroup" - -// DeleteGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGroup for more information on using the DeleteGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteGroupRequest method. -// req, resp := client.DeleteGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroup -func (c *IAM) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { - op := &request.Operation{ - Name: opDeleteGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGroupInput{} - } - - output = &DeleteGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteGroup API operation for AWS Identity and Access Management. -// -// Deletes the specified IAM group. The group must not contain any users or -// have any attached policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroup -func (c *IAM) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) { - req, out := c.DeleteGroupRequest(input) - return out, req.Send() -} - -// DeleteGroupWithContext is the same as DeleteGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) { - req, out := c.DeleteGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGroupPolicy = "DeleteGroupPolicy" - -// DeleteGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteGroupPolicy for more information on using the DeleteGroupPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteGroupPolicyRequest method. -// req, resp := client.DeleteGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroupPolicy -func (c *IAM) DeleteGroupPolicyRequest(input *DeleteGroupPolicyInput) (req *request.Request, output *DeleteGroupPolicyOutput) { - op := &request.Operation{ - Name: opDeleteGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGroupPolicyInput{} - } - - output = &DeleteGroupPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteGroupPolicy API operation for AWS Identity and Access Management. -// -// Deletes the specified inline policy that is embedded in the specified IAM -// group. -// -// A group can also have managed policies attached to it. To detach a managed -// policy from a group, use DetachGroupPolicy. For more information about policies, -// refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroupPolicy -func (c *IAM) DeleteGroupPolicy(input *DeleteGroupPolicyInput) (*DeleteGroupPolicyOutput, error) { - req, out := c.DeleteGroupPolicyRequest(input) - return out, req.Send() -} - -// DeleteGroupPolicyWithContext is the same as DeleteGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGroupPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteGroupPolicyWithContext(ctx aws.Context, input *DeleteGroupPolicyInput, opts ...request.Option) (*DeleteGroupPolicyOutput, error) { - req, out := c.DeleteGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInstanceProfile = "DeleteInstanceProfile" - -// DeleteInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteInstanceProfile for more information on using the DeleteInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteInstanceProfileRequest method. -// req, resp := client.DeleteInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteInstanceProfile -func (c *IAM) DeleteInstanceProfileRequest(input *DeleteInstanceProfileInput) (req *request.Request, output *DeleteInstanceProfileOutput) { - op := &request.Operation{ - Name: opDeleteInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInstanceProfileInput{} - } - - output = &DeleteInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteInstanceProfile API operation for AWS Identity and Access Management. -// -// Deletes the specified instance profile. The instance profile must not have -// an associated role. -// -// Make sure that you do not have any Amazon EC2 instances running with the -// instance profile you are about to delete. Deleting a role or instance profile -// that is associated with a running instance will break any applications running -// on the instance. -// -// For more information about instance profiles, see Using instance profiles -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteInstanceProfile -func (c *IAM) DeleteInstanceProfile(input *DeleteInstanceProfileInput) (*DeleteInstanceProfileOutput, error) { - req, out := c.DeleteInstanceProfileRequest(input) - return out, req.Send() -} - -// DeleteInstanceProfileWithContext is the same as DeleteInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteInstanceProfileWithContext(ctx aws.Context, input *DeleteInstanceProfileInput, opts ...request.Option) (*DeleteInstanceProfileOutput, error) { - req, out := c.DeleteInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoginProfile = "DeleteLoginProfile" - -// DeleteLoginProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoginProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteLoginProfile for more information on using the DeleteLoginProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteLoginProfileRequest method. -// req, resp := client.DeleteLoginProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteLoginProfile -func (c *IAM) DeleteLoginProfileRequest(input *DeleteLoginProfileInput) (req *request.Request, output *DeleteLoginProfileOutput) { - op := &request.Operation{ - Name: opDeleteLoginProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoginProfileInput{} - } - - output = &DeleteLoginProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoginProfile API operation for AWS Identity and Access Management. -// -// Deletes the password for the specified IAM user, For more information, see -// Managing passwords for IAM users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html). -// -// You can use the CLI, the Amazon Web Services API, or the Users page in the -// IAM console to delete a password for any IAM user. You can use ChangePassword -// to update, but not delete, your own password in the My Security Credentials -// page in the Amazon Web Services Management Console. -// -// Deleting a user's password does not prevent a user from accessing Amazon -// Web Services through the command line interface or the API. To prevent all -// user access, you must also either make any access keys inactive or delete -// them. For more information about making keys inactive or deleting them, see -// UpdateAccessKey and DeleteAccessKey. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteLoginProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteLoginProfile -func (c *IAM) DeleteLoginProfile(input *DeleteLoginProfileInput) (*DeleteLoginProfileOutput, error) { - req, out := c.DeleteLoginProfileRequest(input) - return out, req.Send() -} - -// DeleteLoginProfileWithContext is the same as DeleteLoginProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoginProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteLoginProfileWithContext(ctx aws.Context, input *DeleteLoginProfileInput, opts ...request.Option) (*DeleteLoginProfileOutput, error) { - req, out := c.DeleteLoginProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOpenIDConnectProvider = "DeleteOpenIDConnectProvider" - -// DeleteOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteOpenIDConnectProvider for more information on using the DeleteOpenIDConnectProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteOpenIDConnectProviderRequest method. -// req, resp := client.DeleteOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteOpenIDConnectProvider -func (c *IAM) DeleteOpenIDConnectProviderRequest(input *DeleteOpenIDConnectProviderInput) (req *request.Request, output *DeleteOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opDeleteOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteOpenIDConnectProviderInput{} - } - - output = &DeleteOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Deletes an OpenID Connect identity provider (IdP) resource object in IAM. -// -// Deleting an IAM OIDC provider resource does not update any roles that reference -// the provider as a principal in their trust policies. Any attempt to assume -// a role that references a deleted provider fails. -// -// This operation is idempotent; it does not fail or return an error if you -// call the operation for a provider that does not exist. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteOpenIDConnectProvider -func (c *IAM) DeleteOpenIDConnectProvider(input *DeleteOpenIDConnectProviderInput) (*DeleteOpenIDConnectProviderOutput, error) { - req, out := c.DeleteOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// DeleteOpenIDConnectProviderWithContext is the same as DeleteOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOpenIDConnectProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteOpenIDConnectProviderWithContext(ctx aws.Context, input *DeleteOpenIDConnectProviderInput, opts ...request.Option) (*DeleteOpenIDConnectProviderOutput, error) { - req, out := c.DeleteOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicy = "DeletePolicy" - -// DeletePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePolicy for more information on using the DeletePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeletePolicyRequest method. -// req, resp := client.DeletePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicy -func (c *IAM) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { - op := &request.Operation{ - Name: opDeletePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePolicyInput{} - } - - output = &DeletePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicy API operation for AWS Identity and Access Management. -// -// Deletes the specified managed policy. -// -// Before you can delete a managed policy, you must first detach the policy -// from all users, groups, and roles that it is attached to. In addition, you -// must delete all the policy's versions. The following steps describe the process -// for deleting a managed policy: -// -// - Detach the policy from all users, groups, and roles that the policy -// is attached to, using DetachUserPolicy, DetachGroupPolicy, or DetachRolePolicy. -// To list all the users, groups, and roles that a policy is attached to, -// use ListEntitiesForPolicy. -// -// - Delete all versions of the policy using DeletePolicyVersion. To list -// the policy's versions, use ListPolicyVersions. You cannot use DeletePolicyVersion -// to delete the version that is marked as the default version. You delete -// the policy's default version in the next step of the process. -// -// - Delete the policy (this automatically deletes the policy's default version) -// using this operation. -// -// For information about managed policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeletePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicy -func (c *IAM) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - return out, req.Send() -} - -// DeletePolicyWithContext is the same as DeletePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicyVersion = "DeletePolicyVersion" - -// DeletePolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeletePolicyVersion for more information on using the DeletePolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeletePolicyVersionRequest method. -// req, resp := client.DeletePolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicyVersion -func (c *IAM) DeletePolicyVersionRequest(input *DeletePolicyVersionInput) (req *request.Request, output *DeletePolicyVersionOutput) { - op := &request.Operation{ - Name: opDeletePolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePolicyVersionInput{} - } - - output = &DeletePolicyVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicyVersion API operation for AWS Identity and Access Management. -// -// Deletes the specified version from the specified managed policy. -// -// You cannot delete the default version from a policy using this operation. -// To delete the default version from a policy, use DeletePolicy. To find out -// which version of a policy is marked as the default version, use ListPolicyVersions. -// -// For information about versions for managed policies, see Versioning for managed -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeletePolicyVersion for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicyVersion -func (c *IAM) DeletePolicyVersion(input *DeletePolicyVersionInput) (*DeletePolicyVersionOutput, error) { - req, out := c.DeletePolicyVersionRequest(input) - return out, req.Send() -} - -// DeletePolicyVersionWithContext is the same as DeletePolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeletePolicyVersionWithContext(ctx aws.Context, input *DeletePolicyVersionInput, opts ...request.Option) (*DeletePolicyVersionOutput, error) { - req, out := c.DeletePolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRole = "DeleteRole" - -// DeleteRoleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRole for more information on using the DeleteRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteRoleRequest method. -// req, resp := client.DeleteRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRole -func (c *IAM) DeleteRoleRequest(input *DeleteRoleInput) (req *request.Request, output *DeleteRoleOutput) { - op := &request.Operation{ - Name: opDeleteRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRoleInput{} - } - - output = &DeleteRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRole API operation for AWS Identity and Access Management. -// -// Deletes the specified role. Unlike the Amazon Web Services Management Console, -// when you delete a role programmatically, you must delete the items attached -// to the role manually, or the deletion fails. For more information, see Deleting -// an IAM role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_delete.html#roles-managingrole-deleting-cli). -// Before attempting to delete a role, remove the following attached items: -// -// - Inline policies (DeleteRolePolicy) -// -// - Attached managed policies (DetachRolePolicy) -// -// - Instance profile (RemoveRoleFromInstanceProfile) -// -// - Optional – Delete instance profile after detaching from role for resource -// clean up (DeleteInstanceProfile) -// -// Make sure that you do not have any Amazon EC2 instances running with the -// role you are about to delete. Deleting a role or instance profile that is -// associated with a running instance will break any applications running on -// the instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRole -func (c *IAM) DeleteRole(input *DeleteRoleInput) (*DeleteRoleOutput, error) { - req, out := c.DeleteRoleRequest(input) - return out, req.Send() -} - -// DeleteRoleWithContext is the same as DeleteRole with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteRoleWithContext(ctx aws.Context, input *DeleteRoleInput, opts ...request.Option) (*DeleteRoleOutput, error) { - req, out := c.DeleteRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRolePermissionsBoundary = "DeleteRolePermissionsBoundary" - -// DeleteRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRolePermissionsBoundary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRolePermissionsBoundary for more information on using the DeleteRolePermissionsBoundary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteRolePermissionsBoundaryRequest method. -// req, resp := client.DeleteRolePermissionsBoundaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary -func (c *IAM) DeleteRolePermissionsBoundaryRequest(input *DeleteRolePermissionsBoundaryInput) (req *request.Request, output *DeleteRolePermissionsBoundaryOutput) { - op := &request.Operation{ - Name: opDeleteRolePermissionsBoundary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRolePermissionsBoundaryInput{} - } - - output = &DeleteRolePermissionsBoundaryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRolePermissionsBoundary API operation for AWS Identity and Access Management. -// -// Deletes the permissions boundary for the specified IAM role. -// -// You cannot set the boundary for a service-linked role. -// -// Deleting the permissions boundary for a role might increase its permissions. -// For example, it might allow anyone who assumes the role to perform all the -// actions granted in its permissions policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteRolePermissionsBoundary for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary -func (c *IAM) DeleteRolePermissionsBoundary(input *DeleteRolePermissionsBoundaryInput) (*DeleteRolePermissionsBoundaryOutput, error) { - req, out := c.DeleteRolePermissionsBoundaryRequest(input) - return out, req.Send() -} - -// DeleteRolePermissionsBoundaryWithContext is the same as DeleteRolePermissionsBoundary with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRolePermissionsBoundary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteRolePermissionsBoundaryWithContext(ctx aws.Context, input *DeleteRolePermissionsBoundaryInput, opts ...request.Option) (*DeleteRolePermissionsBoundaryOutput, error) { - req, out := c.DeleteRolePermissionsBoundaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRolePolicy = "DeleteRolePolicy" - -// DeleteRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRolePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteRolePolicy for more information on using the DeleteRolePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteRolePolicyRequest method. -// req, resp := client.DeleteRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePolicy -func (c *IAM) DeleteRolePolicyRequest(input *DeleteRolePolicyInput) (req *request.Request, output *DeleteRolePolicyOutput) { - op := &request.Operation{ - Name: opDeleteRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRolePolicyInput{} - } - - output = &DeleteRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRolePolicy API operation for AWS Identity and Access Management. -// -// Deletes the specified inline policy that is embedded in the specified IAM -// role. -// -// A role can also have managed policies attached to it. To detach a managed -// policy from a role, use DetachRolePolicy. For more information about policies, -// refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePolicy -func (c *IAM) DeleteRolePolicy(input *DeleteRolePolicyInput) (*DeleteRolePolicyOutput, error) { - req, out := c.DeleteRolePolicyRequest(input) - return out, req.Send() -} - -// DeleteRolePolicyWithContext is the same as DeleteRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRolePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteRolePolicyWithContext(ctx aws.Context, input *DeleteRolePolicyInput, opts ...request.Option) (*DeleteRolePolicyOutput, error) { - req, out := c.DeleteRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSAMLProvider = "DeleteSAMLProvider" - -// DeleteSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSAMLProvider for more information on using the DeleteSAMLProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteSAMLProviderRequest method. -// req, resp := client.DeleteSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSAMLProvider -func (c *IAM) DeleteSAMLProviderRequest(input *DeleteSAMLProviderInput) (req *request.Request, output *DeleteSAMLProviderOutput) { - op := &request.Operation{ - Name: opDeleteSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSAMLProviderInput{} - } - - output = &DeleteSAMLProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSAMLProvider API operation for AWS Identity and Access Management. -// -// Deletes a SAML provider resource in IAM. -// -// Deleting the provider resource from IAM does not update any roles that reference -// the SAML provider resource's ARN as a principal in their trust policies. -// Any attempt to assume a role that references a non-existent provider resource -// ARN fails. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSAMLProvider -func (c *IAM) DeleteSAMLProvider(input *DeleteSAMLProviderInput) (*DeleteSAMLProviderOutput, error) { - req, out := c.DeleteSAMLProviderRequest(input) - return out, req.Send() -} - -// DeleteSAMLProviderWithContext is the same as DeleteSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSAMLProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteSAMLProviderWithContext(ctx aws.Context, input *DeleteSAMLProviderInput, opts ...request.Option) (*DeleteSAMLProviderOutput, error) { - req, out := c.DeleteSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSSHPublicKey = "DeleteSSHPublicKey" - -// DeleteSSHPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSSHPublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSSHPublicKey for more information on using the DeleteSSHPublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteSSHPublicKeyRequest method. -// req, resp := client.DeleteSSHPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSSHPublicKey -func (c *IAM) DeleteSSHPublicKeyRequest(input *DeleteSSHPublicKeyInput) (req *request.Request, output *DeleteSSHPublicKeyOutput) { - op := &request.Operation{ - Name: opDeleteSSHPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSSHPublicKeyInput{} - } - - output = &DeleteSSHPublicKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSSHPublicKey API operation for AWS Identity and Access Management. -// -// Deletes the specified SSH public key. -// -// The SSH public key deleted by this operation is used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information -// about using SSH keys to authenticate to an CodeCommit repository, see Set -// up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteSSHPublicKey for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSSHPublicKey -func (c *IAM) DeleteSSHPublicKey(input *DeleteSSHPublicKeyInput) (*DeleteSSHPublicKeyOutput, error) { - req, out := c.DeleteSSHPublicKeyRequest(input) - return out, req.Send() -} - -// DeleteSSHPublicKeyWithContext is the same as DeleteSSHPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSSHPublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteSSHPublicKeyWithContext(ctx aws.Context, input *DeleteSSHPublicKeyInput, opts ...request.Option) (*DeleteSSHPublicKeyOutput, error) { - req, out := c.DeleteSSHPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteServerCertificate = "DeleteServerCertificate" - -// DeleteServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServerCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteServerCertificate for more information on using the DeleteServerCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteServerCertificateRequest method. -// req, resp := client.DeleteServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServerCertificate -func (c *IAM) DeleteServerCertificateRequest(input *DeleteServerCertificateInput) (req *request.Request, output *DeleteServerCertificateOutput) { - op := &request.Operation{ - Name: opDeleteServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServerCertificateInput{} - } - - output = &DeleteServerCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteServerCertificate API operation for AWS Identity and Access Management. -// -// Deletes the specified server certificate. -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// If you are using a server certificate with Elastic Load Balancing, deleting -// the certificate could have implications for your application. If Elastic -// Load Balancing doesn't detect the deletion of bound certificates, it may -// continue to use the certificates. This could cause Elastic Load Balancing -// to stop accepting traffic. We recommend that you remove the reference to -// the certificate from Elastic Load Balancing before using this command to -// delete the certificate. For more information, see DeleteLoadBalancerListeners -// (https://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html) -// in the Elastic Load Balancing API Reference. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServerCertificate -func (c *IAM) DeleteServerCertificate(input *DeleteServerCertificateInput) (*DeleteServerCertificateOutput, error) { - req, out := c.DeleteServerCertificateRequest(input) - return out, req.Send() -} - -// DeleteServerCertificateWithContext is the same as DeleteServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServerCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteServerCertificateWithContext(ctx aws.Context, input *DeleteServerCertificateInput, opts ...request.Option) (*DeleteServerCertificateOutput, error) { - req, out := c.DeleteServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole" - -// DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServiceLinkedRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteServiceLinkedRole for more information on using the DeleteServiceLinkedRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteServiceLinkedRoleRequest method. -// req, resp := client.DeleteServiceLinkedRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRole -func (c *IAM) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput) (req *request.Request, output *DeleteServiceLinkedRoleOutput) { - op := &request.Operation{ - Name: opDeleteServiceLinkedRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServiceLinkedRoleInput{} - } - - output = &DeleteServiceLinkedRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteServiceLinkedRole API operation for AWS Identity and Access Management. -// -// Submits a service-linked role deletion request and returns a DeletionTaskId, -// which you can use to check the status of the deletion. Before you call this -// operation, confirm that the role has no active sessions and that any resources -// used by the role in the linked service are deleted. If you call this operation -// more than once for the same service-linked role and an earlier deletion task -// is not complete, then the DeletionTaskId of the earlier request is returned. -// -// If you submit a deletion request for a service-linked role whose linked service -// is still accessing a resource, then the deletion task fails. If it fails, -// the GetServiceLinkedRoleDeletionStatus operation returns the reason for the -// failure, usually including the resources that must be deleted. To delete -// the service-linked role, you must first remove those resources from the linked -// service and then submit the deletion request again. Resources are specific -// to the service that is linked to the role. For more information about removing -// resources from a service, see the Amazon Web Services documentation (http://docs.aws.amazon.com/) -// for your service. -// -// For more information about service-linked roles, see Roles terms and concepts: -// Amazon Web Services service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteServiceLinkedRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRole -func (c *IAM) DeleteServiceLinkedRole(input *DeleteServiceLinkedRoleInput) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) - return out, req.Send() -} - -// DeleteServiceLinkedRoleWithContext is the same as DeleteServiceLinkedRole with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServiceLinkedRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteServiceLinkedRoleWithContext(ctx aws.Context, input *DeleteServiceLinkedRoleInput, opts ...request.Option) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteServiceSpecificCredential = "DeleteServiceSpecificCredential" - -// DeleteServiceSpecificCredentialRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServiceSpecificCredential operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteServiceSpecificCredential for more information on using the DeleteServiceSpecificCredential -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteServiceSpecificCredentialRequest method. -// req, resp := client.DeleteServiceSpecificCredentialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceSpecificCredential -func (c *IAM) DeleteServiceSpecificCredentialRequest(input *DeleteServiceSpecificCredentialInput) (req *request.Request, output *DeleteServiceSpecificCredentialOutput) { - op := &request.Operation{ - Name: opDeleteServiceSpecificCredential, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServiceSpecificCredentialInput{} - } - - output = &DeleteServiceSpecificCredentialOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteServiceSpecificCredential API operation for AWS Identity and Access Management. -// -// Deletes the specified service-specific credential. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteServiceSpecificCredential for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceSpecificCredential -func (c *IAM) DeleteServiceSpecificCredential(input *DeleteServiceSpecificCredentialInput) (*DeleteServiceSpecificCredentialOutput, error) { - req, out := c.DeleteServiceSpecificCredentialRequest(input) - return out, req.Send() -} - -// DeleteServiceSpecificCredentialWithContext is the same as DeleteServiceSpecificCredential with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServiceSpecificCredential for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteServiceSpecificCredentialWithContext(ctx aws.Context, input *DeleteServiceSpecificCredentialInput, opts ...request.Option) (*DeleteServiceSpecificCredentialOutput, error) { - req, out := c.DeleteServiceSpecificCredentialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSigningCertificate = "DeleteSigningCertificate" - -// DeleteSigningCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSigningCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteSigningCertificate for more information on using the DeleteSigningCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteSigningCertificateRequest method. -// req, resp := client.DeleteSigningCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSigningCertificate -func (c *IAM) DeleteSigningCertificateRequest(input *DeleteSigningCertificateInput) (req *request.Request, output *DeleteSigningCertificateOutput) { - op := &request.Operation{ - Name: opDeleteSigningCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSigningCertificateInput{} - } - - output = &DeleteSigningCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSigningCertificate API operation for AWS Identity and Access Management. -// -// Deletes a signing certificate associated with the specified IAM user. -// -// If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID signing the request. This -// operation works for access keys under the Amazon Web Services account. Consequently, -// you can use this operation to manage Amazon Web Services account root user -// credentials even if the Amazon Web Services account has no associated IAM -// users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteSigningCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSigningCertificate -func (c *IAM) DeleteSigningCertificate(input *DeleteSigningCertificateInput) (*DeleteSigningCertificateOutput, error) { - req, out := c.DeleteSigningCertificateRequest(input) - return out, req.Send() -} - -// DeleteSigningCertificateWithContext is the same as DeleteSigningCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSigningCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteSigningCertificateWithContext(ctx aws.Context, input *DeleteSigningCertificateInput, opts ...request.Option) (*DeleteSigningCertificateOutput, error) { - req, out := c.DeleteSigningCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUser = "DeleteUser" - -// DeleteUserRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUser for more information on using the DeleteUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteUserRequest method. -// req, resp := client.DeleteUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUser -func (c *IAM) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { - op := &request.Operation{ - Name: opDeleteUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserInput{} - } - - output = &DeleteUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUser API operation for AWS Identity and Access Management. -// -// Deletes the specified IAM user. Unlike the Amazon Web Services Management -// Console, when you delete a user programmatically, you must delete the items -// attached to the user manually, or the deletion fails. For more information, -// see Deleting an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_deleting_cli). -// Before attempting to delete a user, remove the following items: -// -// - Password (DeleteLoginProfile) -// -// - Access keys (DeleteAccessKey) -// -// - Signing certificate (DeleteSigningCertificate) -// -// - SSH public key (DeleteSSHPublicKey) -// -// - Git credentials (DeleteServiceSpecificCredential) -// -// - Multi-factor authentication (MFA) device (DeactivateMFADevice, DeleteVirtualMFADevice) -// -// - Inline policies (DeleteUserPolicy) -// -// - Attached managed policies (DetachUserPolicy) -// -// - Group memberships (RemoveUserFromGroup) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUser -func (c *IAM) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - return out, req.Send() -} - -// DeleteUserWithContext is the same as DeleteUser with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserPermissionsBoundary = "DeleteUserPermissionsBoundary" - -// DeleteUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserPermissionsBoundary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserPermissionsBoundary for more information on using the DeleteUserPermissionsBoundary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteUserPermissionsBoundaryRequest method. -// req, resp := client.DeleteUserPermissionsBoundaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary -func (c *IAM) DeleteUserPermissionsBoundaryRequest(input *DeleteUserPermissionsBoundaryInput) (req *request.Request, output *DeleteUserPermissionsBoundaryOutput) { - op := &request.Operation{ - Name: opDeleteUserPermissionsBoundary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserPermissionsBoundaryInput{} - } - - output = &DeleteUserPermissionsBoundaryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserPermissionsBoundary API operation for AWS Identity and Access Management. -// -// Deletes the permissions boundary for the specified IAM user. -// -// Deleting the permissions boundary for a user might increase its permissions -// by allowing the user to perform all the actions granted in its permissions -// policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteUserPermissionsBoundary for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary -func (c *IAM) DeleteUserPermissionsBoundary(input *DeleteUserPermissionsBoundaryInput) (*DeleteUserPermissionsBoundaryOutput, error) { - req, out := c.DeleteUserPermissionsBoundaryRequest(input) - return out, req.Send() -} - -// DeleteUserPermissionsBoundaryWithContext is the same as DeleteUserPermissionsBoundary with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserPermissionsBoundary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteUserPermissionsBoundaryWithContext(ctx aws.Context, input *DeleteUserPermissionsBoundaryInput, opts ...request.Option) (*DeleteUserPermissionsBoundaryOutput, error) { - req, out := c.DeleteUserPermissionsBoundaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserPolicy = "DeleteUserPolicy" - -// DeleteUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteUserPolicy for more information on using the DeleteUserPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteUserPolicyRequest method. -// req, resp := client.DeleteUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPolicy -func (c *IAM) DeleteUserPolicyRequest(input *DeleteUserPolicyInput) (req *request.Request, output *DeleteUserPolicyOutput) { - op := &request.Operation{ - Name: opDeleteUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserPolicyInput{} - } - - output = &DeleteUserPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserPolicy API operation for AWS Identity and Access Management. -// -// Deletes the specified inline policy that is embedded in the specified IAM -// user. -// -// A user can also have managed policies attached to it. To detach a managed -// policy from a user, use DetachUserPolicy. For more information about policies, -// refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPolicy -func (c *IAM) DeleteUserPolicy(input *DeleteUserPolicyInput) (*DeleteUserPolicyOutput, error) { - req, out := c.DeleteUserPolicyRequest(input) - return out, req.Send() -} - -// DeleteUserPolicyWithContext is the same as DeleteUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteUserPolicyWithContext(ctx aws.Context, input *DeleteUserPolicyInput, opts ...request.Option) (*DeleteUserPolicyOutput, error) { - req, out := c.DeleteUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVirtualMFADevice = "DeleteVirtualMFADevice" - -// DeleteVirtualMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVirtualMFADevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteVirtualMFADevice for more information on using the DeleteVirtualMFADevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteVirtualMFADeviceRequest method. -// req, resp := client.DeleteVirtualMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteVirtualMFADevice -func (c *IAM) DeleteVirtualMFADeviceRequest(input *DeleteVirtualMFADeviceInput) (req *request.Request, output *DeleteVirtualMFADeviceOutput) { - op := &request.Operation{ - Name: opDeleteVirtualMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVirtualMFADeviceInput{} - } - - output = &DeleteVirtualMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVirtualMFADevice API operation for AWS Identity and Access Management. -// -// Deletes a virtual MFA device. -// -// You must deactivate a user's virtual MFA device before you can delete it. -// For information about deactivating MFA devices, see DeactivateMFADevice. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteVirtualMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteVirtualMFADevice -func (c *IAM) DeleteVirtualMFADevice(input *DeleteVirtualMFADeviceInput) (*DeleteVirtualMFADeviceOutput, error) { - req, out := c.DeleteVirtualMFADeviceRequest(input) - return out, req.Send() -} - -// DeleteVirtualMFADeviceWithContext is the same as DeleteVirtualMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVirtualMFADevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DeleteVirtualMFADeviceWithContext(ctx aws.Context, input *DeleteVirtualMFADeviceInput, opts ...request.Option) (*DeleteVirtualMFADeviceOutput, error) { - req, out := c.DeleteVirtualMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachGroupPolicy = "DetachGroupPolicy" - -// DetachGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachGroupPolicy for more information on using the DetachGroupPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DetachGroupPolicyRequest method. -// req, resp := client.DetachGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachGroupPolicy -func (c *IAM) DetachGroupPolicyRequest(input *DetachGroupPolicyInput) (req *request.Request, output *DetachGroupPolicyOutput) { - op := &request.Operation{ - Name: opDetachGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachGroupPolicyInput{} - } - - output = &DetachGroupPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachGroupPolicy API operation for AWS Identity and Access Management. -// -// Removes the specified managed policy from the specified IAM group. -// -// A group can also have inline policies embedded with it. To delete an inline -// policy, use DeleteGroupPolicy. For information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DetachGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachGroupPolicy -func (c *IAM) DetachGroupPolicy(input *DetachGroupPolicyInput) (*DetachGroupPolicyOutput, error) { - req, out := c.DetachGroupPolicyRequest(input) - return out, req.Send() -} - -// DetachGroupPolicyWithContext is the same as DetachGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachGroupPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DetachGroupPolicyWithContext(ctx aws.Context, input *DetachGroupPolicyInput, opts ...request.Option) (*DetachGroupPolicyOutput, error) { - req, out := c.DetachGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachRolePolicy = "DetachRolePolicy" - -// DetachRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachRolePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachRolePolicy for more information on using the DetachRolePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DetachRolePolicyRequest method. -// req, resp := client.DetachRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachRolePolicy -func (c *IAM) DetachRolePolicyRequest(input *DetachRolePolicyInput) (req *request.Request, output *DetachRolePolicyOutput) { - op := &request.Operation{ - Name: opDetachRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachRolePolicyInput{} - } - - output = &DetachRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachRolePolicy API operation for AWS Identity and Access Management. -// -// Removes the specified managed policy from the specified role. -// -// A role can also have inline policies embedded with it. To delete an inline -// policy, use DeleteRolePolicy. For information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DetachRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachRolePolicy -func (c *IAM) DetachRolePolicy(input *DetachRolePolicyInput) (*DetachRolePolicyOutput, error) { - req, out := c.DetachRolePolicyRequest(input) - return out, req.Send() -} - -// DetachRolePolicyWithContext is the same as DetachRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachRolePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DetachRolePolicyWithContext(ctx aws.Context, input *DetachRolePolicyInput, opts ...request.Option) (*DetachRolePolicyOutput, error) { - req, out := c.DetachRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachUserPolicy = "DetachUserPolicy" - -// DetachUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachUserPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DetachUserPolicy for more information on using the DetachUserPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DetachUserPolicyRequest method. -// req, resp := client.DetachUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachUserPolicy -func (c *IAM) DetachUserPolicyRequest(input *DetachUserPolicyInput) (req *request.Request, output *DetachUserPolicyOutput) { - op := &request.Operation{ - Name: opDetachUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachUserPolicyInput{} - } - - output = &DetachUserPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachUserPolicy API operation for AWS Identity and Access Management. -// -// Removes the specified managed policy from the specified user. -// -// A user can also have inline policies embedded with it. To delete an inline -// policy, use DeleteUserPolicy. For information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DetachUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachUserPolicy -func (c *IAM) DetachUserPolicy(input *DetachUserPolicyInput) (*DetachUserPolicyOutput, error) { - req, out := c.DetachUserPolicyRequest(input) - return out, req.Send() -} - -// DetachUserPolicyWithContext is the same as DetachUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachUserPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) DetachUserPolicyWithContext(ctx aws.Context, input *DetachUserPolicyInput, opts ...request.Option) (*DetachUserPolicyOutput, error) { - req, out := c.DetachUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableMFADevice = "EnableMFADevice" - -// EnableMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the EnableMFADevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See EnableMFADevice for more information on using the EnableMFADevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the EnableMFADeviceRequest method. -// req, resp := client.EnableMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/EnableMFADevice -func (c *IAM) EnableMFADeviceRequest(input *EnableMFADeviceInput) (req *request.Request, output *EnableMFADeviceOutput) { - op := &request.Operation{ - Name: opEnableMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableMFADeviceInput{} - } - - output = &EnableMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableMFADevice API operation for AWS Identity and Access Management. -// -// Enables the specified MFA device and associates it with the specified IAM -// user. When enabled, the MFA device is required for every subsequent login -// by the IAM user associated with the device. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation EnableMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeInvalidAuthenticationCodeException "InvalidAuthenticationCode" -// The request was rejected because the authentication code was not recognized. -// The error message describes the specific error. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/EnableMFADevice -func (c *IAM) EnableMFADevice(input *EnableMFADeviceInput) (*EnableMFADeviceOutput, error) { - req, out := c.EnableMFADeviceRequest(input) - return out, req.Send() -} - -// EnableMFADeviceWithContext is the same as EnableMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See EnableMFADevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) EnableMFADeviceWithContext(ctx aws.Context, input *EnableMFADeviceInput, opts ...request.Option) (*EnableMFADeviceOutput, error) { - req, out := c.EnableMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateCredentialReport = "GenerateCredentialReport" - -// GenerateCredentialReportRequest generates a "aws/request.Request" representing the -// client's request for the GenerateCredentialReport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GenerateCredentialReport for more information on using the GenerateCredentialReport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GenerateCredentialReportRequest method. -// req, resp := client.GenerateCredentialReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateCredentialReport -func (c *IAM) GenerateCredentialReportRequest(input *GenerateCredentialReportInput) (req *request.Request, output *GenerateCredentialReportOutput) { - op := &request.Operation{ - Name: opGenerateCredentialReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateCredentialReportInput{} - } - - output = &GenerateCredentialReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateCredentialReport API operation for AWS Identity and Access Management. -// -// Generates a credential report for the Amazon Web Services account. For more -// information about the credential report, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GenerateCredentialReport for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateCredentialReport -func (c *IAM) GenerateCredentialReport(input *GenerateCredentialReportInput) (*GenerateCredentialReportOutput, error) { - req, out := c.GenerateCredentialReportRequest(input) - return out, req.Send() -} - -// GenerateCredentialReportWithContext is the same as GenerateCredentialReport with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateCredentialReport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GenerateCredentialReportWithContext(ctx aws.Context, input *GenerateCredentialReportInput, opts ...request.Option) (*GenerateCredentialReportOutput, error) { - req, out := c.GenerateCredentialReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateOrganizationsAccessReport = "GenerateOrganizationsAccessReport" - -// GenerateOrganizationsAccessReportRequest generates a "aws/request.Request" representing the -// client's request for the GenerateOrganizationsAccessReport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GenerateOrganizationsAccessReport for more information on using the GenerateOrganizationsAccessReport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GenerateOrganizationsAccessReportRequest method. -// req, resp := client.GenerateOrganizationsAccessReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateOrganizationsAccessReport -func (c *IAM) GenerateOrganizationsAccessReportRequest(input *GenerateOrganizationsAccessReportInput) (req *request.Request, output *GenerateOrganizationsAccessReportOutput) { - op := &request.Operation{ - Name: opGenerateOrganizationsAccessReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateOrganizationsAccessReportInput{} - } - - output = &GenerateOrganizationsAccessReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateOrganizationsAccessReport API operation for AWS Identity and Access Management. -// -// Generates a report for service last accessed data for Organizations. You -// can generate a report for any entities (organization root, organizational -// unit, or account) or policies in your organization. -// -// To call this operation, you must be signed in using your Organizations management -// account credentials. You can use your long-term IAM user or root user credentials, -// or temporary credentials from assuming an IAM role. SCPs must be enabled -// for your organization root. You must have the required IAM and Organizations -// permissions. For more information, see Refining permissions using service -// last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// You can generate a service last accessed data report for entities by specifying -// only the entity's path. This data includes a list of services that are allowed -// by any service control policies (SCPs) that apply to the entity. -// -// You can generate a service last accessed data report for a policy by specifying -// an entity's path and an optional Organizations policy ID. This data includes -// a list of services that are allowed by the specified SCP. -// -// For each service in both report types, the data includes the most recent -// account activity that the policy allows to account principals in the entity -// or the entity's children. For important information about the data, reporting -// period, permissions required, troubleshooting, and supported Regions see -// Reducing permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// The data includes all attempts to access Amazon Web Services, not just the -// successful ones. This includes all attempts that were made using the Amazon -// Web Services Management Console, the Amazon Web Services API through any -// of the SDKs, or any of the command line tools. An unexpected entry in the -// service last accessed data does not mean that an account has been compromised, -// because the request might have been denied. Refer to your CloudTrail logs -// as the authoritative source for information about all API calls and whether -// they were successful or denied access. For more information, see Logging -// IAM events with CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) -// in the IAM User Guide. -// -// This operation returns a JobId. Use this parameter in the GetOrganizationsAccessReport -// operation to check the status of the report generation. To check the status -// of this request, use the JobId parameter in the GetOrganizationsAccessReport -// operation and test the JobStatus response parameter. When the job is complete, -// you can retrieve the report. -// -// To generate a service last accessed data report for entities, specify an -// entity path without specifying the optional Organizations policy ID. The -// type of entity that you specify determines the data returned in the report. -// -// - Root – When you specify the organizations root as the entity, the -// resulting report lists all of the services allowed by SCPs that are attached -// to your root. For each service, the report includes data for all accounts -// in your organization except the management account, because the management -// account is not limited by SCPs. -// -// - OU – When you specify an organizational unit (OU) as the entity, the -// resulting report lists all of the services allowed by SCPs that are attached -// to the OU and its parents. For each service, the report includes data -// for all accounts in the OU or its children. This data excludes the management -// account, because the management account is not limited by SCPs. -// -// - management account – When you specify the management account, the -// resulting report lists all Amazon Web Services services, because the management -// account is not limited by SCPs. For each service, the report includes -// data for only the management account. -// -// - Account – When you specify another account as the entity, the resulting -// report lists all of the services allowed by SCPs that are attached to -// the account and its parents. For each service, the report includes data -// for only the specified account. -// -// To generate a service last accessed data report for policies, specify an -// entity path and the optional Organizations policy ID. The type of entity -// that you specify determines the data returned for each service. -// -// - Root – When you specify the root entity and a policy ID, the resulting -// report lists all of the services that are allowed by the specified SCP. -// For each service, the report includes data for all accounts in your organization -// to which the SCP applies. This data excludes the management account, because -// the management account is not limited by SCPs. If the SCP is not attached -// to any entities in the organization, then the report will return a list -// of services with no data. -// -// - OU – When you specify an OU entity and a policy ID, the resulting -// report lists all of the services that are allowed by the specified SCP. -// For each service, the report includes data for all accounts in the OU -// or its children to which the SCP applies. This means that other accounts -// outside the OU that are affected by the SCP might not be included in the -// data. This data excludes the management account, because the management -// account is not limited by SCPs. If the SCP is not attached to the OU or -// one of its children, the report will return a list of services with no -// data. -// -// - management account – When you specify the management account, the -// resulting report lists all Amazon Web Services services, because the management -// account is not limited by SCPs. If you specify a policy ID in the CLI -// or API, the policy is ignored. For each service, the report includes data -// for only the management account. -// -// - Account – When you specify another account entity and a policy ID, -// the resulting report lists all of the services that are allowed by the -// specified SCP. For each service, the report includes data for only the -// specified account. This means that other accounts in the organization -// that are affected by the SCP might not be included in the data. If the -// SCP is not attached to the account, the report will return a list of services -// with no data. -// -// Service last accessed data does not use other policy types when determining -// whether a principal could access a service. These other policy types include -// identity-based policies, resource-based policies, access control lists, IAM -// permissions boundaries, and STS assume role policies. It only applies SCP -// logic. For more about the evaluation of policy types, see Evaluating policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. -// -// For more information about service last accessed data, see Reducing policy -// scope by viewing user activity (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GenerateOrganizationsAccessReport for usage and error information. -// -// Returned Error Codes: -// - ErrCodeReportGenerationLimitExceededException "ReportGenerationLimitExceeded" -// The request failed because the maximum number of concurrent requests for -// this account are already running. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateOrganizationsAccessReport -func (c *IAM) GenerateOrganizationsAccessReport(input *GenerateOrganizationsAccessReportInput) (*GenerateOrganizationsAccessReportOutput, error) { - req, out := c.GenerateOrganizationsAccessReportRequest(input) - return out, req.Send() -} - -// GenerateOrganizationsAccessReportWithContext is the same as GenerateOrganizationsAccessReport with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateOrganizationsAccessReport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GenerateOrganizationsAccessReportWithContext(ctx aws.Context, input *GenerateOrganizationsAccessReportInput, opts ...request.Option) (*GenerateOrganizationsAccessReportOutput, error) { - req, out := c.GenerateOrganizationsAccessReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateServiceLastAccessedDetails = "GenerateServiceLastAccessedDetails" - -// GenerateServiceLastAccessedDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GenerateServiceLastAccessedDetails operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GenerateServiceLastAccessedDetails for more information on using the GenerateServiceLastAccessedDetails -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GenerateServiceLastAccessedDetailsRequest method. -// req, resp := client.GenerateServiceLastAccessedDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateServiceLastAccessedDetails -func (c *IAM) GenerateServiceLastAccessedDetailsRequest(input *GenerateServiceLastAccessedDetailsInput) (req *request.Request, output *GenerateServiceLastAccessedDetailsOutput) { - op := &request.Operation{ - Name: opGenerateServiceLastAccessedDetails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateServiceLastAccessedDetailsInput{} - } - - output = &GenerateServiceLastAccessedDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateServiceLastAccessedDetails API operation for AWS Identity and Access Management. -// -// Generates a report that includes details about when an IAM resource (user, -// group, role, or policy) was last used in an attempt to access Amazon Web -// Services services. Recent activity usually appears within four hours. IAM -// reports activity for at least the last 400 days, or less if your Region began -// supporting this feature within the last year. For more information, see Regions -// where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period). -// For more information about services and actions for which action last accessed -// information is displayed, see IAM action last accessed information services -// and actions (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor-action-last-accessed.html). -// -// The service last accessed data includes all attempts to access an Amazon -// Web Services API, not just the successful ones. This includes all attempts -// that were made using the Amazon Web Services Management Console, the Amazon -// Web Services API through any of the SDKs, or any of the command line tools. -// An unexpected entry in the service last accessed data does not mean that -// your account has been compromised, because the request might have been denied. -// Refer to your CloudTrail logs as the authoritative source for information -// about all API calls and whether they were successful or denied access. For -// more information, see Logging IAM events with CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) -// in the IAM User Guide. -// -// The GenerateServiceLastAccessedDetails operation returns a JobId. Use this -// parameter in the following operations to retrieve the following details from -// your report: -// -// - GetServiceLastAccessedDetails – Use this operation for users, groups, -// roles, or policies to list every Amazon Web Services service that the -// resource could access using permissions policies. For each service, the -// response includes information about the most recent access attempt. The -// JobId returned by GenerateServiceLastAccessedDetail must be used by the -// same role within a session, or by the same user when used to call GetServiceLastAccessedDetail. -// -// - GetServiceLastAccessedDetailsWithEntities – Use this operation for -// groups and policies to list information about the associated entities -// (users or roles) that attempted to access a specific Amazon Web Services -// service. -// -// To check the status of the GenerateServiceLastAccessedDetails request, use -// the JobId parameter in the same operations and test the JobStatus response -// parameter. -// -// For additional information about the permissions policies that allow an identity -// (user, group, or role) to access specific services, use the ListPoliciesGrantingServiceAccess -// operation. -// -// Service last accessed data does not use other policy types when determining -// whether a resource could access a service. These other policy types include -// resource-based policies, access control lists, Organizations policies, IAM -// permissions boundaries, and STS assume role policies. It only applies permissions -// policy logic. For more about the evaluation of policy types, see Evaluating -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. -// -// For more information about service and action last accessed data, see Reducing -// permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GenerateServiceLastAccessedDetails for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateServiceLastAccessedDetails -func (c *IAM) GenerateServiceLastAccessedDetails(input *GenerateServiceLastAccessedDetailsInput) (*GenerateServiceLastAccessedDetailsOutput, error) { - req, out := c.GenerateServiceLastAccessedDetailsRequest(input) - return out, req.Send() -} - -// GenerateServiceLastAccessedDetailsWithContext is the same as GenerateServiceLastAccessedDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateServiceLastAccessedDetails for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GenerateServiceLastAccessedDetailsWithContext(ctx aws.Context, input *GenerateServiceLastAccessedDetailsInput, opts ...request.Option) (*GenerateServiceLastAccessedDetailsOutput, error) { - req, out := c.GenerateServiceLastAccessedDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccessKeyLastUsed = "GetAccessKeyLastUsed" - -// GetAccessKeyLastUsedRequest generates a "aws/request.Request" representing the -// client's request for the GetAccessKeyLastUsed operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccessKeyLastUsed for more information on using the GetAccessKeyLastUsed -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetAccessKeyLastUsedRequest method. -// req, resp := client.GetAccessKeyLastUsedRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccessKeyLastUsed -func (c *IAM) GetAccessKeyLastUsedRequest(input *GetAccessKeyLastUsedInput) (req *request.Request, output *GetAccessKeyLastUsedOutput) { - op := &request.Operation{ - Name: opGetAccessKeyLastUsed, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAccessKeyLastUsedInput{} - } - - output = &GetAccessKeyLastUsedOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccessKeyLastUsed API operation for AWS Identity and Access Management. -// -// Retrieves information about when the specified access key was last used. -// The information includes the date and time of last use, along with the Amazon -// Web Services service and Region that were specified in the last request made -// with that key. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetAccessKeyLastUsed for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccessKeyLastUsed -func (c *IAM) GetAccessKeyLastUsed(input *GetAccessKeyLastUsedInput) (*GetAccessKeyLastUsedOutput, error) { - req, out := c.GetAccessKeyLastUsedRequest(input) - return out, req.Send() -} - -// GetAccessKeyLastUsedWithContext is the same as GetAccessKeyLastUsed with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccessKeyLastUsed for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetAccessKeyLastUsedWithContext(ctx aws.Context, input *GetAccessKeyLastUsedInput, opts ...request.Option) (*GetAccessKeyLastUsedOutput, error) { - req, out := c.GetAccessKeyLastUsedRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccountAuthorizationDetails = "GetAccountAuthorizationDetails" - -// GetAccountAuthorizationDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountAuthorizationDetails operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccountAuthorizationDetails for more information on using the GetAccountAuthorizationDetails -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetAccountAuthorizationDetailsRequest method. -// req, resp := client.GetAccountAuthorizationDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountAuthorizationDetails -func (c *IAM) GetAccountAuthorizationDetailsRequest(input *GetAccountAuthorizationDetailsInput) (req *request.Request, output *GetAccountAuthorizationDetailsOutput) { - op := &request.Operation{ - Name: opGetAccountAuthorizationDetails, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &GetAccountAuthorizationDetailsInput{} - } - - output = &GetAccountAuthorizationDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountAuthorizationDetails API operation for AWS Identity and Access Management. -// -// Retrieves information about all IAM users, groups, roles, and policies in -// your Amazon Web Services account, including their relationships to one another. -// Use this operation to obtain a snapshot of the configuration of IAM permissions -// (users, groups, roles, and policies) in your account. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// You can optionally filter the results using the Filter parameter. You can -// paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetAccountAuthorizationDetails for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountAuthorizationDetails -func (c *IAM) GetAccountAuthorizationDetails(input *GetAccountAuthorizationDetailsInput) (*GetAccountAuthorizationDetailsOutput, error) { - req, out := c.GetAccountAuthorizationDetailsRequest(input) - return out, req.Send() -} - -// GetAccountAuthorizationDetailsWithContext is the same as GetAccountAuthorizationDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountAuthorizationDetails for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetAccountAuthorizationDetailsWithContext(ctx aws.Context, input *GetAccountAuthorizationDetailsInput, opts ...request.Option) (*GetAccountAuthorizationDetailsOutput, error) { - req, out := c.GetAccountAuthorizationDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetAccountAuthorizationDetailsPages iterates over the pages of a GetAccountAuthorizationDetails operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetAccountAuthorizationDetails method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetAccountAuthorizationDetails operation. -// pageNum := 0 -// err := client.GetAccountAuthorizationDetailsPages(params, -// func(page *iam.GetAccountAuthorizationDetailsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) GetAccountAuthorizationDetailsPages(input *GetAccountAuthorizationDetailsInput, fn func(*GetAccountAuthorizationDetailsOutput, bool) bool) error { - return c.GetAccountAuthorizationDetailsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetAccountAuthorizationDetailsPagesWithContext same as GetAccountAuthorizationDetailsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetAccountAuthorizationDetailsPagesWithContext(ctx aws.Context, input *GetAccountAuthorizationDetailsInput, fn func(*GetAccountAuthorizationDetailsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetAccountAuthorizationDetailsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetAccountAuthorizationDetailsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetAccountAuthorizationDetailsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetAccountPasswordPolicy = "GetAccountPasswordPolicy" - -// GetAccountPasswordPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountPasswordPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccountPasswordPolicy for more information on using the GetAccountPasswordPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetAccountPasswordPolicyRequest method. -// req, resp := client.GetAccountPasswordPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountPasswordPolicy -func (c *IAM) GetAccountPasswordPolicyRequest(input *GetAccountPasswordPolicyInput) (req *request.Request, output *GetAccountPasswordPolicyOutput) { - op := &request.Operation{ - Name: opGetAccountPasswordPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAccountPasswordPolicyInput{} - } - - output = &GetAccountPasswordPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountPasswordPolicy API operation for AWS Identity and Access Management. -// -// Retrieves the password policy for the Amazon Web Services account. This tells -// you the complexity requirements and mandatory rotation periods for the IAM -// user passwords in your account. For more information about using a password -// policy, see Managing an IAM password policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetAccountPasswordPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountPasswordPolicy -func (c *IAM) GetAccountPasswordPolicy(input *GetAccountPasswordPolicyInput) (*GetAccountPasswordPolicyOutput, error) { - req, out := c.GetAccountPasswordPolicyRequest(input) - return out, req.Send() -} - -// GetAccountPasswordPolicyWithContext is the same as GetAccountPasswordPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountPasswordPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetAccountPasswordPolicyWithContext(ctx aws.Context, input *GetAccountPasswordPolicyInput, opts ...request.Option) (*GetAccountPasswordPolicyOutput, error) { - req, out := c.GetAccountPasswordPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccountSummary = "GetAccountSummary" - -// GetAccountSummaryRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountSummary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetAccountSummary for more information on using the GetAccountSummary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetAccountSummaryRequest method. -// req, resp := client.GetAccountSummaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountSummary -func (c *IAM) GetAccountSummaryRequest(input *GetAccountSummaryInput) (req *request.Request, output *GetAccountSummaryOutput) { - op := &request.Operation{ - Name: opGetAccountSummary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAccountSummaryInput{} - } - - output = &GetAccountSummaryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountSummary API operation for AWS Identity and Access Management. -// -// Retrieves information about IAM entity usage and IAM quotas in the Amazon -// Web Services account. -// -// For information about IAM quotas, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetAccountSummary for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountSummary -func (c *IAM) GetAccountSummary(input *GetAccountSummaryInput) (*GetAccountSummaryOutput, error) { - req, out := c.GetAccountSummaryRequest(input) - return out, req.Send() -} - -// GetAccountSummaryWithContext is the same as GetAccountSummary with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountSummary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetAccountSummaryWithContext(ctx aws.Context, input *GetAccountSummaryInput, opts ...request.Option) (*GetAccountSummaryOutput, error) { - req, out := c.GetAccountSummaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetContextKeysForCustomPolicy = "GetContextKeysForCustomPolicy" - -// GetContextKeysForCustomPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetContextKeysForCustomPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetContextKeysForCustomPolicy for more information on using the GetContextKeysForCustomPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetContextKeysForCustomPolicyRequest method. -// req, resp := client.GetContextKeysForCustomPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForCustomPolicy -func (c *IAM) GetContextKeysForCustomPolicyRequest(input *GetContextKeysForCustomPolicyInput) (req *request.Request, output *GetContextKeysForPolicyResponse) { - op := &request.Operation{ - Name: opGetContextKeysForCustomPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetContextKeysForCustomPolicyInput{} - } - - output = &GetContextKeysForPolicyResponse{} - req = c.newRequest(op, input, output) - return -} - -// GetContextKeysForCustomPolicy API operation for AWS Identity and Access Management. -// -// Gets a list of all of the context keys referenced in the input policies. -// The policies are supplied as a list of one or more strings. To get the context -// keys from policies associated with an IAM user, group, or role, use GetContextKeysForPrincipalPolicy. -// -// Context keys are variables maintained by Amazon Web Services and its services -// that provide details about the context of an API query request. Context keys -// can be evaluated by testing against a value specified in an IAM policy. Use -// GetContextKeysForCustomPolicy to understand what key names and values you -// must supply when you call SimulateCustomPolicy. Note that all parameters -// are shown in unencoded form here for clarity but must be URL encoded to be -// included as a part of a real HTML request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetContextKeysForCustomPolicy for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForCustomPolicy -func (c *IAM) GetContextKeysForCustomPolicy(input *GetContextKeysForCustomPolicyInput) (*GetContextKeysForPolicyResponse, error) { - req, out := c.GetContextKeysForCustomPolicyRequest(input) - return out, req.Send() -} - -// GetContextKeysForCustomPolicyWithContext is the same as GetContextKeysForCustomPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetContextKeysForCustomPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetContextKeysForCustomPolicyWithContext(ctx aws.Context, input *GetContextKeysForCustomPolicyInput, opts ...request.Option) (*GetContextKeysForPolicyResponse, error) { - req, out := c.GetContextKeysForCustomPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetContextKeysForPrincipalPolicy = "GetContextKeysForPrincipalPolicy" - -// GetContextKeysForPrincipalPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetContextKeysForPrincipalPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetContextKeysForPrincipalPolicy for more information on using the GetContextKeysForPrincipalPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetContextKeysForPrincipalPolicyRequest method. -// req, resp := client.GetContextKeysForPrincipalPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForPrincipalPolicy -func (c *IAM) GetContextKeysForPrincipalPolicyRequest(input *GetContextKeysForPrincipalPolicyInput) (req *request.Request, output *GetContextKeysForPolicyResponse) { - op := &request.Operation{ - Name: opGetContextKeysForPrincipalPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetContextKeysForPrincipalPolicyInput{} - } - - output = &GetContextKeysForPolicyResponse{} - req = c.newRequest(op, input, output) - return -} - -// GetContextKeysForPrincipalPolicy API operation for AWS Identity and Access Management. -// -// Gets a list of all of the context keys referenced in all the IAM policies -// that are attached to the specified IAM entity. The entity can be an IAM user, -// group, or role. If you specify a user, then the request also includes all -// of the policies attached to groups that the user is a member of. -// -// You can optionally include a list of one or more additional policies, specified -// as strings. If you want to include only a list of policies by string, use -// GetContextKeysForCustomPolicy instead. -// -// Note: This operation discloses information about the permissions granted -// to other users. If you do not want users to see other user's permissions, -// then consider allowing them to use GetContextKeysForCustomPolicy instead. -// -// Context keys are variables maintained by Amazon Web Services and its services -// that provide details about the context of an API query request. Context keys -// can be evaluated by testing against a value in an IAM policy. Use GetContextKeysForPrincipalPolicy -// to understand what key names and values you must supply when you call SimulatePrincipalPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetContextKeysForPrincipalPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForPrincipalPolicy -func (c *IAM) GetContextKeysForPrincipalPolicy(input *GetContextKeysForPrincipalPolicyInput) (*GetContextKeysForPolicyResponse, error) { - req, out := c.GetContextKeysForPrincipalPolicyRequest(input) - return out, req.Send() -} - -// GetContextKeysForPrincipalPolicyWithContext is the same as GetContextKeysForPrincipalPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetContextKeysForPrincipalPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetContextKeysForPrincipalPolicyWithContext(ctx aws.Context, input *GetContextKeysForPrincipalPolicyInput, opts ...request.Option) (*GetContextKeysForPolicyResponse, error) { - req, out := c.GetContextKeysForPrincipalPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCredentialReport = "GetCredentialReport" - -// GetCredentialReportRequest generates a "aws/request.Request" representing the -// client's request for the GetCredentialReport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetCredentialReport for more information on using the GetCredentialReport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetCredentialReportRequest method. -// req, resp := client.GetCredentialReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetCredentialReport -func (c *IAM) GetCredentialReportRequest(input *GetCredentialReportInput) (req *request.Request, output *GetCredentialReportOutput) { - op := &request.Operation{ - Name: opGetCredentialReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCredentialReportInput{} - } - - output = &GetCredentialReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCredentialReport API operation for AWS Identity and Access Management. -// -// Retrieves a credential report for the Amazon Web Services account. For more -// information about the credential report, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetCredentialReport for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeCredentialReportNotPresentException "ReportNotPresent" -// The request was rejected because the credential report does not exist. To -// generate a credential report, use GenerateCredentialReport. -// -// - ErrCodeCredentialReportExpiredException "ReportExpired" -// The request was rejected because the most recent credential report has expired. -// To generate a new credential report, use GenerateCredentialReport. For more -// information about credential report expiration, see Getting credential reports -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM User Guide. -// -// - ErrCodeCredentialReportNotReadyException "ReportInProgress" -// The request was rejected because the credential report is still being generated. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetCredentialReport -func (c *IAM) GetCredentialReport(input *GetCredentialReportInput) (*GetCredentialReportOutput, error) { - req, out := c.GetCredentialReportRequest(input) - return out, req.Send() -} - -// GetCredentialReportWithContext is the same as GetCredentialReport with the addition of -// the ability to pass a context and additional request options. -// -// See GetCredentialReport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetCredentialReportWithContext(ctx aws.Context, input *GetCredentialReportInput, opts ...request.Option) (*GetCredentialReportOutput, error) { - req, out := c.GetCredentialReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGroup = "GetGroup" - -// GetGroupRequest generates a "aws/request.Request" representing the -// client's request for the GetGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGroup for more information on using the GetGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetGroupRequest method. -// req, resp := client.GetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroup -func (c *IAM) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) { - op := &request.Operation{ - Name: opGetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &GetGroupInput{} - } - - output = &GetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGroup API operation for AWS Identity and Access Management. -// -// Returns a list of IAM users that are in the specified IAM group. You can -// paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroup -func (c *IAM) GetGroup(input *GetGroupInput) (*GetGroupOutput, error) { - req, out := c.GetGroupRequest(input) - return out, req.Send() -} - -// GetGroupWithContext is the same as GetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See GetGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetGroupWithContext(ctx aws.Context, input *GetGroupInput, opts ...request.Option) (*GetGroupOutput, error) { - req, out := c.GetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetGroupPages iterates over the pages of a GetGroup operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetGroup method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetGroup operation. -// pageNum := 0 -// err := client.GetGroupPages(params, -// func(page *iam.GetGroupOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) GetGroupPages(input *GetGroupInput, fn func(*GetGroupOutput, bool) bool) error { - return c.GetGroupPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetGroupPagesWithContext same as GetGroupPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetGroupPagesWithContext(ctx aws.Context, input *GetGroupInput, fn func(*GetGroupOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetGroupInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetGroupRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetGroupOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetGroupPolicy = "GetGroupPolicy" - -// GetGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetGroupPolicy for more information on using the GetGroupPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetGroupPolicyRequest method. -// req, resp := client.GetGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroupPolicy -func (c *IAM) GetGroupPolicyRequest(input *GetGroupPolicyInput) (req *request.Request, output *GetGroupPolicyOutput) { - op := &request.Operation{ - Name: opGetGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetGroupPolicyInput{} - } - - output = &GetGroupPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGroupPolicy API operation for AWS Identity and Access Management. -// -// Retrieves the specified inline policy document that is embedded in the specified -// IAM group. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// An IAM group can also have managed policies attached to it. To retrieve a -// managed policy document that is attached to a group, use GetPolicy to determine -// the policy's default version, then use GetPolicyVersion to retrieve the policy -// document. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroupPolicy -func (c *IAM) GetGroupPolicy(input *GetGroupPolicyInput) (*GetGroupPolicyOutput, error) { - req, out := c.GetGroupPolicyRequest(input) - return out, req.Send() -} - -// GetGroupPolicyWithContext is the same as GetGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetGroupPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetGroupPolicyWithContext(ctx aws.Context, input *GetGroupPolicyInput, opts ...request.Option) (*GetGroupPolicyOutput, error) { - req, out := c.GetGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceProfile = "GetInstanceProfile" - -// GetInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetInstanceProfile for more information on using the GetInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetInstanceProfileRequest method. -// req, resp := client.GetInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetInstanceProfile -func (c *IAM) GetInstanceProfileRequest(input *GetInstanceProfileInput) (req *request.Request, output *GetInstanceProfileOutput) { - op := &request.Operation{ - Name: opGetInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceProfileInput{} - } - - output = &GetInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceProfile API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified instance profile, including the -// instance profile's path, GUID, ARN, and role. For more information about -// instance profiles, see Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetInstanceProfile -func (c *IAM) GetInstanceProfile(input *GetInstanceProfileInput) (*GetInstanceProfileOutput, error) { - req, out := c.GetInstanceProfileRequest(input) - return out, req.Send() -} - -// GetInstanceProfileWithContext is the same as GetInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetInstanceProfileWithContext(ctx aws.Context, input *GetInstanceProfileInput, opts ...request.Option) (*GetInstanceProfileOutput, error) { - req, out := c.GetInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoginProfile = "GetLoginProfile" - -// GetLoginProfileRequest generates a "aws/request.Request" representing the -// client's request for the GetLoginProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetLoginProfile for more information on using the GetLoginProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetLoginProfileRequest method. -// req, resp := client.GetLoginProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetLoginProfile -func (c *IAM) GetLoginProfileRequest(input *GetLoginProfileInput) (req *request.Request, output *GetLoginProfileOutput) { - op := &request.Operation{ - Name: opGetLoginProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLoginProfileInput{} - } - - output = &GetLoginProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoginProfile API operation for AWS Identity and Access Management. -// -// Retrieves the user name for the specified IAM user. A login profile is created -// when you create a password for the user to access the Amazon Web Services -// Management Console. If the user does not exist or does not have a password, -// the operation returns a 404 (NoSuchEntity) error. -// -// If you create an IAM user with access to the console, the CreateDate reflects -// the date you created the initial password for the user. -// -// If you create an IAM user with programmatic access, and then later add a -// password for the user to access the Amazon Web Services Management Console, -// the CreateDate reflects the initial password creation date. A user with programmatic -// access does not have a login profile unless you create a password for the -// user to access the Amazon Web Services Management Console. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetLoginProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetLoginProfile -func (c *IAM) GetLoginProfile(input *GetLoginProfileInput) (*GetLoginProfileOutput, error) { - req, out := c.GetLoginProfileRequest(input) - return out, req.Send() -} - -// GetLoginProfileWithContext is the same as GetLoginProfile with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoginProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetLoginProfileWithContext(ctx aws.Context, input *GetLoginProfileInput, opts ...request.Option) (*GetLoginProfileOutput, error) { - req, out := c.GetLoginProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMFADevice = "GetMFADevice" - -// GetMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the GetMFADevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetMFADevice for more information on using the GetMFADevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetMFADeviceRequest method. -// req, resp := client.GetMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetMFADevice -func (c *IAM) GetMFADeviceRequest(input *GetMFADeviceInput) (req *request.Request, output *GetMFADeviceOutput) { - op := &request.Operation{ - Name: opGetMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMFADeviceInput{} - } - - output = &GetMFADeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMFADevice API operation for AWS Identity and Access Management. -// -// Retrieves information about an MFA device for a specified user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetMFADevice -func (c *IAM) GetMFADevice(input *GetMFADeviceInput) (*GetMFADeviceOutput, error) { - req, out := c.GetMFADeviceRequest(input) - return out, req.Send() -} - -// GetMFADeviceWithContext is the same as GetMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See GetMFADevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetMFADeviceWithContext(ctx aws.Context, input *GetMFADeviceInput, opts ...request.Option) (*GetMFADeviceOutput, error) { - req, out := c.GetMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOpenIDConnectProvider = "GetOpenIDConnectProvider" - -// GetOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the GetOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOpenIDConnectProvider for more information on using the GetOpenIDConnectProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetOpenIDConnectProviderRequest method. -// req, resp := client.GetOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOpenIDConnectProvider -func (c *IAM) GetOpenIDConnectProviderRequest(input *GetOpenIDConnectProviderInput) (req *request.Request, output *GetOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opGetOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOpenIDConnectProviderInput{} - } - - output = &GetOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Returns information about the specified OpenID Connect (OIDC) provider resource -// object in IAM. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOpenIDConnectProvider -func (c *IAM) GetOpenIDConnectProvider(input *GetOpenIDConnectProviderInput) (*GetOpenIDConnectProviderOutput, error) { - req, out := c.GetOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// GetOpenIDConnectProviderWithContext is the same as GetOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See GetOpenIDConnectProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetOpenIDConnectProviderWithContext(ctx aws.Context, input *GetOpenIDConnectProviderInput, opts ...request.Option) (*GetOpenIDConnectProviderOutput, error) { - req, out := c.GetOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOrganizationsAccessReport = "GetOrganizationsAccessReport" - -// GetOrganizationsAccessReportRequest generates a "aws/request.Request" representing the -// client's request for the GetOrganizationsAccessReport operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetOrganizationsAccessReport for more information on using the GetOrganizationsAccessReport -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetOrganizationsAccessReportRequest method. -// req, resp := client.GetOrganizationsAccessReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOrganizationsAccessReport -func (c *IAM) GetOrganizationsAccessReportRequest(input *GetOrganizationsAccessReportInput) (req *request.Request, output *GetOrganizationsAccessReportOutput) { - op := &request.Operation{ - Name: opGetOrganizationsAccessReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOrganizationsAccessReportInput{} - } - - output = &GetOrganizationsAccessReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOrganizationsAccessReport API operation for AWS Identity and Access Management. -// -// Retrieves the service last accessed data report for Organizations that was -// previously generated using the GenerateOrganizationsAccessReport operation. -// This operation retrieves the status of your report job and the report contents. -// -// Depending on the parameters that you passed when you generated the report, -// the data returned could include different information. For details, see GenerateOrganizationsAccessReport. -// -// To call this operation, you must be signed in to the management account in -// your organization. SCPs must be enabled for your organization root. You must -// have permissions to perform this operation. For more information, see Refining -// permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// For each service that principals in an account (root user, IAM users, or -// IAM roles) could access using SCPs, the operation returns details about the -// most recent access attempt. If there was no attempt, the service is listed -// without details about the most recent attempt to access the service. If the -// operation fails, it returns the reason that it failed. -// -// By default, the list is sorted by service namespace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetOrganizationsAccessReport for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOrganizationsAccessReport -func (c *IAM) GetOrganizationsAccessReport(input *GetOrganizationsAccessReportInput) (*GetOrganizationsAccessReportOutput, error) { - req, out := c.GetOrganizationsAccessReportRequest(input) - return out, req.Send() -} - -// GetOrganizationsAccessReportWithContext is the same as GetOrganizationsAccessReport with the addition of -// the ability to pass a context and additional request options. -// -// See GetOrganizationsAccessReport for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetOrganizationsAccessReportWithContext(ctx aws.Context, input *GetOrganizationsAccessReportInput, opts ...request.Option) (*GetOrganizationsAccessReportOutput, error) { - req, out := c.GetOrganizationsAccessReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPolicy = "GetPolicy" - -// GetPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPolicy for more information on using the GetPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetPolicyRequest method. -// req, resp := client.GetPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicy -func (c *IAM) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { - op := &request.Operation{ - Name: opGetPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPolicyInput{} - } - - output = &GetPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPolicy API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified managed policy, including the policy's -// default version and the total number of IAM users, groups, and roles to which -// the policy is attached. To retrieve the list of the specific users, groups, -// and roles that the policy is attached to, use ListEntitiesForPolicy. This -// operation returns metadata about the policy. To retrieve the actual policy -// document for a specific version of the policy, use GetPolicyVersion. -// -// This operation retrieves information about managed policies. To retrieve -// information about an inline policy that is embedded with an IAM user, group, -// or role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicy -func (c *IAM) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - return out, req.Send() -} - -// GetPolicyWithContext is the same as GetPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPolicyVersion = "GetPolicyVersion" - -// GetPolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetPolicyVersion for more information on using the GetPolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetPolicyVersionRequest method. -// req, resp := client.GetPolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicyVersion -func (c *IAM) GetPolicyVersionRequest(input *GetPolicyVersionInput) (req *request.Request, output *GetPolicyVersionOutput) { - op := &request.Operation{ - Name: opGetPolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPolicyVersionInput{} - } - - output = &GetPolicyVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPolicyVersion API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified version of the specified managed -// policy, including the policy document. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// To list the available versions for a policy, use ListPolicyVersions. -// -// This operation retrieves information about managed policies. To retrieve -// information about an inline policy that is embedded in a user, group, or -// role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy. -// -// For more information about the types of policies, see Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For more information about managed policy versions, see Versioning for managed -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetPolicyVersion for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicyVersion -func (c *IAM) GetPolicyVersion(input *GetPolicyVersionInput) (*GetPolicyVersionOutput, error) { - req, out := c.GetPolicyVersionRequest(input) - return out, req.Send() -} - -// GetPolicyVersionWithContext is the same as GetPolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See GetPolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetPolicyVersionWithContext(ctx aws.Context, input *GetPolicyVersionInput, opts ...request.Option) (*GetPolicyVersionOutput, error) { - req, out := c.GetPolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRole = "GetRole" - -// GetRoleRequest generates a "aws/request.Request" representing the -// client's request for the GetRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRole for more information on using the GetRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetRoleRequest method. -// req, resp := client.GetRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRole -func (c *IAM) GetRoleRequest(input *GetRoleInput) (req *request.Request, output *GetRoleOutput) { - op := &request.Operation{ - Name: opGetRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRoleInput{} - } - - output = &GetRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRole API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified role, including the role's path, -// GUID, ARN, and the role's trust policy that grants permission to assume the -// role. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRole -func (c *IAM) GetRole(input *GetRoleInput) (*GetRoleOutput, error) { - req, out := c.GetRoleRequest(input) - return out, req.Send() -} - -// GetRoleWithContext is the same as GetRole with the addition of -// the ability to pass a context and additional request options. -// -// See GetRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetRoleWithContext(ctx aws.Context, input *GetRoleInput, opts ...request.Option) (*GetRoleOutput, error) { - req, out := c.GetRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRolePolicy = "GetRolePolicy" - -// GetRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetRolePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetRolePolicy for more information on using the GetRolePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetRolePolicyRequest method. -// req, resp := client.GetRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRolePolicy -func (c *IAM) GetRolePolicyRequest(input *GetRolePolicyInput) (req *request.Request, output *GetRolePolicyOutput) { - op := &request.Operation{ - Name: opGetRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRolePolicyInput{} - } - - output = &GetRolePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRolePolicy API operation for AWS Identity and Access Management. -// -// Retrieves the specified inline policy document that is embedded with the -// specified IAM role. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// An IAM role can also have managed policies attached to it. To retrieve a -// managed policy document that is attached to a role, use GetPolicy to determine -// the policy's default version, then use GetPolicyVersion to retrieve the policy -// document. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRolePolicy -func (c *IAM) GetRolePolicy(input *GetRolePolicyInput) (*GetRolePolicyOutput, error) { - req, out := c.GetRolePolicyRequest(input) - return out, req.Send() -} - -// GetRolePolicyWithContext is the same as GetRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetRolePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetRolePolicyWithContext(ctx aws.Context, input *GetRolePolicyInput, opts ...request.Option) (*GetRolePolicyOutput, error) { - req, out := c.GetRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSAMLProvider = "GetSAMLProvider" - -// GetSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the GetSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSAMLProvider for more information on using the GetSAMLProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetSAMLProviderRequest method. -// req, resp := client.GetSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSAMLProvider -func (c *IAM) GetSAMLProviderRequest(input *GetSAMLProviderInput) (req *request.Request, output *GetSAMLProviderOutput) { - op := &request.Operation{ - Name: opGetSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSAMLProviderInput{} - } - - output = &GetSAMLProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSAMLProvider API operation for AWS Identity and Access Management. -// -// Returns the SAML provider metadocument that was uploaded when the IAM SAML -// provider resource object was created or updated. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSAMLProvider -func (c *IAM) GetSAMLProvider(input *GetSAMLProviderInput) (*GetSAMLProviderOutput, error) { - req, out := c.GetSAMLProviderRequest(input) - return out, req.Send() -} - -// GetSAMLProviderWithContext is the same as GetSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See GetSAMLProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetSAMLProviderWithContext(ctx aws.Context, input *GetSAMLProviderInput, opts ...request.Option) (*GetSAMLProviderOutput, error) { - req, out := c.GetSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSSHPublicKey = "GetSSHPublicKey" - -// GetSSHPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the GetSSHPublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetSSHPublicKey for more information on using the GetSSHPublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetSSHPublicKeyRequest method. -// req, resp := client.GetSSHPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSSHPublicKey -func (c *IAM) GetSSHPublicKeyRequest(input *GetSSHPublicKeyInput) (req *request.Request, output *GetSSHPublicKeyOutput) { - op := &request.Operation{ - Name: opGetSSHPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSSHPublicKeyInput{} - } - - output = &GetSSHPublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSSHPublicKey API operation for AWS Identity and Access Management. -// -// Retrieves the specified SSH public key, including metadata about the key. -// -// The SSH public key retrieved by this operation is used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information -// about using SSH keys to authenticate to an CodeCommit repository, see Set -// up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetSSHPublicKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeUnrecognizedPublicKeyEncodingException "UnrecognizedPublicKeyEncoding" -// The request was rejected because the public key encoding format is unsupported -// or unrecognized. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSSHPublicKey -func (c *IAM) GetSSHPublicKey(input *GetSSHPublicKeyInput) (*GetSSHPublicKeyOutput, error) { - req, out := c.GetSSHPublicKeyRequest(input) - return out, req.Send() -} - -// GetSSHPublicKeyWithContext is the same as GetSSHPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See GetSSHPublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetSSHPublicKeyWithContext(ctx aws.Context, input *GetSSHPublicKeyInput, opts ...request.Option) (*GetSSHPublicKeyOutput, error) { - req, out := c.GetSSHPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServerCertificate = "GetServerCertificate" - -// GetServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the GetServerCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetServerCertificate for more information on using the GetServerCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetServerCertificateRequest method. -// req, resp := client.GetServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServerCertificate -func (c *IAM) GetServerCertificateRequest(input *GetServerCertificateInput) (req *request.Request, output *GetServerCertificateOutput) { - op := &request.Operation{ - Name: opGetServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServerCertificateInput{} - } - - output = &GetServerCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServerCertificate API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified server certificate stored in IAM. -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServerCertificate -func (c *IAM) GetServerCertificate(input *GetServerCertificateInput) (*GetServerCertificateOutput, error) { - req, out := c.GetServerCertificateRequest(input) - return out, req.Send() -} - -// GetServerCertificateWithContext is the same as GetServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See GetServerCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetServerCertificateWithContext(ctx aws.Context, input *GetServerCertificateInput, opts ...request.Option) (*GetServerCertificateOutput, error) { - req, out := c.GetServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServiceLastAccessedDetails = "GetServiceLastAccessedDetails" - -// GetServiceLastAccessedDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GetServiceLastAccessedDetails operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetServiceLastAccessedDetails for more information on using the GetServiceLastAccessedDetails -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetServiceLastAccessedDetailsRequest method. -// req, resp := client.GetServiceLastAccessedDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetails -func (c *IAM) GetServiceLastAccessedDetailsRequest(input *GetServiceLastAccessedDetailsInput) (req *request.Request, output *GetServiceLastAccessedDetailsOutput) { - op := &request.Operation{ - Name: opGetServiceLastAccessedDetails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServiceLastAccessedDetailsInput{} - } - - output = &GetServiceLastAccessedDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServiceLastAccessedDetails API operation for AWS Identity and Access Management. -// -// Retrieves a service last accessed report that was created using the GenerateServiceLastAccessedDetails -// operation. You can use the JobId parameter in GetServiceLastAccessedDetails -// to retrieve the status of your report job. When the report is complete, you -// can retrieve the generated report. The report includes a list of Amazon Web -// Services services that the resource (user, group, role, or managed policy) -// can access. -// -// Service last accessed data does not use other policy types when determining -// whether a resource could access a service. These other policy types include -// resource-based policies, access control lists, Organizations policies, IAM -// permissions boundaries, and STS assume role policies. It only applies permissions -// policy logic. For more about the evaluation of policy types, see Evaluating -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. -// -// For each service that the resource could access using permissions policies, -// the operation returns details about the most recent access attempt. If there -// was no attempt, the service is listed without details about the most recent -// attempt to access the service. If the operation fails, the GetServiceLastAccessedDetails -// operation returns the reason that it failed. -// -// The GetServiceLastAccessedDetails operation returns a list of services. This -// list includes the number of entities that have attempted to access the service -// and the date and time of the last attempt. It also returns the ARN of the -// following entity, depending on the resource ARN that you used to generate -// the report: -// -// - User – Returns the user ARN that you used to generate the report -// -// - Group – Returns the ARN of the group member (user) that last attempted -// to access the service -// -// - Role – Returns the role ARN that you used to generate the report -// -// - Policy – Returns the ARN of the user or role that last used the policy -// to attempt to access the service -// -// By default, the list is sorted by service namespace. -// -// If you specified ACTION_LEVEL granularity when you generated the report, -// this operation returns service and action last accessed data. This includes -// the most recent access attempt for each tracked action within a service. -// Otherwise, this operation returns only service data. -// -// For more information about service and action last accessed data, see Reducing -// permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetServiceLastAccessedDetails for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetails -func (c *IAM) GetServiceLastAccessedDetails(input *GetServiceLastAccessedDetailsInput) (*GetServiceLastAccessedDetailsOutput, error) { - req, out := c.GetServiceLastAccessedDetailsRequest(input) - return out, req.Send() -} - -// GetServiceLastAccessedDetailsWithContext is the same as GetServiceLastAccessedDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GetServiceLastAccessedDetails for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetServiceLastAccessedDetailsWithContext(ctx aws.Context, input *GetServiceLastAccessedDetailsInput, opts ...request.Option) (*GetServiceLastAccessedDetailsOutput, error) { - req, out := c.GetServiceLastAccessedDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServiceLastAccessedDetailsWithEntities = "GetServiceLastAccessedDetailsWithEntities" - -// GetServiceLastAccessedDetailsWithEntitiesRequest generates a "aws/request.Request" representing the -// client's request for the GetServiceLastAccessedDetailsWithEntities operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetServiceLastAccessedDetailsWithEntities for more information on using the GetServiceLastAccessedDetailsWithEntities -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetServiceLastAccessedDetailsWithEntitiesRequest method. -// req, resp := client.GetServiceLastAccessedDetailsWithEntitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetailsWithEntities -func (c *IAM) GetServiceLastAccessedDetailsWithEntitiesRequest(input *GetServiceLastAccessedDetailsWithEntitiesInput) (req *request.Request, output *GetServiceLastAccessedDetailsWithEntitiesOutput) { - op := &request.Operation{ - Name: opGetServiceLastAccessedDetailsWithEntities, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServiceLastAccessedDetailsWithEntitiesInput{} - } - - output = &GetServiceLastAccessedDetailsWithEntitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServiceLastAccessedDetailsWithEntities API operation for AWS Identity and Access Management. -// -// After you generate a group or policy report using the GenerateServiceLastAccessedDetails -// operation, you can use the JobId parameter in GetServiceLastAccessedDetailsWithEntities. -// This operation retrieves the status of your report job and a list of entities -// that could have used group or policy permissions to access the specified -// service. -// -// - Group – For a group report, this operation returns a list of users -// in the group that could have used the group’s policies in an attempt -// to access the service. -// -// - Policy – For a policy report, this operation returns a list of entities -// (users or roles) that could have used the policy in an attempt to access -// the service. -// -// You can also use this operation for user or role reports to retrieve details -// about those entities. -// -// If the operation fails, the GetServiceLastAccessedDetailsWithEntities operation -// returns the reason that it failed. -// -// By default, the list of associated entities is sorted by date, with the most -// recent access listed first. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetServiceLastAccessedDetailsWithEntities for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetailsWithEntities -func (c *IAM) GetServiceLastAccessedDetailsWithEntities(input *GetServiceLastAccessedDetailsWithEntitiesInput) (*GetServiceLastAccessedDetailsWithEntitiesOutput, error) { - req, out := c.GetServiceLastAccessedDetailsWithEntitiesRequest(input) - return out, req.Send() -} - -// GetServiceLastAccessedDetailsWithEntitiesWithContext is the same as GetServiceLastAccessedDetailsWithEntities with the addition of -// the ability to pass a context and additional request options. -// -// See GetServiceLastAccessedDetailsWithEntities for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetServiceLastAccessedDetailsWithEntitiesWithContext(ctx aws.Context, input *GetServiceLastAccessedDetailsWithEntitiesInput, opts ...request.Option) (*GetServiceLastAccessedDetailsWithEntitiesOutput, error) { - req, out := c.GetServiceLastAccessedDetailsWithEntitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServiceLinkedRoleDeletionStatus = "GetServiceLinkedRoleDeletionStatus" - -// GetServiceLinkedRoleDeletionStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetServiceLinkedRoleDeletionStatus operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetServiceLinkedRoleDeletionStatus for more information on using the GetServiceLinkedRoleDeletionStatus -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetServiceLinkedRoleDeletionStatusRequest method. -// req, resp := client.GetServiceLinkedRoleDeletionStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatus -func (c *IAM) GetServiceLinkedRoleDeletionStatusRequest(input *GetServiceLinkedRoleDeletionStatusInput) (req *request.Request, output *GetServiceLinkedRoleDeletionStatusOutput) { - op := &request.Operation{ - Name: opGetServiceLinkedRoleDeletionStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServiceLinkedRoleDeletionStatusInput{} - } - - output = &GetServiceLinkedRoleDeletionStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServiceLinkedRoleDeletionStatus API operation for AWS Identity and Access Management. -// -// Retrieves the status of your service-linked role deletion. After you use -// DeleteServiceLinkedRole to submit a service-linked role for deletion, you -// can use the DeletionTaskId parameter in GetServiceLinkedRoleDeletionStatus -// to check the status of the deletion. If the deletion fails, this operation -// returns the reason that it failed, if that information is returned by the -// service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetServiceLinkedRoleDeletionStatus for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatus -func (c *IAM) GetServiceLinkedRoleDeletionStatus(input *GetServiceLinkedRoleDeletionStatusInput) (*GetServiceLinkedRoleDeletionStatusOutput, error) { - req, out := c.GetServiceLinkedRoleDeletionStatusRequest(input) - return out, req.Send() -} - -// GetServiceLinkedRoleDeletionStatusWithContext is the same as GetServiceLinkedRoleDeletionStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetServiceLinkedRoleDeletionStatus for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetServiceLinkedRoleDeletionStatusWithContext(ctx aws.Context, input *GetServiceLinkedRoleDeletionStatusInput, opts ...request.Option) (*GetServiceLinkedRoleDeletionStatusOutput, error) { - req, out := c.GetServiceLinkedRoleDeletionStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUser = "GetUser" - -// GetUserRequest generates a "aws/request.Request" representing the -// client's request for the GetUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUser for more information on using the GetUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetUserRequest method. -// req, resp := client.GetUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUser -func (c *IAM) GetUserRequest(input *GetUserInput) (req *request.Request, output *GetUserOutput) { - op := &request.Operation{ - Name: opGetUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUserInput{} - } - - output = &GetUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUser API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified IAM user, including the user's -// creation date, path, unique ID, and ARN. -// -// If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID used to sign the request to -// this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUser -func (c *IAM) GetUser(input *GetUserInput) (*GetUserOutput, error) { - req, out := c.GetUserRequest(input) - return out, req.Send() -} - -// GetUserWithContext is the same as GetUser with the addition of -// the ability to pass a context and additional request options. -// -// See GetUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetUserWithContext(ctx aws.Context, input *GetUserInput, opts ...request.Option) (*GetUserOutput, error) { - req, out := c.GetUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUserPolicy = "GetUserPolicy" - -// GetUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetUserPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetUserPolicy for more information on using the GetUserPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetUserPolicyRequest method. -// req, resp := client.GetUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUserPolicy -func (c *IAM) GetUserPolicyRequest(input *GetUserPolicyInput) (req *request.Request, output *GetUserPolicyOutput) { - op := &request.Operation{ - Name: opGetUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUserPolicyInput{} - } - - output = &GetUserPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUserPolicy API operation for AWS Identity and Access Management. -// -// Retrieves the specified inline policy document that is embedded in the specified -// IAM user. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// An IAM user can also have managed policies attached to it. To retrieve a -// managed policy document that is attached to a user, use GetPolicy to determine -// the policy's default version. Then use GetPolicyVersion to retrieve the policy -// document. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUserPolicy -func (c *IAM) GetUserPolicy(input *GetUserPolicyInput) (*GetUserPolicyOutput, error) { - req, out := c.GetUserPolicyRequest(input) - return out, req.Send() -} - -// GetUserPolicyWithContext is the same as GetUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetUserPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) GetUserPolicyWithContext(ctx aws.Context, input *GetUserPolicyInput, opts ...request.Option) (*GetUserPolicyOutput, error) { - req, out := c.GetUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAccessKeys = "ListAccessKeys" - -// ListAccessKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListAccessKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAccessKeys for more information on using the ListAccessKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListAccessKeysRequest method. -// req, resp := client.ListAccessKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccessKeys -func (c *IAM) ListAccessKeysRequest(input *ListAccessKeysInput) (req *request.Request, output *ListAccessKeysOutput) { - op := &request.Operation{ - Name: opListAccessKeys, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAccessKeysInput{} - } - - output = &ListAccessKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAccessKeys API operation for AWS Identity and Access Management. -// -// Returns information about the access key IDs associated with the specified -// IAM user. If there is none, the operation returns an empty list. -// -// Although each user is limited to a small number of keys, you can still paginate -// the results using the MaxItems and Marker parameters. -// -// If the UserName is not specified, the user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request. -// If a temporary access key is used, then UserName is required. If a long-term -// key is assigned to the user, then UserName is not required. -// -// This operation works for access keys under the Amazon Web Services account. -// If the Amazon Web Services account has no associated users, the root user -// returns it's own access key IDs by running this command. -// -// To ensure the security of your Amazon Web Services account, the secret access -// key is accessible only during key and user creation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAccessKeys for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccessKeys -func (c *IAM) ListAccessKeys(input *ListAccessKeysInput) (*ListAccessKeysOutput, error) { - req, out := c.ListAccessKeysRequest(input) - return out, req.Send() -} - -// ListAccessKeysWithContext is the same as ListAccessKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListAccessKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAccessKeysWithContext(ctx aws.Context, input *ListAccessKeysInput, opts ...request.Option) (*ListAccessKeysOutput, error) { - req, out := c.ListAccessKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAccessKeysPages iterates over the pages of a ListAccessKeys operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAccessKeys method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListAccessKeys operation. -// pageNum := 0 -// err := client.ListAccessKeysPages(params, -// func(page *iam.ListAccessKeysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAccessKeysPages(input *ListAccessKeysInput, fn func(*ListAccessKeysOutput, bool) bool) error { - return c.ListAccessKeysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAccessKeysPagesWithContext same as ListAccessKeysPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAccessKeysPagesWithContext(ctx aws.Context, input *ListAccessKeysInput, fn func(*ListAccessKeysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAccessKeysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAccessKeysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAccessKeysOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListAccountAliases = "ListAccountAliases" - -// ListAccountAliasesRequest generates a "aws/request.Request" representing the -// client's request for the ListAccountAliases operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAccountAliases for more information on using the ListAccountAliases -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListAccountAliasesRequest method. -// req, resp := client.ListAccountAliasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccountAliases -func (c *IAM) ListAccountAliasesRequest(input *ListAccountAliasesInput) (req *request.Request, output *ListAccountAliasesOutput) { - op := &request.Operation{ - Name: opListAccountAliases, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAccountAliasesInput{} - } - - output = &ListAccountAliasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAccountAliases API operation for AWS Identity and Access Management. -// -// Lists the account alias associated with the Amazon Web Services account (Note: -// you can have only one). For information about using an Amazon Web Services -// account alias, see Creating, deleting, and listing an Amazon Web Services -// account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAccountAliases for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccountAliases -func (c *IAM) ListAccountAliases(input *ListAccountAliasesInput) (*ListAccountAliasesOutput, error) { - req, out := c.ListAccountAliasesRequest(input) - return out, req.Send() -} - -// ListAccountAliasesWithContext is the same as ListAccountAliases with the addition of -// the ability to pass a context and additional request options. -// -// See ListAccountAliases for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAccountAliasesWithContext(ctx aws.Context, input *ListAccountAliasesInput, opts ...request.Option) (*ListAccountAliasesOutput, error) { - req, out := c.ListAccountAliasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAccountAliasesPages iterates over the pages of a ListAccountAliases operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAccountAliases method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListAccountAliases operation. -// pageNum := 0 -// err := client.ListAccountAliasesPages(params, -// func(page *iam.ListAccountAliasesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAccountAliasesPages(input *ListAccountAliasesInput, fn func(*ListAccountAliasesOutput, bool) bool) error { - return c.ListAccountAliasesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAccountAliasesPagesWithContext same as ListAccountAliasesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAccountAliasesPagesWithContext(ctx aws.Context, input *ListAccountAliasesInput, fn func(*ListAccountAliasesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAccountAliasesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAccountAliasesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAccountAliasesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListAttachedGroupPolicies = "ListAttachedGroupPolicies" - -// ListAttachedGroupPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListAttachedGroupPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAttachedGroupPolicies for more information on using the ListAttachedGroupPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListAttachedGroupPoliciesRequest method. -// req, resp := client.ListAttachedGroupPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedGroupPolicies -func (c *IAM) ListAttachedGroupPoliciesRequest(input *ListAttachedGroupPoliciesInput) (req *request.Request, output *ListAttachedGroupPoliciesOutput) { - op := &request.Operation{ - Name: opListAttachedGroupPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAttachedGroupPoliciesInput{} - } - - output = &ListAttachedGroupPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAttachedGroupPolicies API operation for AWS Identity and Access Management. -// -// Lists all managed policies that are attached to the specified IAM group. -// -// An IAM group can also have inline policies embedded with it. To list the -// inline policies for a group, use ListGroupPolicies. For information about -// policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. You -// can use the PathPrefix parameter to limit the list of policies to only those -// matching the specified path prefix. If there are no policies attached to -// the specified group (or none that match the specified path prefix), the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAttachedGroupPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedGroupPolicies -func (c *IAM) ListAttachedGroupPolicies(input *ListAttachedGroupPoliciesInput) (*ListAttachedGroupPoliciesOutput, error) { - req, out := c.ListAttachedGroupPoliciesRequest(input) - return out, req.Send() -} - -// ListAttachedGroupPoliciesWithContext is the same as ListAttachedGroupPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListAttachedGroupPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAttachedGroupPoliciesWithContext(ctx aws.Context, input *ListAttachedGroupPoliciesInput, opts ...request.Option) (*ListAttachedGroupPoliciesOutput, error) { - req, out := c.ListAttachedGroupPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAttachedGroupPoliciesPages iterates over the pages of a ListAttachedGroupPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAttachedGroupPolicies method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListAttachedGroupPolicies operation. -// pageNum := 0 -// err := client.ListAttachedGroupPoliciesPages(params, -// func(page *iam.ListAttachedGroupPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAttachedGroupPoliciesPages(input *ListAttachedGroupPoliciesInput, fn func(*ListAttachedGroupPoliciesOutput, bool) bool) error { - return c.ListAttachedGroupPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAttachedGroupPoliciesPagesWithContext same as ListAttachedGroupPoliciesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAttachedGroupPoliciesPagesWithContext(ctx aws.Context, input *ListAttachedGroupPoliciesInput, fn func(*ListAttachedGroupPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAttachedGroupPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAttachedGroupPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAttachedGroupPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListAttachedRolePolicies = "ListAttachedRolePolicies" - -// ListAttachedRolePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListAttachedRolePolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAttachedRolePolicies for more information on using the ListAttachedRolePolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListAttachedRolePoliciesRequest method. -// req, resp := client.ListAttachedRolePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedRolePolicies -func (c *IAM) ListAttachedRolePoliciesRequest(input *ListAttachedRolePoliciesInput) (req *request.Request, output *ListAttachedRolePoliciesOutput) { - op := &request.Operation{ - Name: opListAttachedRolePolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAttachedRolePoliciesInput{} - } - - output = &ListAttachedRolePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAttachedRolePolicies API operation for AWS Identity and Access Management. -// -// Lists all managed policies that are attached to the specified IAM role. -// -// An IAM role can also have inline policies embedded with it. To list the inline -// policies for a role, use ListRolePolicies. For information about policies, -// see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. You -// can use the PathPrefix parameter to limit the list of policies to only those -// matching the specified path prefix. If there are no policies attached to -// the specified role (or none that match the specified path prefix), the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAttachedRolePolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedRolePolicies -func (c *IAM) ListAttachedRolePolicies(input *ListAttachedRolePoliciesInput) (*ListAttachedRolePoliciesOutput, error) { - req, out := c.ListAttachedRolePoliciesRequest(input) - return out, req.Send() -} - -// ListAttachedRolePoliciesWithContext is the same as ListAttachedRolePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListAttachedRolePolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAttachedRolePoliciesWithContext(ctx aws.Context, input *ListAttachedRolePoliciesInput, opts ...request.Option) (*ListAttachedRolePoliciesOutput, error) { - req, out := c.ListAttachedRolePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAttachedRolePoliciesPages iterates over the pages of a ListAttachedRolePolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAttachedRolePolicies method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListAttachedRolePolicies operation. -// pageNum := 0 -// err := client.ListAttachedRolePoliciesPages(params, -// func(page *iam.ListAttachedRolePoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAttachedRolePoliciesPages(input *ListAttachedRolePoliciesInput, fn func(*ListAttachedRolePoliciesOutput, bool) bool) error { - return c.ListAttachedRolePoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAttachedRolePoliciesPagesWithContext same as ListAttachedRolePoliciesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAttachedRolePoliciesPagesWithContext(ctx aws.Context, input *ListAttachedRolePoliciesInput, fn func(*ListAttachedRolePoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAttachedRolePoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAttachedRolePoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAttachedRolePoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListAttachedUserPolicies = "ListAttachedUserPolicies" - -// ListAttachedUserPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListAttachedUserPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListAttachedUserPolicies for more information on using the ListAttachedUserPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListAttachedUserPoliciesRequest method. -// req, resp := client.ListAttachedUserPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedUserPolicies -func (c *IAM) ListAttachedUserPoliciesRequest(input *ListAttachedUserPoliciesInput) (req *request.Request, output *ListAttachedUserPoliciesOutput) { - op := &request.Operation{ - Name: opListAttachedUserPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAttachedUserPoliciesInput{} - } - - output = &ListAttachedUserPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAttachedUserPolicies API operation for AWS Identity and Access Management. -// -// Lists all managed policies that are attached to the specified IAM user. -// -// An IAM user can also have inline policies embedded with it. To list the inline -// policies for a user, use ListUserPolicies. For information about policies, -// see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. You -// can use the PathPrefix parameter to limit the list of policies to only those -// matching the specified path prefix. If there are no policies attached to -// the specified group (or none that match the specified path prefix), the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAttachedUserPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedUserPolicies -func (c *IAM) ListAttachedUserPolicies(input *ListAttachedUserPoliciesInput) (*ListAttachedUserPoliciesOutput, error) { - req, out := c.ListAttachedUserPoliciesRequest(input) - return out, req.Send() -} - -// ListAttachedUserPoliciesWithContext is the same as ListAttachedUserPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListAttachedUserPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAttachedUserPoliciesWithContext(ctx aws.Context, input *ListAttachedUserPoliciesInput, opts ...request.Option) (*ListAttachedUserPoliciesOutput, error) { - req, out := c.ListAttachedUserPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAttachedUserPoliciesPages iterates over the pages of a ListAttachedUserPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAttachedUserPolicies method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListAttachedUserPolicies operation. -// pageNum := 0 -// err := client.ListAttachedUserPoliciesPages(params, -// func(page *iam.ListAttachedUserPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAttachedUserPoliciesPages(input *ListAttachedUserPoliciesInput, fn func(*ListAttachedUserPoliciesOutput, bool) bool) error { - return c.ListAttachedUserPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAttachedUserPoliciesPagesWithContext same as ListAttachedUserPoliciesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListAttachedUserPoliciesPagesWithContext(ctx aws.Context, input *ListAttachedUserPoliciesInput, fn func(*ListAttachedUserPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAttachedUserPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAttachedUserPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAttachedUserPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListEntitiesForPolicy = "ListEntitiesForPolicy" - -// ListEntitiesForPolicyRequest generates a "aws/request.Request" representing the -// client's request for the ListEntitiesForPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListEntitiesForPolicy for more information on using the ListEntitiesForPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListEntitiesForPolicyRequest method. -// req, resp := client.ListEntitiesForPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListEntitiesForPolicy -func (c *IAM) ListEntitiesForPolicyRequest(input *ListEntitiesForPolicyInput) (req *request.Request, output *ListEntitiesForPolicyOutput) { - op := &request.Operation{ - Name: opListEntitiesForPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListEntitiesForPolicyInput{} - } - - output = &ListEntitiesForPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEntitiesForPolicy API operation for AWS Identity and Access Management. -// -// Lists all IAM users, groups, and roles that the specified managed policy -// is attached to. -// -// You can use the optional EntityFilter parameter to limit the results to a -// particular type of entity (users, groups, or roles). For example, to list -// only the roles that are attached to the specified policy, set EntityFilter -// to Role. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListEntitiesForPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListEntitiesForPolicy -func (c *IAM) ListEntitiesForPolicy(input *ListEntitiesForPolicyInput) (*ListEntitiesForPolicyOutput, error) { - req, out := c.ListEntitiesForPolicyRequest(input) - return out, req.Send() -} - -// ListEntitiesForPolicyWithContext is the same as ListEntitiesForPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See ListEntitiesForPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListEntitiesForPolicyWithContext(ctx aws.Context, input *ListEntitiesForPolicyInput, opts ...request.Option) (*ListEntitiesForPolicyOutput, error) { - req, out := c.ListEntitiesForPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEntitiesForPolicyPages iterates over the pages of a ListEntitiesForPolicy operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEntitiesForPolicy method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListEntitiesForPolicy operation. -// pageNum := 0 -// err := client.ListEntitiesForPolicyPages(params, -// func(page *iam.ListEntitiesForPolicyOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListEntitiesForPolicyPages(input *ListEntitiesForPolicyInput, fn func(*ListEntitiesForPolicyOutput, bool) bool) error { - return c.ListEntitiesForPolicyPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEntitiesForPolicyPagesWithContext same as ListEntitiesForPolicyPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListEntitiesForPolicyPagesWithContext(ctx aws.Context, input *ListEntitiesForPolicyInput, fn func(*ListEntitiesForPolicyOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEntitiesForPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEntitiesForPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListEntitiesForPolicyOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListGroupPolicies = "ListGroupPolicies" - -// ListGroupPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListGroupPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGroupPolicies for more information on using the ListGroupPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListGroupPoliciesRequest method. -// req, resp := client.ListGroupPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupPolicies -func (c *IAM) ListGroupPoliciesRequest(input *ListGroupPoliciesInput) (req *request.Request, output *ListGroupPoliciesOutput) { - op := &request.Operation{ - Name: opListGroupPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListGroupPoliciesInput{} - } - - output = &ListGroupPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroupPolicies API operation for AWS Identity and Access Management. -// -// Lists the names of the inline policies that are embedded in the specified -// IAM group. -// -// An IAM group can also have managed policies attached to it. To list the managed -// policies that are attached to a group, use ListAttachedGroupPolicies. For -// more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. If -// there are no inline policies embedded with the specified group, the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListGroupPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupPolicies -func (c *IAM) ListGroupPolicies(input *ListGroupPoliciesInput) (*ListGroupPoliciesOutput, error) { - req, out := c.ListGroupPoliciesRequest(input) - return out, req.Send() -} - -// ListGroupPoliciesWithContext is the same as ListGroupPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListGroupPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListGroupPoliciesWithContext(ctx aws.Context, input *ListGroupPoliciesInput, opts ...request.Option) (*ListGroupPoliciesOutput, error) { - req, out := c.ListGroupPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGroupPoliciesPages iterates over the pages of a ListGroupPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGroupPolicies method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListGroupPolicies operation. -// pageNum := 0 -// err := client.ListGroupPoliciesPages(params, -// func(page *iam.ListGroupPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListGroupPoliciesPages(input *ListGroupPoliciesInput, fn func(*ListGroupPoliciesOutput, bool) bool) error { - return c.ListGroupPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGroupPoliciesPagesWithContext same as ListGroupPoliciesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListGroupPoliciesPagesWithContext(ctx aws.Context, input *ListGroupPoliciesInput, fn func(*ListGroupPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGroupPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGroupPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListGroupPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListGroups = "ListGroups" - -// ListGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGroups for more information on using the ListGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListGroupsRequest method. -// req, resp := client.ListGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroups -func (c *IAM) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { - op := &request.Operation{ - Name: opListGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListGroupsInput{} - } - - output = &ListGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroups API operation for AWS Identity and Access Management. -// -// Lists the IAM groups that have the specified path prefix. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListGroups for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroups -func (c *IAM) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) { - req, out := c.ListGroupsRequest(input) - return out, req.Send() -} - -// ListGroupsWithContext is the same as ListGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) { - req, out := c.ListGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGroupsPages iterates over the pages of a ListGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGroups method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListGroups operation. -// pageNum := 0 -// err := client.ListGroupsPages(params, -// func(page *iam.ListGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error { - return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGroupsPagesWithContext same as ListGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListGroupsForUser = "ListGroupsForUser" - -// ListGroupsForUserRequest generates a "aws/request.Request" representing the -// client's request for the ListGroupsForUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListGroupsForUser for more information on using the ListGroupsForUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListGroupsForUserRequest method. -// req, resp := client.ListGroupsForUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupsForUser -func (c *IAM) ListGroupsForUserRequest(input *ListGroupsForUserInput) (req *request.Request, output *ListGroupsForUserOutput) { - op := &request.Operation{ - Name: opListGroupsForUser, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListGroupsForUserInput{} - } - - output = &ListGroupsForUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroupsForUser API operation for AWS Identity and Access Management. -// -// Lists the IAM groups that the specified IAM user belongs to. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListGroupsForUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupsForUser -func (c *IAM) ListGroupsForUser(input *ListGroupsForUserInput) (*ListGroupsForUserOutput, error) { - req, out := c.ListGroupsForUserRequest(input) - return out, req.Send() -} - -// ListGroupsForUserWithContext is the same as ListGroupsForUser with the addition of -// the ability to pass a context and additional request options. -// -// See ListGroupsForUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListGroupsForUserWithContext(ctx aws.Context, input *ListGroupsForUserInput, opts ...request.Option) (*ListGroupsForUserOutput, error) { - req, out := c.ListGroupsForUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGroupsForUserPages iterates over the pages of a ListGroupsForUser operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGroupsForUser method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListGroupsForUser operation. -// pageNum := 0 -// err := client.ListGroupsForUserPages(params, -// func(page *iam.ListGroupsForUserOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListGroupsForUserPages(input *ListGroupsForUserInput, fn func(*ListGroupsForUserOutput, bool) bool) error { - return c.ListGroupsForUserPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGroupsForUserPagesWithContext same as ListGroupsForUserPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListGroupsForUserPagesWithContext(ctx aws.Context, input *ListGroupsForUserInput, fn func(*ListGroupsForUserOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGroupsForUserInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGroupsForUserRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListGroupsForUserOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListInstanceProfileTags = "ListInstanceProfileTags" - -// ListInstanceProfileTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceProfileTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInstanceProfileTags for more information on using the ListInstanceProfileTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListInstanceProfileTagsRequest method. -// req, resp := client.ListInstanceProfileTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfileTags -func (c *IAM) ListInstanceProfileTagsRequest(input *ListInstanceProfileTagsInput) (req *request.Request, output *ListInstanceProfileTagsOutput) { - op := &request.Operation{ - Name: opListInstanceProfileTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListInstanceProfileTagsInput{} - } - - output = &ListInstanceProfileTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceProfileTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM instance profile. The -// returned list of tags is sorted by tag key. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListInstanceProfileTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfileTags -func (c *IAM) ListInstanceProfileTags(input *ListInstanceProfileTagsInput) (*ListInstanceProfileTagsOutput, error) { - req, out := c.ListInstanceProfileTagsRequest(input) - return out, req.Send() -} - -// ListInstanceProfileTagsWithContext is the same as ListInstanceProfileTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceProfileTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListInstanceProfileTagsWithContext(ctx aws.Context, input *ListInstanceProfileTagsInput, opts ...request.Option) (*ListInstanceProfileTagsOutput, error) { - req, out := c.ListInstanceProfileTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstanceProfileTagsPages iterates over the pages of a ListInstanceProfileTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstanceProfileTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListInstanceProfileTags operation. -// pageNum := 0 -// err := client.ListInstanceProfileTagsPages(params, -// func(page *iam.ListInstanceProfileTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListInstanceProfileTagsPages(input *ListInstanceProfileTagsInput, fn func(*ListInstanceProfileTagsOutput, bool) bool) error { - return c.ListInstanceProfileTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstanceProfileTagsPagesWithContext same as ListInstanceProfileTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListInstanceProfileTagsPagesWithContext(ctx aws.Context, input *ListInstanceProfileTagsInput, fn func(*ListInstanceProfileTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstanceProfileTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstanceProfileTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListInstanceProfileTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListInstanceProfiles = "ListInstanceProfiles" - -// ListInstanceProfilesRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceProfiles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInstanceProfiles for more information on using the ListInstanceProfiles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListInstanceProfilesRequest method. -// req, resp := client.ListInstanceProfilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfiles -func (c *IAM) ListInstanceProfilesRequest(input *ListInstanceProfilesInput) (req *request.Request, output *ListInstanceProfilesOutput) { - op := &request.Operation{ - Name: opListInstanceProfiles, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListInstanceProfilesInput{} - } - - output = &ListInstanceProfilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceProfiles API operation for AWS Identity and Access Management. -// -// Lists the instance profiles that have the specified path prefix. If there -// are none, the operation returns an empty list. For more information about -// instance profiles, see Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view all of the information -// for an instance profile, see GetInstanceProfile. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListInstanceProfiles for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfiles -func (c *IAM) ListInstanceProfiles(input *ListInstanceProfilesInput) (*ListInstanceProfilesOutput, error) { - req, out := c.ListInstanceProfilesRequest(input) - return out, req.Send() -} - -// ListInstanceProfilesWithContext is the same as ListInstanceProfiles with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceProfiles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListInstanceProfilesWithContext(ctx aws.Context, input *ListInstanceProfilesInput, opts ...request.Option) (*ListInstanceProfilesOutput, error) { - req, out := c.ListInstanceProfilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstanceProfilesPages iterates over the pages of a ListInstanceProfiles operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstanceProfiles method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListInstanceProfiles operation. -// pageNum := 0 -// err := client.ListInstanceProfilesPages(params, -// func(page *iam.ListInstanceProfilesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListInstanceProfilesPages(input *ListInstanceProfilesInput, fn func(*ListInstanceProfilesOutput, bool) bool) error { - return c.ListInstanceProfilesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstanceProfilesPagesWithContext same as ListInstanceProfilesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListInstanceProfilesPagesWithContext(ctx aws.Context, input *ListInstanceProfilesInput, fn func(*ListInstanceProfilesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstanceProfilesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstanceProfilesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListInstanceProfilesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListInstanceProfilesForRole = "ListInstanceProfilesForRole" - -// ListInstanceProfilesForRoleRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceProfilesForRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListInstanceProfilesForRole for more information on using the ListInstanceProfilesForRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListInstanceProfilesForRoleRequest method. -// req, resp := client.ListInstanceProfilesForRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfilesForRole -func (c *IAM) ListInstanceProfilesForRoleRequest(input *ListInstanceProfilesForRoleInput) (req *request.Request, output *ListInstanceProfilesForRoleOutput) { - op := &request.Operation{ - Name: opListInstanceProfilesForRole, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListInstanceProfilesForRoleInput{} - } - - output = &ListInstanceProfilesForRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceProfilesForRole API operation for AWS Identity and Access Management. -// -// Lists the instance profiles that have the specified associated IAM role. -// If there are none, the operation returns an empty list. For more information -// about instance profiles, go to Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListInstanceProfilesForRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfilesForRole -func (c *IAM) ListInstanceProfilesForRole(input *ListInstanceProfilesForRoleInput) (*ListInstanceProfilesForRoleOutput, error) { - req, out := c.ListInstanceProfilesForRoleRequest(input) - return out, req.Send() -} - -// ListInstanceProfilesForRoleWithContext is the same as ListInstanceProfilesForRole with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceProfilesForRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListInstanceProfilesForRoleWithContext(ctx aws.Context, input *ListInstanceProfilesForRoleInput, opts ...request.Option) (*ListInstanceProfilesForRoleOutput, error) { - req, out := c.ListInstanceProfilesForRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstanceProfilesForRolePages iterates over the pages of a ListInstanceProfilesForRole operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstanceProfilesForRole method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListInstanceProfilesForRole operation. -// pageNum := 0 -// err := client.ListInstanceProfilesForRolePages(params, -// func(page *iam.ListInstanceProfilesForRoleOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListInstanceProfilesForRolePages(input *ListInstanceProfilesForRoleInput, fn func(*ListInstanceProfilesForRoleOutput, bool) bool) error { - return c.ListInstanceProfilesForRolePagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstanceProfilesForRolePagesWithContext same as ListInstanceProfilesForRolePages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListInstanceProfilesForRolePagesWithContext(ctx aws.Context, input *ListInstanceProfilesForRoleInput, fn func(*ListInstanceProfilesForRoleOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstanceProfilesForRoleInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstanceProfilesForRoleRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListInstanceProfilesForRoleOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListMFADeviceTags = "ListMFADeviceTags" - -// ListMFADeviceTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListMFADeviceTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMFADeviceTags for more information on using the ListMFADeviceTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListMFADeviceTagsRequest method. -// req, resp := client.ListMFADeviceTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADeviceTags -func (c *IAM) ListMFADeviceTagsRequest(input *ListMFADeviceTagsInput) (req *request.Request, output *ListMFADeviceTagsOutput) { - op := &request.Operation{ - Name: opListMFADeviceTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListMFADeviceTagsInput{} - } - - output = &ListMFADeviceTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMFADeviceTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM virtual multi-factor -// authentication (MFA) device. The returned list of tags is sorted by tag key. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListMFADeviceTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADeviceTags -func (c *IAM) ListMFADeviceTags(input *ListMFADeviceTagsInput) (*ListMFADeviceTagsOutput, error) { - req, out := c.ListMFADeviceTagsRequest(input) - return out, req.Send() -} - -// ListMFADeviceTagsWithContext is the same as ListMFADeviceTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListMFADeviceTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListMFADeviceTagsWithContext(ctx aws.Context, input *ListMFADeviceTagsInput, opts ...request.Option) (*ListMFADeviceTagsOutput, error) { - req, out := c.ListMFADeviceTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMFADeviceTagsPages iterates over the pages of a ListMFADeviceTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMFADeviceTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListMFADeviceTags operation. -// pageNum := 0 -// err := client.ListMFADeviceTagsPages(params, -// func(page *iam.ListMFADeviceTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListMFADeviceTagsPages(input *ListMFADeviceTagsInput, fn func(*ListMFADeviceTagsOutput, bool) bool) error { - return c.ListMFADeviceTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMFADeviceTagsPagesWithContext same as ListMFADeviceTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListMFADeviceTagsPagesWithContext(ctx aws.Context, input *ListMFADeviceTagsInput, fn func(*ListMFADeviceTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMFADeviceTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMFADeviceTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListMFADeviceTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListMFADevices = "ListMFADevices" - -// ListMFADevicesRequest generates a "aws/request.Request" representing the -// client's request for the ListMFADevices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMFADevices for more information on using the ListMFADevices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListMFADevicesRequest method. -// req, resp := client.ListMFADevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADevices -func (c *IAM) ListMFADevicesRequest(input *ListMFADevicesInput) (req *request.Request, output *ListMFADevicesOutput) { - op := &request.Operation{ - Name: opListMFADevices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListMFADevicesInput{} - } - - output = &ListMFADevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMFADevices API operation for AWS Identity and Access Management. -// -// Lists the MFA devices for an IAM user. If the request includes a IAM user -// name, then this operation lists all the MFA devices associated with the specified -// user. If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID signing the request for this -// operation. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListMFADevices for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADevices -func (c *IAM) ListMFADevices(input *ListMFADevicesInput) (*ListMFADevicesOutput, error) { - req, out := c.ListMFADevicesRequest(input) - return out, req.Send() -} - -// ListMFADevicesWithContext is the same as ListMFADevices with the addition of -// the ability to pass a context and additional request options. -// -// See ListMFADevices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListMFADevicesWithContext(ctx aws.Context, input *ListMFADevicesInput, opts ...request.Option) (*ListMFADevicesOutput, error) { - req, out := c.ListMFADevicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMFADevicesPages iterates over the pages of a ListMFADevices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMFADevices method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListMFADevices operation. -// pageNum := 0 -// err := client.ListMFADevicesPages(params, -// func(page *iam.ListMFADevicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListMFADevicesPages(input *ListMFADevicesInput, fn func(*ListMFADevicesOutput, bool) bool) error { - return c.ListMFADevicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMFADevicesPagesWithContext same as ListMFADevicesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListMFADevicesPagesWithContext(ctx aws.Context, input *ListMFADevicesInput, fn func(*ListMFADevicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMFADevicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMFADevicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListMFADevicesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListOpenIDConnectProviderTags = "ListOpenIDConnectProviderTags" - -// ListOpenIDConnectProviderTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListOpenIDConnectProviderTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOpenIDConnectProviderTags for more information on using the ListOpenIDConnectProviderTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListOpenIDConnectProviderTagsRequest method. -// req, resp := client.ListOpenIDConnectProviderTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviderTags -func (c *IAM) ListOpenIDConnectProviderTagsRequest(input *ListOpenIDConnectProviderTagsInput) (req *request.Request, output *ListOpenIDConnectProviderTagsOutput) { - op := &request.Operation{ - Name: opListOpenIDConnectProviderTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListOpenIDConnectProviderTagsInput{} - } - - output = &ListOpenIDConnectProviderTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOpenIDConnectProviderTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified OpenID Connect (OIDC)-compatible -// identity provider. The returned list of tags is sorted by tag key. For more -// information, see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html). -// -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListOpenIDConnectProviderTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviderTags -func (c *IAM) ListOpenIDConnectProviderTags(input *ListOpenIDConnectProviderTagsInput) (*ListOpenIDConnectProviderTagsOutput, error) { - req, out := c.ListOpenIDConnectProviderTagsRequest(input) - return out, req.Send() -} - -// ListOpenIDConnectProviderTagsWithContext is the same as ListOpenIDConnectProviderTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListOpenIDConnectProviderTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListOpenIDConnectProviderTagsWithContext(ctx aws.Context, input *ListOpenIDConnectProviderTagsInput, opts ...request.Option) (*ListOpenIDConnectProviderTagsOutput, error) { - req, out := c.ListOpenIDConnectProviderTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOpenIDConnectProviderTagsPages iterates over the pages of a ListOpenIDConnectProviderTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOpenIDConnectProviderTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListOpenIDConnectProviderTags operation. -// pageNum := 0 -// err := client.ListOpenIDConnectProviderTagsPages(params, -// func(page *iam.ListOpenIDConnectProviderTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListOpenIDConnectProviderTagsPages(input *ListOpenIDConnectProviderTagsInput, fn func(*ListOpenIDConnectProviderTagsOutput, bool) bool) error { - return c.ListOpenIDConnectProviderTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOpenIDConnectProviderTagsPagesWithContext same as ListOpenIDConnectProviderTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListOpenIDConnectProviderTagsPagesWithContext(ctx aws.Context, input *ListOpenIDConnectProviderTagsInput, fn func(*ListOpenIDConnectProviderTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOpenIDConnectProviderTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOpenIDConnectProviderTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListOpenIDConnectProviderTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListOpenIDConnectProviders = "ListOpenIDConnectProviders" - -// ListOpenIDConnectProvidersRequest generates a "aws/request.Request" representing the -// client's request for the ListOpenIDConnectProviders operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListOpenIDConnectProviders for more information on using the ListOpenIDConnectProviders -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListOpenIDConnectProvidersRequest method. -// req, resp := client.ListOpenIDConnectProvidersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviders -func (c *IAM) ListOpenIDConnectProvidersRequest(input *ListOpenIDConnectProvidersInput) (req *request.Request, output *ListOpenIDConnectProvidersOutput) { - op := &request.Operation{ - Name: opListOpenIDConnectProviders, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListOpenIDConnectProvidersInput{} - } - - output = &ListOpenIDConnectProvidersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOpenIDConnectProviders API operation for AWS Identity and Access Management. -// -// Lists information about the IAM OpenID Connect (OIDC) provider resource objects -// defined in the Amazon Web Services account. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view all of the information -// for an OIDC provider, see GetOpenIDConnectProvider. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListOpenIDConnectProviders for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviders -func (c *IAM) ListOpenIDConnectProviders(input *ListOpenIDConnectProvidersInput) (*ListOpenIDConnectProvidersOutput, error) { - req, out := c.ListOpenIDConnectProvidersRequest(input) - return out, req.Send() -} - -// ListOpenIDConnectProvidersWithContext is the same as ListOpenIDConnectProviders with the addition of -// the ability to pass a context and additional request options. -// -// See ListOpenIDConnectProviders for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListOpenIDConnectProvidersWithContext(ctx aws.Context, input *ListOpenIDConnectProvidersInput, opts ...request.Option) (*ListOpenIDConnectProvidersOutput, error) { - req, out := c.ListOpenIDConnectProvidersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPolicies = "ListPolicies" - -// ListPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPolicies for more information on using the ListPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListPoliciesRequest method. -// req, resp := client.ListPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicies -func (c *IAM) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) { - op := &request.Operation{ - Name: opListPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListPoliciesInput{} - } - - output = &ListPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicies API operation for AWS Identity and Access Management. -// -// Lists all the managed policies that are available in your Amazon Web Services -// account, including your own customer-defined managed policies and all Amazon -// Web Services managed policies. -// -// You can filter the list of policies that is returned using the optional OnlyAttached, -// Scope, and PathPrefix parameters. For example, to list only the customer -// managed policies in your Amazon Web Services account, set Scope to Local. -// To list only Amazon Web Services managed policies, set Scope to AWS. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// For more information about managed policies, see Managed policies and inline -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view all of the information -// for a customer manged policy, see GetPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListPolicies for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicies -func (c *IAM) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - return out, req.Send() -} - -// ListPoliciesWithContext is the same as ListPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPoliciesPages iterates over the pages of a ListPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPolicies method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListPolicies operation. -// pageNum := 0 -// err := client.ListPoliciesPages(params, -// func(page *iam.ListPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListPoliciesPages(input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool) error { - return c.ListPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPoliciesPagesWithContext same as ListPoliciesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListPoliciesGrantingServiceAccess = "ListPoliciesGrantingServiceAccess" - -// ListPoliciesGrantingServiceAccessRequest generates a "aws/request.Request" representing the -// client's request for the ListPoliciesGrantingServiceAccess operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPoliciesGrantingServiceAccess for more information on using the ListPoliciesGrantingServiceAccess -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListPoliciesGrantingServiceAccessRequest method. -// req, resp := client.ListPoliciesGrantingServiceAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPoliciesGrantingServiceAccess -func (c *IAM) ListPoliciesGrantingServiceAccessRequest(input *ListPoliciesGrantingServiceAccessInput) (req *request.Request, output *ListPoliciesGrantingServiceAccessOutput) { - op := &request.Operation{ - Name: opListPoliciesGrantingServiceAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPoliciesGrantingServiceAccessInput{} - } - - output = &ListPoliciesGrantingServiceAccessOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPoliciesGrantingServiceAccess API operation for AWS Identity and Access Management. -// -// Retrieves a list of policies that the IAM identity (user, group, or role) -// can use to access each specified service. -// -// This operation does not use other policy types when determining whether a -// resource could access a service. These other policy types include resource-based -// policies, access control lists, Organizations policies, IAM permissions boundaries, -// and STS assume role policies. It only applies permissions policy logic. For -// more about the evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. -// -// The list of policies returned by the operation depends on the ARN of the -// identity that you provide. -// -// - User – The list of policies includes the managed and inline policies -// that are attached to the user directly. The list also includes any additional -// managed and inline policies that are attached to the group to which the -// user belongs. -// -// - Group – The list of policies includes only the managed and inline -// policies that are attached to the group directly. Policies that are attached -// to the group’s user are not included. -// -// - Role – The list of policies includes only the managed and inline policies -// that are attached to the role. -// -// For each managed policy, this operation returns the ARN and policy name. -// For each inline policy, it returns the policy name and the entity to which -// it is attached. Inline policies do not have an ARN. For more information -// about these policy types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) -// in the IAM User Guide. -// -// Policies that are attached to users and roles as permissions boundaries are -// not returned. To view which managed policy is currently used to set the permissions -// boundary for a user or role, use the GetUser or GetRole operations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListPoliciesGrantingServiceAccess for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPoliciesGrantingServiceAccess -func (c *IAM) ListPoliciesGrantingServiceAccess(input *ListPoliciesGrantingServiceAccessInput) (*ListPoliciesGrantingServiceAccessOutput, error) { - req, out := c.ListPoliciesGrantingServiceAccessRequest(input) - return out, req.Send() -} - -// ListPoliciesGrantingServiceAccessWithContext is the same as ListPoliciesGrantingServiceAccess with the addition of -// the ability to pass a context and additional request options. -// -// See ListPoliciesGrantingServiceAccess for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListPoliciesGrantingServiceAccessWithContext(ctx aws.Context, input *ListPoliciesGrantingServiceAccessInput, opts ...request.Option) (*ListPoliciesGrantingServiceAccessOutput, error) { - req, out := c.ListPoliciesGrantingServiceAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPolicyTags = "ListPolicyTags" - -// ListPolicyTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicyTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPolicyTags for more information on using the ListPolicyTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListPolicyTagsRequest method. -// req, resp := client.ListPolicyTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyTags -func (c *IAM) ListPolicyTagsRequest(input *ListPolicyTagsInput) (req *request.Request, output *ListPolicyTagsOutput) { - op := &request.Operation{ - Name: opListPolicyTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListPolicyTagsInput{} - } - - output = &ListPolicyTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicyTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM customer managed policy. -// The returned list of tags is sorted by tag key. For more information about -// tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListPolicyTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyTags -func (c *IAM) ListPolicyTags(input *ListPolicyTagsInput) (*ListPolicyTagsOutput, error) { - req, out := c.ListPolicyTagsRequest(input) - return out, req.Send() -} - -// ListPolicyTagsWithContext is the same as ListPolicyTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicyTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListPolicyTagsWithContext(ctx aws.Context, input *ListPolicyTagsInput, opts ...request.Option) (*ListPolicyTagsOutput, error) { - req, out := c.ListPolicyTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPolicyTagsPages iterates over the pages of a ListPolicyTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPolicyTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListPolicyTags operation. -// pageNum := 0 -// err := client.ListPolicyTagsPages(params, -// func(page *iam.ListPolicyTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListPolicyTagsPages(input *ListPolicyTagsInput, fn func(*ListPolicyTagsOutput, bool) bool) error { - return c.ListPolicyTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPolicyTagsPagesWithContext same as ListPolicyTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListPolicyTagsPagesWithContext(ctx aws.Context, input *ListPolicyTagsInput, fn func(*ListPolicyTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPolicyTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPolicyTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListPolicyTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListPolicyVersions = "ListPolicyVersions" - -// ListPolicyVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicyVersions operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListPolicyVersions for more information on using the ListPolicyVersions -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListPolicyVersionsRequest method. -// req, resp := client.ListPolicyVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions -func (c *IAM) ListPolicyVersionsRequest(input *ListPolicyVersionsInput) (req *request.Request, output *ListPolicyVersionsOutput) { - op := &request.Operation{ - Name: opListPolicyVersions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListPolicyVersionsInput{} - } - - output = &ListPolicyVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicyVersions API operation for AWS Identity and Access Management. -// -// Lists information about the versions of the specified managed policy, including -// the version that is currently set as the policy's default version. -// -// For more information about managed policies, see Managed policies and inline -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListPolicyVersions for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions -func (c *IAM) ListPolicyVersions(input *ListPolicyVersionsInput) (*ListPolicyVersionsOutput, error) { - req, out := c.ListPolicyVersionsRequest(input) - return out, req.Send() -} - -// ListPolicyVersionsWithContext is the same as ListPolicyVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicyVersions for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListPolicyVersionsWithContext(ctx aws.Context, input *ListPolicyVersionsInput, opts ...request.Option) (*ListPolicyVersionsOutput, error) { - req, out := c.ListPolicyVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPolicyVersionsPages iterates over the pages of a ListPolicyVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPolicyVersions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListPolicyVersions operation. -// pageNum := 0 -// err := client.ListPolicyVersionsPages(params, -// func(page *iam.ListPolicyVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListPolicyVersionsPages(input *ListPolicyVersionsInput, fn func(*ListPolicyVersionsOutput, bool) bool) error { - return c.ListPolicyVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPolicyVersionsPagesWithContext same as ListPolicyVersionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListPolicyVersionsPagesWithContext(ctx aws.Context, input *ListPolicyVersionsInput, fn func(*ListPolicyVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPolicyVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPolicyVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListPolicyVersionsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListRolePolicies = "ListRolePolicies" - -// ListRolePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListRolePolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRolePolicies for more information on using the ListRolePolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListRolePoliciesRequest method. -// req, resp := client.ListRolePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRolePolicies -func (c *IAM) ListRolePoliciesRequest(input *ListRolePoliciesInput) (req *request.Request, output *ListRolePoliciesOutput) { - op := &request.Operation{ - Name: opListRolePolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListRolePoliciesInput{} - } - - output = &ListRolePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRolePolicies API operation for AWS Identity and Access Management. -// -// Lists the names of the inline policies that are embedded in the specified -// IAM role. -// -// An IAM role can also have managed policies attached to it. To list the managed -// policies that are attached to a role, use ListAttachedRolePolicies. For more -// information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. If -// there are no inline policies embedded with the specified role, the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListRolePolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRolePolicies -func (c *IAM) ListRolePolicies(input *ListRolePoliciesInput) (*ListRolePoliciesOutput, error) { - req, out := c.ListRolePoliciesRequest(input) - return out, req.Send() -} - -// ListRolePoliciesWithContext is the same as ListRolePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListRolePolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListRolePoliciesWithContext(ctx aws.Context, input *ListRolePoliciesInput, opts ...request.Option) (*ListRolePoliciesOutput, error) { - req, out := c.ListRolePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRolePoliciesPages iterates over the pages of a ListRolePolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRolePolicies method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListRolePolicies operation. -// pageNum := 0 -// err := client.ListRolePoliciesPages(params, -// func(page *iam.ListRolePoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListRolePoliciesPages(input *ListRolePoliciesInput, fn func(*ListRolePoliciesOutput, bool) bool) error { - return c.ListRolePoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRolePoliciesPagesWithContext same as ListRolePoliciesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListRolePoliciesPagesWithContext(ctx aws.Context, input *ListRolePoliciesInput, fn func(*ListRolePoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRolePoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRolePoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListRolePoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListRoleTags = "ListRoleTags" - -// ListRoleTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListRoleTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRoleTags for more information on using the ListRoleTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListRoleTagsRequest method. -// req, resp := client.ListRoleTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoleTags -func (c *IAM) ListRoleTagsRequest(input *ListRoleTagsInput) (req *request.Request, output *ListRoleTagsOutput) { - op := &request.Operation{ - Name: opListRoleTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListRoleTagsInput{} - } - - output = &ListRoleTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRoleTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified role. The returned list -// of tags is sorted by tag key. For more information about tagging, see Tagging -// IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListRoleTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoleTags -func (c *IAM) ListRoleTags(input *ListRoleTagsInput) (*ListRoleTagsOutput, error) { - req, out := c.ListRoleTagsRequest(input) - return out, req.Send() -} - -// ListRoleTagsWithContext is the same as ListRoleTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListRoleTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListRoleTagsWithContext(ctx aws.Context, input *ListRoleTagsInput, opts ...request.Option) (*ListRoleTagsOutput, error) { - req, out := c.ListRoleTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRoleTagsPages iterates over the pages of a ListRoleTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRoleTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListRoleTags operation. -// pageNum := 0 -// err := client.ListRoleTagsPages(params, -// func(page *iam.ListRoleTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListRoleTagsPages(input *ListRoleTagsInput, fn func(*ListRoleTagsOutput, bool) bool) error { - return c.ListRoleTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRoleTagsPagesWithContext same as ListRoleTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListRoleTagsPagesWithContext(ctx aws.Context, input *ListRoleTagsInput, fn func(*ListRoleTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRoleTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRoleTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListRoleTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListRoles = "ListRoles" - -// ListRolesRequest generates a "aws/request.Request" representing the -// client's request for the ListRoles operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListRoles for more information on using the ListRoles -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListRolesRequest method. -// req, resp := client.ListRolesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoles -func (c *IAM) ListRolesRequest(input *ListRolesInput) (req *request.Request, output *ListRolesOutput) { - op := &request.Operation{ - Name: opListRoles, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListRolesInput{} - } - - output = &ListRolesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRoles API operation for AWS Identity and Access Management. -// -// Lists the IAM roles that have the specified path prefix. If there are none, -// the operation returns an empty list. For more information about roles, see -// IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. This operation does not return the following attributes, -// even though they are an attribute of the returned object: -// -// - PermissionsBoundary -// -// - RoleLastUsed -// -// - Tags -// -// To view all of the information for a role, see GetRole. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListRoles for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoles -func (c *IAM) ListRoles(input *ListRolesInput) (*ListRolesOutput, error) { - req, out := c.ListRolesRequest(input) - return out, req.Send() -} - -// ListRolesWithContext is the same as ListRoles with the addition of -// the ability to pass a context and additional request options. -// -// See ListRoles for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListRolesWithContext(ctx aws.Context, input *ListRolesInput, opts ...request.Option) (*ListRolesOutput, error) { - req, out := c.ListRolesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRolesPages iterates over the pages of a ListRoles operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRoles method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListRoles operation. -// pageNum := 0 -// err := client.ListRolesPages(params, -// func(page *iam.ListRolesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListRolesPages(input *ListRolesInput, fn func(*ListRolesOutput, bool) bool) error { - return c.ListRolesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRolesPagesWithContext same as ListRolesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListRolesPagesWithContext(ctx aws.Context, input *ListRolesInput, fn func(*ListRolesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRolesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRolesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListRolesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListSAMLProviderTags = "ListSAMLProviderTags" - -// ListSAMLProviderTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListSAMLProviderTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSAMLProviderTags for more information on using the ListSAMLProviderTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListSAMLProviderTagsRequest method. -// req, resp := client.ListSAMLProviderTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviderTags -func (c *IAM) ListSAMLProviderTagsRequest(input *ListSAMLProviderTagsInput) (req *request.Request, output *ListSAMLProviderTagsOutput) { - op := &request.Operation{ - Name: opListSAMLProviderTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListSAMLProviderTagsInput{} - } - - output = &ListSAMLProviderTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSAMLProviderTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified Security Assertion Markup -// Language (SAML) identity provider. The returned list of tags is sorted by -// tag key. For more information, see About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html). -// -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListSAMLProviderTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviderTags -func (c *IAM) ListSAMLProviderTags(input *ListSAMLProviderTagsInput) (*ListSAMLProviderTagsOutput, error) { - req, out := c.ListSAMLProviderTagsRequest(input) - return out, req.Send() -} - -// ListSAMLProviderTagsWithContext is the same as ListSAMLProviderTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListSAMLProviderTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListSAMLProviderTagsWithContext(ctx aws.Context, input *ListSAMLProviderTagsInput, opts ...request.Option) (*ListSAMLProviderTagsOutput, error) { - req, out := c.ListSAMLProviderTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSAMLProviderTagsPages iterates over the pages of a ListSAMLProviderTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSAMLProviderTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListSAMLProviderTags operation. -// pageNum := 0 -// err := client.ListSAMLProviderTagsPages(params, -// func(page *iam.ListSAMLProviderTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListSAMLProviderTagsPages(input *ListSAMLProviderTagsInput, fn func(*ListSAMLProviderTagsOutput, bool) bool) error { - return c.ListSAMLProviderTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSAMLProviderTagsPagesWithContext same as ListSAMLProviderTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListSAMLProviderTagsPagesWithContext(ctx aws.Context, input *ListSAMLProviderTagsInput, fn func(*ListSAMLProviderTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSAMLProviderTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSAMLProviderTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListSAMLProviderTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListSAMLProviders = "ListSAMLProviders" - -// ListSAMLProvidersRequest generates a "aws/request.Request" representing the -// client's request for the ListSAMLProviders operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSAMLProviders for more information on using the ListSAMLProviders -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListSAMLProvidersRequest method. -// req, resp := client.ListSAMLProvidersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviders -func (c *IAM) ListSAMLProvidersRequest(input *ListSAMLProvidersInput) (req *request.Request, output *ListSAMLProvidersOutput) { - op := &request.Operation{ - Name: opListSAMLProviders, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListSAMLProvidersInput{} - } - - output = &ListSAMLProvidersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSAMLProviders API operation for AWS Identity and Access Management. -// -// Lists the SAML provider resource objects defined in IAM in the account. IAM -// resource-listing operations return a subset of the available attributes for -// the resource. For example, this operation does not return tags, even though -// they are an attribute of the returned object. To view all of the information -// for a SAML provider, see GetSAMLProvider. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListSAMLProviders for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviders -func (c *IAM) ListSAMLProviders(input *ListSAMLProvidersInput) (*ListSAMLProvidersOutput, error) { - req, out := c.ListSAMLProvidersRequest(input) - return out, req.Send() -} - -// ListSAMLProvidersWithContext is the same as ListSAMLProviders with the addition of -// the ability to pass a context and additional request options. -// -// See ListSAMLProviders for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListSAMLProvidersWithContext(ctx aws.Context, input *ListSAMLProvidersInput, opts ...request.Option) (*ListSAMLProvidersOutput, error) { - req, out := c.ListSAMLProvidersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSSHPublicKeys = "ListSSHPublicKeys" - -// ListSSHPublicKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListSSHPublicKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSSHPublicKeys for more information on using the ListSSHPublicKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListSSHPublicKeysRequest method. -// req, resp := client.ListSSHPublicKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSSHPublicKeys -func (c *IAM) ListSSHPublicKeysRequest(input *ListSSHPublicKeysInput) (req *request.Request, output *ListSSHPublicKeysOutput) { - op := &request.Operation{ - Name: opListSSHPublicKeys, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListSSHPublicKeysInput{} - } - - output = &ListSSHPublicKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSSHPublicKeys API operation for AWS Identity and Access Management. -// -// Returns information about the SSH public keys associated with the specified -// IAM user. If none exists, the operation returns an empty list. -// -// The SSH public keys returned by this operation are used only for authenticating -// the IAM user to an CodeCommit repository. For more information about using -// SSH keys to authenticate to an CodeCommit repository, see Set up CodeCommit -// for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. -// -// Although each user is limited to a small number of keys, you can still paginate -// the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListSSHPublicKeys for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSSHPublicKeys -func (c *IAM) ListSSHPublicKeys(input *ListSSHPublicKeysInput) (*ListSSHPublicKeysOutput, error) { - req, out := c.ListSSHPublicKeysRequest(input) - return out, req.Send() -} - -// ListSSHPublicKeysWithContext is the same as ListSSHPublicKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListSSHPublicKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListSSHPublicKeysWithContext(ctx aws.Context, input *ListSSHPublicKeysInput, opts ...request.Option) (*ListSSHPublicKeysOutput, error) { - req, out := c.ListSSHPublicKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSSHPublicKeysPages iterates over the pages of a ListSSHPublicKeys operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSSHPublicKeys method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListSSHPublicKeys operation. -// pageNum := 0 -// err := client.ListSSHPublicKeysPages(params, -// func(page *iam.ListSSHPublicKeysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListSSHPublicKeysPages(input *ListSSHPublicKeysInput, fn func(*ListSSHPublicKeysOutput, bool) bool) error { - return c.ListSSHPublicKeysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSSHPublicKeysPagesWithContext same as ListSSHPublicKeysPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListSSHPublicKeysPagesWithContext(ctx aws.Context, input *ListSSHPublicKeysInput, fn func(*ListSSHPublicKeysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSSHPublicKeysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSSHPublicKeysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListSSHPublicKeysOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListServerCertificateTags = "ListServerCertificateTags" - -// ListServerCertificateTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListServerCertificateTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListServerCertificateTags for more information on using the ListServerCertificateTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListServerCertificateTagsRequest method. -// req, resp := client.ListServerCertificateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificateTags -func (c *IAM) ListServerCertificateTagsRequest(input *ListServerCertificateTagsInput) (req *request.Request, output *ListServerCertificateTagsOutput) { - op := &request.Operation{ - Name: opListServerCertificateTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListServerCertificateTagsInput{} - } - - output = &ListServerCertificateTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServerCertificateTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM server certificate. -// The returned list of tags is sorted by tag key. For more information about -// tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// For certificates in a Region supported by Certificate Manager (ACM), we recommend -// that you don't use IAM server certificates. Instead, use ACM to provision, -// manage, and deploy your server certificates. For more information about IAM -// server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListServerCertificateTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificateTags -func (c *IAM) ListServerCertificateTags(input *ListServerCertificateTagsInput) (*ListServerCertificateTagsOutput, error) { - req, out := c.ListServerCertificateTagsRequest(input) - return out, req.Send() -} - -// ListServerCertificateTagsWithContext is the same as ListServerCertificateTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListServerCertificateTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListServerCertificateTagsWithContext(ctx aws.Context, input *ListServerCertificateTagsInput, opts ...request.Option) (*ListServerCertificateTagsOutput, error) { - req, out := c.ListServerCertificateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListServerCertificateTagsPages iterates over the pages of a ListServerCertificateTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListServerCertificateTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListServerCertificateTags operation. -// pageNum := 0 -// err := client.ListServerCertificateTagsPages(params, -// func(page *iam.ListServerCertificateTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListServerCertificateTagsPages(input *ListServerCertificateTagsInput, fn func(*ListServerCertificateTagsOutput, bool) bool) error { - return c.ListServerCertificateTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListServerCertificateTagsPagesWithContext same as ListServerCertificateTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListServerCertificateTagsPagesWithContext(ctx aws.Context, input *ListServerCertificateTagsInput, fn func(*ListServerCertificateTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListServerCertificateTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListServerCertificateTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListServerCertificateTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListServerCertificates = "ListServerCertificates" - -// ListServerCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the ListServerCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListServerCertificates for more information on using the ListServerCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListServerCertificatesRequest method. -// req, resp := client.ListServerCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificates -func (c *IAM) ListServerCertificatesRequest(input *ListServerCertificatesInput) (req *request.Request, output *ListServerCertificatesOutput) { - op := &request.Operation{ - Name: opListServerCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListServerCertificatesInput{} - } - - output = &ListServerCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServerCertificates API operation for AWS Identity and Access Management. -// -// Lists the server certificates stored in IAM that have the specified path -// prefix. If none exist, the operation returns an empty list. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view all of the information -// for a servercertificate, see GetServerCertificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListServerCertificates for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificates -func (c *IAM) ListServerCertificates(input *ListServerCertificatesInput) (*ListServerCertificatesOutput, error) { - req, out := c.ListServerCertificatesRequest(input) - return out, req.Send() -} - -// ListServerCertificatesWithContext is the same as ListServerCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See ListServerCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListServerCertificatesWithContext(ctx aws.Context, input *ListServerCertificatesInput, opts ...request.Option) (*ListServerCertificatesOutput, error) { - req, out := c.ListServerCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListServerCertificatesPages iterates over the pages of a ListServerCertificates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListServerCertificates method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListServerCertificates operation. -// pageNum := 0 -// err := client.ListServerCertificatesPages(params, -// func(page *iam.ListServerCertificatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListServerCertificatesPages(input *ListServerCertificatesInput, fn func(*ListServerCertificatesOutput, bool) bool) error { - return c.ListServerCertificatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListServerCertificatesPagesWithContext same as ListServerCertificatesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListServerCertificatesPagesWithContext(ctx aws.Context, input *ListServerCertificatesInput, fn func(*ListServerCertificatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListServerCertificatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListServerCertificatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListServerCertificatesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListServiceSpecificCredentials = "ListServiceSpecificCredentials" - -// ListServiceSpecificCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the ListServiceSpecificCredentials operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListServiceSpecificCredentials for more information on using the ListServiceSpecificCredentials -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListServiceSpecificCredentialsRequest method. -// req, resp := client.ListServiceSpecificCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServiceSpecificCredentials -func (c *IAM) ListServiceSpecificCredentialsRequest(input *ListServiceSpecificCredentialsInput) (req *request.Request, output *ListServiceSpecificCredentialsOutput) { - op := &request.Operation{ - Name: opListServiceSpecificCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListServiceSpecificCredentialsInput{} - } - - output = &ListServiceSpecificCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServiceSpecificCredentials API operation for AWS Identity and Access Management. -// -// Returns information about the service-specific credentials associated with -// the specified IAM user. If none exists, the operation returns an empty list. -// The service-specific credentials returned by this operation are used only -// for authenticating the IAM user to a specific service. For more information -// about using service-specific credentials to authenticate to an Amazon Web -// Services service, see Set up service-specific credentials (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html) -// in the CodeCommit User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListServiceSpecificCredentials for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceNotSupportedException "NotSupportedService" -// The specified service does not support service-specific credentials. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServiceSpecificCredentials -func (c *IAM) ListServiceSpecificCredentials(input *ListServiceSpecificCredentialsInput) (*ListServiceSpecificCredentialsOutput, error) { - req, out := c.ListServiceSpecificCredentialsRequest(input) - return out, req.Send() -} - -// ListServiceSpecificCredentialsWithContext is the same as ListServiceSpecificCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See ListServiceSpecificCredentials for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListServiceSpecificCredentialsWithContext(ctx aws.Context, input *ListServiceSpecificCredentialsInput, opts ...request.Option) (*ListServiceSpecificCredentialsOutput, error) { - req, out := c.ListServiceSpecificCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSigningCertificates = "ListSigningCertificates" - -// ListSigningCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the ListSigningCertificates operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListSigningCertificates for more information on using the ListSigningCertificates -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListSigningCertificatesRequest method. -// req, resp := client.ListSigningCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSigningCertificates -func (c *IAM) ListSigningCertificatesRequest(input *ListSigningCertificatesInput) (req *request.Request, output *ListSigningCertificatesOutput) { - op := &request.Operation{ - Name: opListSigningCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListSigningCertificatesInput{} - } - - output = &ListSigningCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSigningCertificates API operation for AWS Identity and Access Management. -// -// Returns information about the signing certificates associated with the specified -// IAM user. If none exists, the operation returns an empty list. -// -// Although each user is limited to a small number of signing certificates, -// you can still paginate the results using the MaxItems and Marker parameters. -// -// If the UserName field is not specified, the user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request for -// this operation. This operation works for access keys under the Amazon Web -// Services account. Consequently, you can use this operation to manage Amazon -// Web Services account root user credentials even if the Amazon Web Services -// account has no associated users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListSigningCertificates for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSigningCertificates -func (c *IAM) ListSigningCertificates(input *ListSigningCertificatesInput) (*ListSigningCertificatesOutput, error) { - req, out := c.ListSigningCertificatesRequest(input) - return out, req.Send() -} - -// ListSigningCertificatesWithContext is the same as ListSigningCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See ListSigningCertificates for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListSigningCertificatesWithContext(ctx aws.Context, input *ListSigningCertificatesInput, opts ...request.Option) (*ListSigningCertificatesOutput, error) { - req, out := c.ListSigningCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSigningCertificatesPages iterates over the pages of a ListSigningCertificates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSigningCertificates method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListSigningCertificates operation. -// pageNum := 0 -// err := client.ListSigningCertificatesPages(params, -// func(page *iam.ListSigningCertificatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListSigningCertificatesPages(input *ListSigningCertificatesInput, fn func(*ListSigningCertificatesOutput, bool) bool) error { - return c.ListSigningCertificatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSigningCertificatesPagesWithContext same as ListSigningCertificatesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListSigningCertificatesPagesWithContext(ctx aws.Context, input *ListSigningCertificatesInput, fn func(*ListSigningCertificatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSigningCertificatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSigningCertificatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListSigningCertificatesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListUserPolicies = "ListUserPolicies" - -// ListUserPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListUserPolicies operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUserPolicies for more information on using the ListUserPolicies -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListUserPoliciesRequest method. -// req, resp := client.ListUserPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserPolicies -func (c *IAM) ListUserPoliciesRequest(input *ListUserPoliciesInput) (req *request.Request, output *ListUserPoliciesOutput) { - op := &request.Operation{ - Name: opListUserPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListUserPoliciesInput{} - } - - output = &ListUserPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUserPolicies API operation for AWS Identity and Access Management. -// -// Lists the names of the inline policies embedded in the specified IAM user. -// -// An IAM user can also have managed policies attached to it. To list the managed -// policies that are attached to a user, use ListAttachedUserPolicies. For more -// information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. If -// there are no inline policies embedded with the specified user, the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListUserPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserPolicies -func (c *IAM) ListUserPolicies(input *ListUserPoliciesInput) (*ListUserPoliciesOutput, error) { - req, out := c.ListUserPoliciesRequest(input) - return out, req.Send() -} - -// ListUserPoliciesWithContext is the same as ListUserPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListUserPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListUserPoliciesWithContext(ctx aws.Context, input *ListUserPoliciesInput, opts ...request.Option) (*ListUserPoliciesOutput, error) { - req, out := c.ListUserPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListUserPoliciesPages iterates over the pages of a ListUserPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListUserPolicies method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListUserPolicies operation. -// pageNum := 0 -// err := client.ListUserPoliciesPages(params, -// func(page *iam.ListUserPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListUserPoliciesPages(input *ListUserPoliciesInput, fn func(*ListUserPoliciesOutput, bool) bool) error { - return c.ListUserPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListUserPoliciesPagesWithContext same as ListUserPoliciesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListUserPoliciesPagesWithContext(ctx aws.Context, input *ListUserPoliciesInput, fn func(*ListUserPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListUserPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListUserPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListUserPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListUserTags = "ListUserTags" - -// ListUserTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListUserTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUserTags for more information on using the ListUserTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListUserTagsRequest method. -// req, resp := client.ListUserTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserTags -func (c *IAM) ListUserTagsRequest(input *ListUserTagsInput) (req *request.Request, output *ListUserTagsOutput) { - op := &request.Operation{ - Name: opListUserTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListUserTagsInput{} - } - - output = &ListUserTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUserTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM user. The returned -// list of tags is sorted by tag key. For more information about tagging, see -// Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListUserTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserTags -func (c *IAM) ListUserTags(input *ListUserTagsInput) (*ListUserTagsOutput, error) { - req, out := c.ListUserTagsRequest(input) - return out, req.Send() -} - -// ListUserTagsWithContext is the same as ListUserTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListUserTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListUserTagsWithContext(ctx aws.Context, input *ListUserTagsInput, opts ...request.Option) (*ListUserTagsOutput, error) { - req, out := c.ListUserTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListUserTagsPages iterates over the pages of a ListUserTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListUserTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListUserTags operation. -// pageNum := 0 -// err := client.ListUserTagsPages(params, -// func(page *iam.ListUserTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListUserTagsPages(input *ListUserTagsInput, fn func(*ListUserTagsOutput, bool) bool) error { - return c.ListUserTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListUserTagsPagesWithContext same as ListUserTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListUserTagsPagesWithContext(ctx aws.Context, input *ListUserTagsInput, fn func(*ListUserTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListUserTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListUserTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListUserTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListUsers = "ListUsers" - -// ListUsersRequest generates a "aws/request.Request" representing the -// client's request for the ListUsers operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListUsers for more information on using the ListUsers -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListUsersRequest method. -// req, resp := client.ListUsersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUsers -func (c *IAM) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) { - op := &request.Operation{ - Name: opListUsers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListUsersInput{} - } - - output = &ListUsersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUsers API operation for AWS Identity and Access Management. -// -// Lists the IAM users that have the specified path prefix. If no path prefix -// is specified, the operation returns all users in the Amazon Web Services -// account. If there are none, the operation returns an empty list. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. This operation does not return the following attributes, -// even though they are an attribute of the returned object: -// -// - PermissionsBoundary -// -// - Tags -// -// To view all of the information for a user, see GetUser. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListUsers for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUsers -func (c *IAM) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { - req, out := c.ListUsersRequest(input) - return out, req.Send() -} - -// ListUsersWithContext is the same as ListUsers with the addition of -// the ability to pass a context and additional request options. -// -// See ListUsers for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) { - req, out := c.ListUsersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListUsersPages iterates over the pages of a ListUsers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListUsers method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListUsers operation. -// pageNum := 0 -// err := client.ListUsersPages(params, -// func(page *iam.ListUsersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListUsersPages(input *ListUsersInput, fn func(*ListUsersOutput, bool) bool) error { - return c.ListUsersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListUsersPagesWithContext same as ListUsersPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersInput, fn func(*ListUsersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListUsersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListUsersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListVirtualMFADevices = "ListVirtualMFADevices" - -// ListVirtualMFADevicesRequest generates a "aws/request.Request" representing the -// client's request for the ListVirtualMFADevices operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListVirtualMFADevices for more information on using the ListVirtualMFADevices -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListVirtualMFADevicesRequest method. -// req, resp := client.ListVirtualMFADevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListVirtualMFADevices -func (c *IAM) ListVirtualMFADevicesRequest(input *ListVirtualMFADevicesInput) (req *request.Request, output *ListVirtualMFADevicesOutput) { - op := &request.Operation{ - Name: opListVirtualMFADevices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListVirtualMFADevicesInput{} - } - - output = &ListVirtualMFADevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVirtualMFADevices API operation for AWS Identity and Access Management. -// -// Lists the virtual MFA devices defined in the Amazon Web Services account -// by assignment status. If you do not specify an assignment status, the operation -// returns a list of all virtual MFA devices. Assignment status can be Assigned, -// Unassigned, or Any. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view tag information -// for a virtual MFA device, see ListMFADeviceTags. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListVirtualMFADevices for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListVirtualMFADevices -func (c *IAM) ListVirtualMFADevices(input *ListVirtualMFADevicesInput) (*ListVirtualMFADevicesOutput, error) { - req, out := c.ListVirtualMFADevicesRequest(input) - return out, req.Send() -} - -// ListVirtualMFADevicesWithContext is the same as ListVirtualMFADevices with the addition of -// the ability to pass a context and additional request options. -// -// See ListVirtualMFADevices for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListVirtualMFADevicesWithContext(ctx aws.Context, input *ListVirtualMFADevicesInput, opts ...request.Option) (*ListVirtualMFADevicesOutput, error) { - req, out := c.ListVirtualMFADevicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListVirtualMFADevicesPages iterates over the pages of a ListVirtualMFADevices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListVirtualMFADevices method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListVirtualMFADevices operation. -// pageNum := 0 -// err := client.ListVirtualMFADevicesPages(params, -// func(page *iam.ListVirtualMFADevicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListVirtualMFADevicesPages(input *ListVirtualMFADevicesInput, fn func(*ListVirtualMFADevicesOutput, bool) bool) error { - return c.ListVirtualMFADevicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListVirtualMFADevicesPagesWithContext same as ListVirtualMFADevicesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ListVirtualMFADevicesPagesWithContext(ctx aws.Context, input *ListVirtualMFADevicesInput, fn func(*ListVirtualMFADevicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListVirtualMFADevicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListVirtualMFADevicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListVirtualMFADevicesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opPutGroupPolicy = "PutGroupPolicy" - -// PutGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutGroupPolicy for more information on using the PutGroupPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutGroupPolicyRequest method. -// req, resp := client.PutGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutGroupPolicy -func (c *IAM) PutGroupPolicyRequest(input *PutGroupPolicyInput) (req *request.Request, output *PutGroupPolicyOutput) { - op := &request.Operation{ - Name: opPutGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutGroupPolicyInput{} - } - - output = &PutGroupPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutGroupPolicy API operation for AWS Identity and Access Management. -// -// Adds or updates an inline policy document that is embedded in the specified -// IAM group. -// -// A user can also have managed policies attached to it. To attach a managed -// policy to a group, use AttachGroupPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachGroupPolicy.html). -// To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html). -// For information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For information about the maximum number of inline policies that you can -// embed in a group, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Because policy documents can be large, you should use POST rather than GET -// when calling PutGroupPolicy. For general information about using the Query -// API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation PutGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutGroupPolicy -func (c *IAM) PutGroupPolicy(input *PutGroupPolicyInput) (*PutGroupPolicyOutput, error) { - req, out := c.PutGroupPolicyRequest(input) - return out, req.Send() -} - -// PutGroupPolicyWithContext is the same as PutGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutGroupPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) PutGroupPolicyWithContext(ctx aws.Context, input *PutGroupPolicyInput, opts ...request.Option) (*PutGroupPolicyOutput, error) { - req, out := c.PutGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRolePermissionsBoundary = "PutRolePermissionsBoundary" - -// PutRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the -// client's request for the PutRolePermissionsBoundary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRolePermissionsBoundary for more information on using the PutRolePermissionsBoundary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutRolePermissionsBoundaryRequest method. -// req, resp := client.PutRolePermissionsBoundaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary -func (c *IAM) PutRolePermissionsBoundaryRequest(input *PutRolePermissionsBoundaryInput) (req *request.Request, output *PutRolePermissionsBoundaryOutput) { - op := &request.Operation{ - Name: opPutRolePermissionsBoundary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRolePermissionsBoundaryInput{} - } - - output = &PutRolePermissionsBoundaryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutRolePermissionsBoundary API operation for AWS Identity and Access Management. -// -// Adds or updates the policy that is specified as the IAM role's permissions -// boundary. You can use an Amazon Web Services managed policy or a customer -// managed policy to set the boundary for a role. Use the boundary to control -// the maximum permissions that the role can have. Setting a permissions boundary -// is an advanced feature that can affect the permissions for the role. -// -// You cannot set the boundary for a service-linked role. -// -// Policies used as permissions boundaries do not provide permissions. You must -// also attach a permissions policy to the role. To learn how the effective -// permissions for a role are evaluated, see IAM JSON policy evaluation logic -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation PutRolePermissionsBoundary for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary -func (c *IAM) PutRolePermissionsBoundary(input *PutRolePermissionsBoundaryInput) (*PutRolePermissionsBoundaryOutput, error) { - req, out := c.PutRolePermissionsBoundaryRequest(input) - return out, req.Send() -} - -// PutRolePermissionsBoundaryWithContext is the same as PutRolePermissionsBoundary with the addition of -// the ability to pass a context and additional request options. -// -// See PutRolePermissionsBoundary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) PutRolePermissionsBoundaryWithContext(ctx aws.Context, input *PutRolePermissionsBoundaryInput, opts ...request.Option) (*PutRolePermissionsBoundaryOutput, error) { - req, out := c.PutRolePermissionsBoundaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRolePolicy = "PutRolePolicy" - -// PutRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutRolePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRolePolicy for more information on using the PutRolePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutRolePolicyRequest method. -// req, resp := client.PutRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePolicy -func (c *IAM) PutRolePolicyRequest(input *PutRolePolicyInput) (req *request.Request, output *PutRolePolicyOutput) { - op := &request.Operation{ - Name: opPutRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRolePolicyInput{} - } - - output = &PutRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutRolePolicy API operation for AWS Identity and Access Management. -// -// Adds or updates an inline policy document that is embedded in the specified -// IAM role. -// -// When you embed an inline policy in a role, the inline policy is used as part -// of the role's access (permissions) policy. The role's trust policy is created -// at the same time as the role, using CreateRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html). -// You can update a role's trust policy using UpdateAssumeRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html). -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) -// in the IAM User Guide. -// -// A role can also have a managed policy attached to it. To attach a managed -// policy to a role, use AttachRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachRolePolicy.html). -// To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html). -// For information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For information about the maximum number of inline policies that you can -// embed with a role, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Because policy documents can be large, you should use POST rather than GET -// when calling PutRolePolicy. For general information about using the Query -// API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation PutRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePolicy -func (c *IAM) PutRolePolicy(input *PutRolePolicyInput) (*PutRolePolicyOutput, error) { - req, out := c.PutRolePolicyRequest(input) - return out, req.Send() -} - -// PutRolePolicyWithContext is the same as PutRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutRolePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) PutRolePolicyWithContext(ctx aws.Context, input *PutRolePolicyInput, opts ...request.Option) (*PutRolePolicyOutput, error) { - req, out := c.PutRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutUserPermissionsBoundary = "PutUserPermissionsBoundary" - -// PutUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the -// client's request for the PutUserPermissionsBoundary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutUserPermissionsBoundary for more information on using the PutUserPermissionsBoundary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutUserPermissionsBoundaryRequest method. -// req, resp := client.PutUserPermissionsBoundaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary -func (c *IAM) PutUserPermissionsBoundaryRequest(input *PutUserPermissionsBoundaryInput) (req *request.Request, output *PutUserPermissionsBoundaryOutput) { - op := &request.Operation{ - Name: opPutUserPermissionsBoundary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutUserPermissionsBoundaryInput{} - } - - output = &PutUserPermissionsBoundaryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutUserPermissionsBoundary API operation for AWS Identity and Access Management. -// -// Adds or updates the policy that is specified as the IAM user's permissions -// boundary. You can use an Amazon Web Services managed policy or a customer -// managed policy to set the boundary for a user. Use the boundary to control -// the maximum permissions that the user can have. Setting a permissions boundary -// is an advanced feature that can affect the permissions for the user. -// -// Policies that are used as permissions boundaries do not provide permissions. -// You must also attach a permissions policy to the user. To learn how the effective -// permissions for a user are evaluated, see IAM JSON policy evaluation logic -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation PutUserPermissionsBoundary for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary -func (c *IAM) PutUserPermissionsBoundary(input *PutUserPermissionsBoundaryInput) (*PutUserPermissionsBoundaryOutput, error) { - req, out := c.PutUserPermissionsBoundaryRequest(input) - return out, req.Send() -} - -// PutUserPermissionsBoundaryWithContext is the same as PutUserPermissionsBoundary with the addition of -// the ability to pass a context and additional request options. -// -// See PutUserPermissionsBoundary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) PutUserPermissionsBoundaryWithContext(ctx aws.Context, input *PutUserPermissionsBoundaryInput, opts ...request.Option) (*PutUserPermissionsBoundaryOutput, error) { - req, out := c.PutUserPermissionsBoundaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutUserPolicy = "PutUserPolicy" - -// PutUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutUserPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutUserPolicy for more information on using the PutUserPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutUserPolicyRequest method. -// req, resp := client.PutUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPolicy -func (c *IAM) PutUserPolicyRequest(input *PutUserPolicyInput) (req *request.Request, output *PutUserPolicyOutput) { - op := &request.Operation{ - Name: opPutUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutUserPolicyInput{} - } - - output = &PutUserPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutUserPolicy API operation for AWS Identity and Access Management. -// -// Adds or updates an inline policy document that is embedded in the specified -// IAM user. -// -// An IAM user can also have a managed policy attached to it. To attach a managed -// policy to a user, use AttachUserPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html). -// To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html). -// For information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For information about the maximum number of inline policies that you can -// embed in a user, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Because policy documents can be large, you should use POST rather than GET -// when calling PutUserPolicy. For general information about using the Query -// API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation PutUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPolicy -func (c *IAM) PutUserPolicy(input *PutUserPolicyInput) (*PutUserPolicyOutput, error) { - req, out := c.PutUserPolicyRequest(input) - return out, req.Send() -} - -// PutUserPolicyWithContext is the same as PutUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutUserPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) PutUserPolicyWithContext(ctx aws.Context, input *PutUserPolicyInput, opts ...request.Option) (*PutUserPolicyOutput, error) { - req, out := c.PutUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveClientIDFromOpenIDConnectProvider = "RemoveClientIDFromOpenIDConnectProvider" - -// RemoveClientIDFromOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the RemoveClientIDFromOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveClientIDFromOpenIDConnectProvider for more information on using the RemoveClientIDFromOpenIDConnectProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the RemoveClientIDFromOpenIDConnectProviderRequest method. -// req, resp := client.RemoveClientIDFromOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveClientIDFromOpenIDConnectProvider -func (c *IAM) RemoveClientIDFromOpenIDConnectProviderRequest(input *RemoveClientIDFromOpenIDConnectProviderInput) (req *request.Request, output *RemoveClientIDFromOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opRemoveClientIDFromOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveClientIDFromOpenIDConnectProviderInput{} - } - - output = &RemoveClientIDFromOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveClientIDFromOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Removes the specified client ID (also known as audience) from the list of -// client IDs registered for the specified IAM OpenID Connect (OIDC) provider -// resource object. -// -// This operation is idempotent; it does not fail or return an error if you -// try to remove a client ID that does not exist. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation RemoveClientIDFromOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveClientIDFromOpenIDConnectProvider -func (c *IAM) RemoveClientIDFromOpenIDConnectProvider(input *RemoveClientIDFromOpenIDConnectProviderInput) (*RemoveClientIDFromOpenIDConnectProviderOutput, error) { - req, out := c.RemoveClientIDFromOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// RemoveClientIDFromOpenIDConnectProviderWithContext is the same as RemoveClientIDFromOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveClientIDFromOpenIDConnectProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) RemoveClientIDFromOpenIDConnectProviderWithContext(ctx aws.Context, input *RemoveClientIDFromOpenIDConnectProviderInput, opts ...request.Option) (*RemoveClientIDFromOpenIDConnectProviderOutput, error) { - req, out := c.RemoveClientIDFromOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveRoleFromInstanceProfile = "RemoveRoleFromInstanceProfile" - -// RemoveRoleFromInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the RemoveRoleFromInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveRoleFromInstanceProfile for more information on using the RemoveRoleFromInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the RemoveRoleFromInstanceProfileRequest method. -// req, resp := client.RemoveRoleFromInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveRoleFromInstanceProfile -func (c *IAM) RemoveRoleFromInstanceProfileRequest(input *RemoveRoleFromInstanceProfileInput) (req *request.Request, output *RemoveRoleFromInstanceProfileOutput) { - op := &request.Operation{ - Name: opRemoveRoleFromInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveRoleFromInstanceProfileInput{} - } - - output = &RemoveRoleFromInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveRoleFromInstanceProfile API operation for AWS Identity and Access Management. -// -// Removes the specified IAM role from the specified EC2 instance profile. -// -// Make sure that you do not have any Amazon EC2 instances running with the -// role you are about to remove from the instance profile. Removing a role from -// an instance profile that is associated with a running instance might break -// any applications running on the instance. -// -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For more information about instance profiles, see -// Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation RemoveRoleFromInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveRoleFromInstanceProfile -func (c *IAM) RemoveRoleFromInstanceProfile(input *RemoveRoleFromInstanceProfileInput) (*RemoveRoleFromInstanceProfileOutput, error) { - req, out := c.RemoveRoleFromInstanceProfileRequest(input) - return out, req.Send() -} - -// RemoveRoleFromInstanceProfileWithContext is the same as RemoveRoleFromInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveRoleFromInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) RemoveRoleFromInstanceProfileWithContext(ctx aws.Context, input *RemoveRoleFromInstanceProfileInput, opts ...request.Option) (*RemoveRoleFromInstanceProfileOutput, error) { - req, out := c.RemoveRoleFromInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveUserFromGroup = "RemoveUserFromGroup" - -// RemoveUserFromGroupRequest generates a "aws/request.Request" representing the -// client's request for the RemoveUserFromGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See RemoveUserFromGroup for more information on using the RemoveUserFromGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the RemoveUserFromGroupRequest method. -// req, resp := client.RemoveUserFromGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveUserFromGroup -func (c *IAM) RemoveUserFromGroupRequest(input *RemoveUserFromGroupInput) (req *request.Request, output *RemoveUserFromGroupOutput) { - op := &request.Operation{ - Name: opRemoveUserFromGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveUserFromGroupInput{} - } - - output = &RemoveUserFromGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveUserFromGroup API operation for AWS Identity and Access Management. -// -// Removes the specified user from the specified group. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation RemoveUserFromGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveUserFromGroup -func (c *IAM) RemoveUserFromGroup(input *RemoveUserFromGroupInput) (*RemoveUserFromGroupOutput, error) { - req, out := c.RemoveUserFromGroupRequest(input) - return out, req.Send() -} - -// RemoveUserFromGroupWithContext is the same as RemoveUserFromGroup with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveUserFromGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) RemoveUserFromGroupWithContext(ctx aws.Context, input *RemoveUserFromGroupInput, opts ...request.Option) (*RemoveUserFromGroupOutput, error) { - req, out := c.RemoveUserFromGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetServiceSpecificCredential = "ResetServiceSpecificCredential" - -// ResetServiceSpecificCredentialRequest generates a "aws/request.Request" representing the -// client's request for the ResetServiceSpecificCredential operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResetServiceSpecificCredential for more information on using the ResetServiceSpecificCredential -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ResetServiceSpecificCredentialRequest method. -// req, resp := client.ResetServiceSpecificCredentialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResetServiceSpecificCredential -func (c *IAM) ResetServiceSpecificCredentialRequest(input *ResetServiceSpecificCredentialInput) (req *request.Request, output *ResetServiceSpecificCredentialOutput) { - op := &request.Operation{ - Name: opResetServiceSpecificCredential, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetServiceSpecificCredentialInput{} - } - - output = &ResetServiceSpecificCredentialOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResetServiceSpecificCredential API operation for AWS Identity and Access Management. -// -// Resets the password for a service-specific credential. The new password is -// Amazon Web Services generated and cryptographically strong. It cannot be -// configured by the user. Resetting the password immediately invalidates the -// previous password associated with this user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ResetServiceSpecificCredential for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResetServiceSpecificCredential -func (c *IAM) ResetServiceSpecificCredential(input *ResetServiceSpecificCredentialInput) (*ResetServiceSpecificCredentialOutput, error) { - req, out := c.ResetServiceSpecificCredentialRequest(input) - return out, req.Send() -} - -// ResetServiceSpecificCredentialWithContext is the same as ResetServiceSpecificCredential with the addition of -// the ability to pass a context and additional request options. -// -// See ResetServiceSpecificCredential for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ResetServiceSpecificCredentialWithContext(ctx aws.Context, input *ResetServiceSpecificCredentialInput, opts ...request.Option) (*ResetServiceSpecificCredentialOutput, error) { - req, out := c.ResetServiceSpecificCredentialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResyncMFADevice = "ResyncMFADevice" - -// ResyncMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the ResyncMFADevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ResyncMFADevice for more information on using the ResyncMFADevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ResyncMFADeviceRequest method. -// req, resp := client.ResyncMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResyncMFADevice -func (c *IAM) ResyncMFADeviceRequest(input *ResyncMFADeviceInput) (req *request.Request, output *ResyncMFADeviceOutput) { - op := &request.Operation{ - Name: opResyncMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResyncMFADeviceInput{} - } - - output = &ResyncMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResyncMFADevice API operation for AWS Identity and Access Management. -// -// Synchronizes the specified MFA device with its IAM resource object on the -// Amazon Web Services servers. -// -// For more information about creating and working with virtual MFA devices, -// see Using a virtual MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ResyncMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidAuthenticationCodeException "InvalidAuthenticationCode" -// The request was rejected because the authentication code was not recognized. -// The error message describes the specific error. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResyncMFADevice -func (c *IAM) ResyncMFADevice(input *ResyncMFADeviceInput) (*ResyncMFADeviceOutput, error) { - req, out := c.ResyncMFADeviceRequest(input) - return out, req.Send() -} - -// ResyncMFADeviceWithContext is the same as ResyncMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See ResyncMFADevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) ResyncMFADeviceWithContext(ctx aws.Context, input *ResyncMFADeviceInput, opts ...request.Option) (*ResyncMFADeviceOutput, error) { - req, out := c.ResyncMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" - -// SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the SetDefaultPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetDefaultPolicyVersion for more information on using the SetDefaultPolicyVersion -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the SetDefaultPolicyVersionRequest method. -// req, resp := client.SetDefaultPolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetDefaultPolicyVersion -func (c *IAM) SetDefaultPolicyVersionRequest(input *SetDefaultPolicyVersionInput) (req *request.Request, output *SetDefaultPolicyVersionOutput) { - op := &request.Operation{ - Name: opSetDefaultPolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetDefaultPolicyVersionInput{} - } - - output = &SetDefaultPolicyVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetDefaultPolicyVersion API operation for AWS Identity and Access Management. -// -// Sets the specified version of the specified policy as the policy's default -// (operative) version. -// -// This operation affects all users, groups, and roles that the policy is attached -// to. To list the users, groups, and roles that the policy is attached to, -// use ListEntitiesForPolicy. -// -// For information about managed policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation SetDefaultPolicyVersion for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetDefaultPolicyVersion -func (c *IAM) SetDefaultPolicyVersion(input *SetDefaultPolicyVersionInput) (*SetDefaultPolicyVersionOutput, error) { - req, out := c.SetDefaultPolicyVersionRequest(input) - return out, req.Send() -} - -// SetDefaultPolicyVersionWithContext is the same as SetDefaultPolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See SetDefaultPolicyVersion for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) SetDefaultPolicyVersionWithContext(ctx aws.Context, input *SetDefaultPolicyVersionInput, opts ...request.Option) (*SetDefaultPolicyVersionOutput, error) { - req, out := c.SetDefaultPolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSecurityTokenServicePreferences = "SetSecurityTokenServicePreferences" - -// SetSecurityTokenServicePreferencesRequest generates a "aws/request.Request" representing the -// client's request for the SetSecurityTokenServicePreferences operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SetSecurityTokenServicePreferences for more information on using the SetSecurityTokenServicePreferences -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the SetSecurityTokenServicePreferencesRequest method. -// req, resp := client.SetSecurityTokenServicePreferencesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetSecurityTokenServicePreferences -func (c *IAM) SetSecurityTokenServicePreferencesRequest(input *SetSecurityTokenServicePreferencesInput) (req *request.Request, output *SetSecurityTokenServicePreferencesOutput) { - op := &request.Operation{ - Name: opSetSecurityTokenServicePreferences, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSecurityTokenServicePreferencesInput{} - } - - output = &SetSecurityTokenServicePreferencesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetSecurityTokenServicePreferences API operation for AWS Identity and Access Management. -// -// Sets the specified version of the global endpoint token as the token version -// used for the Amazon Web Services account. -// -// By default, Security Token Service (STS) is available as a global service, -// and all STS requests go to a single endpoint at https://sts.amazonaws.com. -// Amazon Web Services recommends using Regional STS endpoints to reduce latency, -// build in redundancy, and increase session token availability. For information -// about Regional endpoints for STS, see Security Token Service endpoints and -// quotas (https://docs.aws.amazon.com/general/latest/gr/sts.html) in the Amazon -// Web Services General Reference. -// -// If you make an STS call to the global endpoint, the resulting session tokens -// might be valid in some Regions but not others. It depends on the version -// that is set in this operation. Version 1 tokens are valid only in Amazon -// Web Services Regions that are available by default. These tokens do not work -// in manually enabled Regions, such as Asia Pacific (Hong Kong). Version 2 -// tokens are valid in all Regions. However, version 2 tokens are longer and -// might affect systems where you temporarily store tokens. For information, -// see Activating and deactivating STS in an Amazon Web Services Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) -// in the IAM User Guide. -// -// To view the current session token version, see the GlobalEndpointTokenVersion -// entry in the response of the GetAccountSummary operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation SetSecurityTokenServicePreferences for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetSecurityTokenServicePreferences -func (c *IAM) SetSecurityTokenServicePreferences(input *SetSecurityTokenServicePreferencesInput) (*SetSecurityTokenServicePreferencesOutput, error) { - req, out := c.SetSecurityTokenServicePreferencesRequest(input) - return out, req.Send() -} - -// SetSecurityTokenServicePreferencesWithContext is the same as SetSecurityTokenServicePreferences with the addition of -// the ability to pass a context and additional request options. -// -// See SetSecurityTokenServicePreferences for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) SetSecurityTokenServicePreferencesWithContext(ctx aws.Context, input *SetSecurityTokenServicePreferencesInput, opts ...request.Option) (*SetSecurityTokenServicePreferencesOutput, error) { - req, out := c.SetSecurityTokenServicePreferencesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSimulateCustomPolicy = "SimulateCustomPolicy" - -// SimulateCustomPolicyRequest generates a "aws/request.Request" representing the -// client's request for the SimulateCustomPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SimulateCustomPolicy for more information on using the SimulateCustomPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the SimulateCustomPolicyRequest method. -// req, resp := client.SimulateCustomPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulateCustomPolicy -func (c *IAM) SimulateCustomPolicyRequest(input *SimulateCustomPolicyInput) (req *request.Request, output *SimulatePolicyResponse) { - op := &request.Operation{ - Name: opSimulateCustomPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &SimulateCustomPolicyInput{} - } - - output = &SimulatePolicyResponse{} - req = c.newRequest(op, input, output) - return -} - -// SimulateCustomPolicy API operation for AWS Identity and Access Management. -// -// Simulate how a set of IAM policies and optionally a resource-based policy -// works with a list of API operations and Amazon Web Services resources to -// determine the policies' effective permissions. The policies are provided -// as strings. -// -// The simulation does not perform the API operations; it only checks the authorization -// to determine if the simulated policies allow or deny the operations. You -// can simulate resources that don't exist in your account. -// -// If you want to simulate existing policies that are attached to an IAM user, -// group, or role, use SimulatePrincipalPolicy instead. -// -// Context keys are variables that are maintained by Amazon Web Services and -// its services and which provide details about the context of an API query -// request. You can use the Condition element of an IAM policy to evaluate context -// keys. To get the list of context keys that the policies require for correct -// simulation, use GetContextKeysForCustomPolicy. -// -// If the output is long, you can use MaxItems and Marker parameters to paginate -// the results. -// -// The IAM policy simulator evaluates statements in the identity-based policy -// and the inputs that you provide during simulation. The policy simulator results -// can differ from your live Amazon Web Services environment. We recommend that -// you check your policies against your live Amazon Web Services environment -// after testing using the policy simulator to confirm that you have the desired -// results. For more information about using the policy simulator, see Testing -// IAM policies with the IAM policy simulator (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html)in -// the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation SimulateCustomPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyEvaluationException "PolicyEvaluation" -// The request failed because a provided policy could not be successfully evaluated. -// An additional detailed message indicates the source of the failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulateCustomPolicy -func (c *IAM) SimulateCustomPolicy(input *SimulateCustomPolicyInput) (*SimulatePolicyResponse, error) { - req, out := c.SimulateCustomPolicyRequest(input) - return out, req.Send() -} - -// SimulateCustomPolicyWithContext is the same as SimulateCustomPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See SimulateCustomPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) SimulateCustomPolicyWithContext(ctx aws.Context, input *SimulateCustomPolicyInput, opts ...request.Option) (*SimulatePolicyResponse, error) { - req, out := c.SimulateCustomPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SimulateCustomPolicyPages iterates over the pages of a SimulateCustomPolicy operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See SimulateCustomPolicy method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a SimulateCustomPolicy operation. -// pageNum := 0 -// err := client.SimulateCustomPolicyPages(params, -// func(page *iam.SimulatePolicyResponse, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) SimulateCustomPolicyPages(input *SimulateCustomPolicyInput, fn func(*SimulatePolicyResponse, bool) bool) error { - return c.SimulateCustomPolicyPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SimulateCustomPolicyPagesWithContext same as SimulateCustomPolicyPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) SimulateCustomPolicyPagesWithContext(ctx aws.Context, input *SimulateCustomPolicyInput, fn func(*SimulatePolicyResponse, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SimulateCustomPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SimulateCustomPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opSimulatePrincipalPolicy = "SimulatePrincipalPolicy" - -// SimulatePrincipalPolicyRequest generates a "aws/request.Request" representing the -// client's request for the SimulatePrincipalPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See SimulatePrincipalPolicy for more information on using the SimulatePrincipalPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the SimulatePrincipalPolicyRequest method. -// req, resp := client.SimulatePrincipalPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulatePrincipalPolicy -func (c *IAM) SimulatePrincipalPolicyRequest(input *SimulatePrincipalPolicyInput) (req *request.Request, output *SimulatePolicyResponse) { - op := &request.Operation{ - Name: opSimulatePrincipalPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &SimulatePrincipalPolicyInput{} - } - - output = &SimulatePolicyResponse{} - req = c.newRequest(op, input, output) - return -} - -// SimulatePrincipalPolicy API operation for AWS Identity and Access Management. -// -// Simulate how a set of IAM policies attached to an IAM entity works with a -// list of API operations and Amazon Web Services resources to determine the -// policies' effective permissions. The entity can be an IAM user, group, or -// role. If you specify a user, then the simulation also includes all of the -// policies that are attached to groups that the user belongs to. You can simulate -// resources that don't exist in your account. -// -// You can optionally include a list of one or more additional policies specified -// as strings to include in the simulation. If you want to simulate only policies -// specified as strings, use SimulateCustomPolicy instead. -// -// You can also optionally include one resource-based policy to be evaluated -// with each of the resources included in the simulation for IAM users only. -// -// The simulation does not perform the API operations; it only checks the authorization -// to determine if the simulated policies allow or deny the operations. -// -// Note: This operation discloses information about the permissions granted -// to other users. If you do not want users to see other user's permissions, -// then consider allowing them to use SimulateCustomPolicy instead. -// -// Context keys are variables maintained by Amazon Web Services and its services -// that provide details about the context of an API query request. You can use -// the Condition element of an IAM policy to evaluate context keys. To get the -// list of context keys that the policies require for correct simulation, use -// GetContextKeysForPrincipalPolicy. -// -// If the output is long, you can use the MaxItems and Marker parameters to -// paginate the results. -// -// The IAM policy simulator evaluates statements in the identity-based policy -// and the inputs that you provide during simulation. The policy simulator results -// can differ from your live Amazon Web Services environment. We recommend that -// you check your policies against your live Amazon Web Services environment -// after testing using the policy simulator to confirm that you have the desired -// results. For more information about using the policy simulator, see Testing -// IAM policies with the IAM policy simulator (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html)in -// the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation SimulatePrincipalPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyEvaluationException "PolicyEvaluation" -// The request failed because a provided policy could not be successfully evaluated. -// An additional detailed message indicates the source of the failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulatePrincipalPolicy -func (c *IAM) SimulatePrincipalPolicy(input *SimulatePrincipalPolicyInput) (*SimulatePolicyResponse, error) { - req, out := c.SimulatePrincipalPolicyRequest(input) - return out, req.Send() -} - -// SimulatePrincipalPolicyWithContext is the same as SimulatePrincipalPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See SimulatePrincipalPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) SimulatePrincipalPolicyWithContext(ctx aws.Context, input *SimulatePrincipalPolicyInput, opts ...request.Option) (*SimulatePolicyResponse, error) { - req, out := c.SimulatePrincipalPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SimulatePrincipalPolicyPages iterates over the pages of a SimulatePrincipalPolicy operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See SimulatePrincipalPolicy method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a SimulatePrincipalPolicy operation. -// pageNum := 0 -// err := client.SimulatePrincipalPolicyPages(params, -// func(page *iam.SimulatePolicyResponse, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) SimulatePrincipalPolicyPages(input *SimulatePrincipalPolicyInput, fn func(*SimulatePolicyResponse, bool) bool) error { - return c.SimulatePrincipalPolicyPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SimulatePrincipalPolicyPagesWithContext same as SimulatePrincipalPolicyPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) SimulatePrincipalPolicyPagesWithContext(ctx aws.Context, input *SimulatePrincipalPolicyInput, fn func(*SimulatePolicyResponse, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SimulatePrincipalPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SimulatePrincipalPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opTagInstanceProfile = "TagInstanceProfile" - -// TagInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the TagInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagInstanceProfile for more information on using the TagInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagInstanceProfileRequest method. -// req, resp := client.TagInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagInstanceProfile -func (c *IAM) TagInstanceProfileRequest(input *TagInstanceProfileInput) (req *request.Request, output *TagInstanceProfileOutput) { - op := &request.Operation{ - Name: opTagInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagInstanceProfileInput{} - } - - output = &TagInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagInstanceProfile API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM instance profile. If a tag with the same -// key name already exists, then that tag is overwritten with the new value. -// -// Each tag consists of a key name and an associated value. By assigning tags -// to your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only an IAM instance profile that -// has a specified tag attached. For examples of policies that show how to -// use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagInstanceProfile -func (c *IAM) TagInstanceProfile(input *TagInstanceProfileInput) (*TagInstanceProfileOutput, error) { - req, out := c.TagInstanceProfileRequest(input) - return out, req.Send() -} - -// TagInstanceProfileWithContext is the same as TagInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See TagInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) TagInstanceProfileWithContext(ctx aws.Context, input *TagInstanceProfileInput, opts ...request.Option) (*TagInstanceProfileOutput, error) { - req, out := c.TagInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagMFADevice = "TagMFADevice" - -// TagMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the TagMFADevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagMFADevice for more information on using the TagMFADevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagMFADeviceRequest method. -// req, resp := client.TagMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagMFADevice -func (c *IAM) TagMFADeviceRequest(input *TagMFADeviceInput) (req *request.Request, output *TagMFADeviceOutput) { - op := &request.Operation{ - Name: opTagMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagMFADeviceInput{} - } - - output = &TagMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagMFADevice API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM virtual multi-factor authentication (MFA) -// device. If a tag with the same key name already exists, then that tag is -// overwritten with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only an IAM virtual MFA device -// that has a specified tag attached. For examples of policies that show -// how to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagMFADevice -func (c *IAM) TagMFADevice(input *TagMFADeviceInput) (*TagMFADeviceOutput, error) { - req, out := c.TagMFADeviceRequest(input) - return out, req.Send() -} - -// TagMFADeviceWithContext is the same as TagMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See TagMFADevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) TagMFADeviceWithContext(ctx aws.Context, input *TagMFADeviceInput, opts ...request.Option) (*TagMFADeviceOutput, error) { - req, out := c.TagMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagOpenIDConnectProvider = "TagOpenIDConnectProvider" - -// TagOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the TagOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagOpenIDConnectProvider for more information on using the TagOpenIDConnectProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagOpenIDConnectProviderRequest method. -// req, resp := client.TagOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagOpenIDConnectProvider -func (c *IAM) TagOpenIDConnectProviderRequest(input *TagOpenIDConnectProviderInput) (req *request.Request, output *TagOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opTagOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagOpenIDConnectProviderInput{} - } - - output = &TagOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an OpenID Connect (OIDC)-compatible identity provider. -// For more information about these providers, see About web identity federation -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html). -// If a tag with the same key name already exists, then that tag is overwritten -// with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM identity-based and resource-based -// policies. You can use tags to restrict access to only an OIDC provider -// that has a specified tag attached. For examples of policies that show -// how to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagOpenIDConnectProvider -func (c *IAM) TagOpenIDConnectProvider(input *TagOpenIDConnectProviderInput) (*TagOpenIDConnectProviderOutput, error) { - req, out := c.TagOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// TagOpenIDConnectProviderWithContext is the same as TagOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See TagOpenIDConnectProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) TagOpenIDConnectProviderWithContext(ctx aws.Context, input *TagOpenIDConnectProviderInput, opts ...request.Option) (*TagOpenIDConnectProviderOutput, error) { - req, out := c.TagOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagPolicy = "TagPolicy" - -// TagPolicyRequest generates a "aws/request.Request" representing the -// client's request for the TagPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagPolicy for more information on using the TagPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagPolicyRequest method. -// req, resp := client.TagPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagPolicy -func (c *IAM) TagPolicyRequest(input *TagPolicyInput) (req *request.Request, output *TagPolicyOutput) { - op := &request.Operation{ - Name: opTagPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagPolicyInput{} - } - - output = &TagPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagPolicy API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM customer managed policy. If a tag with the -// same key name already exists, then that tag is overwritten with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only an IAM customer managed policy -// that has a specified tag attached. For examples of policies that show -// how to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagPolicy -func (c *IAM) TagPolicy(input *TagPolicyInput) (*TagPolicyOutput, error) { - req, out := c.TagPolicyRequest(input) - return out, req.Send() -} - -// TagPolicyWithContext is the same as TagPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See TagPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) TagPolicyWithContext(ctx aws.Context, input *TagPolicyInput, opts ...request.Option) (*TagPolicyOutput, error) { - req, out := c.TagPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagRole = "TagRole" - -// TagRoleRequest generates a "aws/request.Request" representing the -// client's request for the TagRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagRole for more information on using the TagRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagRoleRequest method. -// req, resp := client.TagRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagRole -func (c *IAM) TagRoleRequest(input *TagRoleInput) (req *request.Request, output *TagRoleOutput) { - op := &request.Operation{ - Name: opTagRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagRoleInput{} - } - - output = &TagRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagRole API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM role. The role can be a regular role or a -// service-linked role. If a tag with the same key name already exists, then -// that tag is overwritten with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only an IAM role that has a specified -// tag attached. You can also restrict access to only those resources that -// have a certain tag attached. For examples of policies that show how to -// use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - Cost allocation - Use tags to help track which individuals and teams -// are using which Amazon Web Services resources. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// For more information about tagging, see Tagging IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagRole -func (c *IAM) TagRole(input *TagRoleInput) (*TagRoleOutput, error) { - req, out := c.TagRoleRequest(input) - return out, req.Send() -} - -// TagRoleWithContext is the same as TagRole with the addition of -// the ability to pass a context and additional request options. -// -// See TagRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) TagRoleWithContext(ctx aws.Context, input *TagRoleInput, opts ...request.Option) (*TagRoleOutput, error) { - req, out := c.TagRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagSAMLProvider = "TagSAMLProvider" - -// TagSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the TagSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagSAMLProvider for more information on using the TagSAMLProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagSAMLProviderRequest method. -// req, resp := client.TagSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagSAMLProvider -func (c *IAM) TagSAMLProviderRequest(input *TagSAMLProviderInput) (req *request.Request, output *TagSAMLProviderOutput) { - op := &request.Operation{ - Name: opTagSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagSAMLProviderInput{} - } - - output = &TagSAMLProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagSAMLProvider API operation for AWS Identity and Access Management. -// -// Adds one or more tags to a Security Assertion Markup Language (SAML) identity -// provider. For more information about these providers, see About SAML 2.0-based -// federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html). -// If a tag with the same key name already exists, then that tag is overwritten -// with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only a SAML identity provider that -// has a specified tag attached. For examples of policies that show how to -// use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagSAMLProvider -func (c *IAM) TagSAMLProvider(input *TagSAMLProviderInput) (*TagSAMLProviderOutput, error) { - req, out := c.TagSAMLProviderRequest(input) - return out, req.Send() -} - -// TagSAMLProviderWithContext is the same as TagSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See TagSAMLProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) TagSAMLProviderWithContext(ctx aws.Context, input *TagSAMLProviderInput, opts ...request.Option) (*TagSAMLProviderOutput, error) { - req, out := c.TagSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagServerCertificate = "TagServerCertificate" - -// TagServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the TagServerCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagServerCertificate for more information on using the TagServerCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagServerCertificateRequest method. -// req, resp := client.TagServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagServerCertificate -func (c *IAM) TagServerCertificateRequest(input *TagServerCertificateInput) (req *request.Request, output *TagServerCertificateOutput) { - op := &request.Operation{ - Name: opTagServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagServerCertificateInput{} - } - - output = &TagServerCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagServerCertificate API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM server certificate. If a tag with the same -// key name already exists, then that tag is overwritten with the new value. -// -// For certificates in a Region supported by Certificate Manager (ACM), we recommend -// that you don't use IAM server certificates. Instead, use ACM to provision, -// manage, and deploy your server certificates. For more information about IAM -// server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only a server certificate that -// has a specified tag attached. For examples of policies that show how to -// use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - Cost allocation - Use tags to help track which individuals and teams -// are using which Amazon Web Services resources. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagServerCertificate -func (c *IAM) TagServerCertificate(input *TagServerCertificateInput) (*TagServerCertificateOutput, error) { - req, out := c.TagServerCertificateRequest(input) - return out, req.Send() -} - -// TagServerCertificateWithContext is the same as TagServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See TagServerCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) TagServerCertificateWithContext(ctx aws.Context, input *TagServerCertificateInput, opts ...request.Option) (*TagServerCertificateOutput, error) { - req, out := c.TagServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagUser = "TagUser" - -// TagUserRequest generates a "aws/request.Request" representing the -// client's request for the TagUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagUser for more information on using the TagUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagUserRequest method. -// req, resp := client.TagUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagUser -func (c *IAM) TagUserRequest(input *TagUserInput) (req *request.Request, output *TagUserOutput) { - op := &request.Operation{ - Name: opTagUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagUserInput{} - } - - output = &TagUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagUser API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM user. If a tag with the same key name already -// exists, then that tag is overwritten with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM identity-based and resource-based -// policies. You can use tags to restrict access to only an IAM requesting -// user that has a specified tag attached. You can also restrict access to -// only those resources that have a certain tag attached. For examples of -// policies that show how to use tags to control access, see Control access -// using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - Cost allocation - Use tags to help track which individuals and teams -// are using which Amazon Web Services resources. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// For more information about tagging, see Tagging IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagUser -func (c *IAM) TagUser(input *TagUserInput) (*TagUserOutput, error) { - req, out := c.TagUserRequest(input) - return out, req.Send() -} - -// TagUserWithContext is the same as TagUser with the addition of -// the ability to pass a context and additional request options. -// -// See TagUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) TagUserWithContext(ctx aws.Context, input *TagUserInput, opts ...request.Option) (*TagUserOutput, error) { - req, out := c.TagUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagInstanceProfile = "UntagInstanceProfile" - -// UntagInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the UntagInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagInstanceProfile for more information on using the UntagInstanceProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagInstanceProfileRequest method. -// req, resp := client.UntagInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagInstanceProfile -func (c *IAM) UntagInstanceProfileRequest(input *UntagInstanceProfileInput) (req *request.Request, output *UntagInstanceProfileOutput) { - op := &request.Operation{ - Name: opUntagInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagInstanceProfileInput{} - } - - output = &UntagInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagInstanceProfile API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the IAM instance profile. For more information -// about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UntagInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagInstanceProfile -func (c *IAM) UntagInstanceProfile(input *UntagInstanceProfileInput) (*UntagInstanceProfileOutput, error) { - req, out := c.UntagInstanceProfileRequest(input) - return out, req.Send() -} - -// UntagInstanceProfileWithContext is the same as UntagInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UntagInstanceProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UntagInstanceProfileWithContext(ctx aws.Context, input *UntagInstanceProfileInput, opts ...request.Option) (*UntagInstanceProfileOutput, error) { - req, out := c.UntagInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagMFADevice = "UntagMFADevice" - -// UntagMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the UntagMFADevice operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagMFADevice for more information on using the UntagMFADevice -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagMFADeviceRequest method. -// req, resp := client.UntagMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagMFADevice -func (c *IAM) UntagMFADeviceRequest(input *UntagMFADeviceInput) (req *request.Request, output *UntagMFADeviceOutput) { - op := &request.Operation{ - Name: opUntagMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagMFADeviceInput{} - } - - output = &UntagMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagMFADevice API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the IAM virtual multi-factor authentication -// (MFA) device. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the IAM -// User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UntagMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagMFADevice -func (c *IAM) UntagMFADevice(input *UntagMFADeviceInput) (*UntagMFADeviceOutput, error) { - req, out := c.UntagMFADeviceRequest(input) - return out, req.Send() -} - -// UntagMFADeviceWithContext is the same as UntagMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See UntagMFADevice for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UntagMFADeviceWithContext(ctx aws.Context, input *UntagMFADeviceInput, opts ...request.Option) (*UntagMFADeviceOutput, error) { - req, out := c.UntagMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagOpenIDConnectProvider = "UntagOpenIDConnectProvider" - -// UntagOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the UntagOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagOpenIDConnectProvider for more information on using the UntagOpenIDConnectProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagOpenIDConnectProviderRequest method. -// req, resp := client.UntagOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagOpenIDConnectProvider -func (c *IAM) UntagOpenIDConnectProviderRequest(input *UntagOpenIDConnectProviderInput) (req *request.Request, output *UntagOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opUntagOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagOpenIDConnectProviderInput{} - } - - output = &UntagOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the specified OpenID Connect (OIDC)-compatible -// identity provider in IAM. For more information about OIDC providers, see -// About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html). -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UntagOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagOpenIDConnectProvider -func (c *IAM) UntagOpenIDConnectProvider(input *UntagOpenIDConnectProviderInput) (*UntagOpenIDConnectProviderOutput, error) { - req, out := c.UntagOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// UntagOpenIDConnectProviderWithContext is the same as UntagOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See UntagOpenIDConnectProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UntagOpenIDConnectProviderWithContext(ctx aws.Context, input *UntagOpenIDConnectProviderInput, opts ...request.Option) (*UntagOpenIDConnectProviderOutput, error) { - req, out := c.UntagOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagPolicy = "UntagPolicy" - -// UntagPolicyRequest generates a "aws/request.Request" representing the -// client's request for the UntagPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagPolicy for more information on using the UntagPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagPolicyRequest method. -// req, resp := client.UntagPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagPolicy -func (c *IAM) UntagPolicyRequest(input *UntagPolicyInput) (req *request.Request, output *UntagPolicyOutput) { - op := &request.Operation{ - Name: opUntagPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagPolicyInput{} - } - - output = &UntagPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagPolicy API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the customer managed policy. For more information -// about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UntagPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagPolicy -func (c *IAM) UntagPolicy(input *UntagPolicyInput) (*UntagPolicyOutput, error) { - req, out := c.UntagPolicyRequest(input) - return out, req.Send() -} - -// UntagPolicyWithContext is the same as UntagPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UntagPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UntagPolicyWithContext(ctx aws.Context, input *UntagPolicyInput, opts ...request.Option) (*UntagPolicyOutput, error) { - req, out := c.UntagPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagRole = "UntagRole" - -// UntagRoleRequest generates a "aws/request.Request" representing the -// client's request for the UntagRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagRole for more information on using the UntagRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagRoleRequest method. -// req, resp := client.UntagRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagRole -func (c *IAM) UntagRoleRequest(input *UntagRoleInput) (req *request.Request, output *UntagRoleOutput) { - op := &request.Operation{ - Name: opUntagRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagRoleInput{} - } - - output = &UntagRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagRole API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the role. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UntagRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagRole -func (c *IAM) UntagRole(input *UntagRoleInput) (*UntagRoleOutput, error) { - req, out := c.UntagRoleRequest(input) - return out, req.Send() -} - -// UntagRoleWithContext is the same as UntagRole with the addition of -// the ability to pass a context and additional request options. -// -// See UntagRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UntagRoleWithContext(ctx aws.Context, input *UntagRoleInput, opts ...request.Option) (*UntagRoleOutput, error) { - req, out := c.UntagRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagSAMLProvider = "UntagSAMLProvider" - -// UntagSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the UntagSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagSAMLProvider for more information on using the UntagSAMLProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagSAMLProviderRequest method. -// req, resp := client.UntagSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagSAMLProvider -func (c *IAM) UntagSAMLProviderRequest(input *UntagSAMLProviderInput) (req *request.Request, output *UntagSAMLProviderOutput) { - op := &request.Operation{ - Name: opUntagSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagSAMLProviderInput{} - } - - output = &UntagSAMLProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagSAMLProvider API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the specified Security Assertion Markup Language -// (SAML) identity provider in IAM. For more information about these providers, -// see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html). -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UntagSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagSAMLProvider -func (c *IAM) UntagSAMLProvider(input *UntagSAMLProviderInput) (*UntagSAMLProviderOutput, error) { - req, out := c.UntagSAMLProviderRequest(input) - return out, req.Send() -} - -// UntagSAMLProviderWithContext is the same as UntagSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See UntagSAMLProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UntagSAMLProviderWithContext(ctx aws.Context, input *UntagSAMLProviderInput, opts ...request.Option) (*UntagSAMLProviderOutput, error) { - req, out := c.UntagSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagServerCertificate = "UntagServerCertificate" - -// UntagServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UntagServerCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagServerCertificate for more information on using the UntagServerCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagServerCertificateRequest method. -// req, resp := client.UntagServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagServerCertificate -func (c *IAM) UntagServerCertificateRequest(input *UntagServerCertificateInput) (req *request.Request, output *UntagServerCertificateOutput) { - op := &request.Operation{ - Name: opUntagServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagServerCertificateInput{} - } - - output = &UntagServerCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagServerCertificate API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the IAM server certificate. For more information -// about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// For certificates in a Region supported by Certificate Manager (ACM), we recommend -// that you don't use IAM server certificates. Instead, use ACM to provision, -// manage, and deploy your server certificates. For more information about IAM -// server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UntagServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagServerCertificate -func (c *IAM) UntagServerCertificate(input *UntagServerCertificateInput) (*UntagServerCertificateOutput, error) { - req, out := c.UntagServerCertificateRequest(input) - return out, req.Send() -} - -// UntagServerCertificateWithContext is the same as UntagServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UntagServerCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UntagServerCertificateWithContext(ctx aws.Context, input *UntagServerCertificateInput, opts ...request.Option) (*UntagServerCertificateOutput, error) { - req, out := c.UntagServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagUser = "UntagUser" - -// UntagUserRequest generates a "aws/request.Request" representing the -// client's request for the UntagUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagUser for more information on using the UntagUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagUserRequest method. -// req, resp := client.UntagUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagUser -func (c *IAM) UntagUserRequest(input *UntagUserInput) (req *request.Request, output *UntagUserOutput) { - op := &request.Operation{ - Name: opUntagUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagUserInput{} - } - - output = &UntagUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagUser API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the user. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UntagUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagUser -func (c *IAM) UntagUser(input *UntagUserInput) (*UntagUserOutput, error) { - req, out := c.UntagUserRequest(input) - return out, req.Send() -} - -// UntagUserWithContext is the same as UntagUser with the addition of -// the ability to pass a context and additional request options. -// -// See UntagUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UntagUserWithContext(ctx aws.Context, input *UntagUserInput, opts ...request.Option) (*UntagUserOutput, error) { - req, out := c.UntagUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAccessKey = "UpdateAccessKey" - -// UpdateAccessKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccessKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAccessKey for more information on using the UpdateAccessKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateAccessKeyRequest method. -// req, resp := client.UpdateAccessKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey -func (c *IAM) UpdateAccessKeyRequest(input *UpdateAccessKeyInput) (req *request.Request, output *UpdateAccessKeyOutput) { - op := &request.Operation{ - Name: opUpdateAccessKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAccessKeyInput{} - } - - output = &UpdateAccessKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAccessKey API operation for AWS Identity and Access Management. -// -// Changes the status of the specified access key from Active to Inactive, or -// vice versa. This operation can be used to disable a user's key as part of -// a key rotation workflow. -// -// If the UserName is not specified, the user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request. -// If a temporary access key is used, then UserName is required. If a long-term -// key is assigned to the user, then UserName is not required. This operation -// works for access keys under the Amazon Web Services account. Consequently, -// you can use this operation to manage Amazon Web Services account root user -// credentials even if the Amazon Web Services account has no associated users. -// -// For information about rotating keys, see Managing keys and certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateAccessKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey -func (c *IAM) UpdateAccessKey(input *UpdateAccessKeyInput) (*UpdateAccessKeyOutput, error) { - req, out := c.UpdateAccessKeyRequest(input) - return out, req.Send() -} - -// UpdateAccessKeyWithContext is the same as UpdateAccessKey with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAccessKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateAccessKeyWithContext(ctx aws.Context, input *UpdateAccessKeyInput, opts ...request.Option) (*UpdateAccessKeyOutput, error) { - req, out := c.UpdateAccessKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAccountPasswordPolicy = "UpdateAccountPasswordPolicy" - -// UpdateAccountPasswordPolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccountPasswordPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAccountPasswordPolicy for more information on using the UpdateAccountPasswordPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateAccountPasswordPolicyRequest method. -// req, resp := client.UpdateAccountPasswordPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccountPasswordPolicy -func (c *IAM) UpdateAccountPasswordPolicyRequest(input *UpdateAccountPasswordPolicyInput) (req *request.Request, output *UpdateAccountPasswordPolicyOutput) { - op := &request.Operation{ - Name: opUpdateAccountPasswordPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAccountPasswordPolicyInput{} - } - - output = &UpdateAccountPasswordPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAccountPasswordPolicy API operation for AWS Identity and Access Management. -// -// Updates the password policy settings for the Amazon Web Services account. -// -// This operation does not support partial updates. No parameters are required, -// but if you do not specify a parameter, that parameter's value reverts to -// its default value. See the Request Parameters section for each parameter's -// default value. Also note that some parameters do not allow the default parameter -// to be explicitly set. Instead, to invoke the default value, do not include -// that parameter when you invoke the operation. -// -// For more information about using a password policy, see Managing an IAM password -// policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateAccountPasswordPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccountPasswordPolicy -func (c *IAM) UpdateAccountPasswordPolicy(input *UpdateAccountPasswordPolicyInput) (*UpdateAccountPasswordPolicyOutput, error) { - req, out := c.UpdateAccountPasswordPolicyRequest(input) - return out, req.Send() -} - -// UpdateAccountPasswordPolicyWithContext is the same as UpdateAccountPasswordPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAccountPasswordPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateAccountPasswordPolicyWithContext(ctx aws.Context, input *UpdateAccountPasswordPolicyInput, opts ...request.Option) (*UpdateAccountPasswordPolicyOutput, error) { - req, out := c.UpdateAccountPasswordPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAssumeRolePolicy = "UpdateAssumeRolePolicy" - -// UpdateAssumeRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAssumeRolePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateAssumeRolePolicy for more information on using the UpdateAssumeRolePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateAssumeRolePolicyRequest method. -// req, resp := client.UpdateAssumeRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAssumeRolePolicy -func (c *IAM) UpdateAssumeRolePolicyRequest(input *UpdateAssumeRolePolicyInput) (req *request.Request, output *UpdateAssumeRolePolicyOutput) { - op := &request.Operation{ - Name: opUpdateAssumeRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAssumeRolePolicyInput{} - } - - output = &UpdateAssumeRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAssumeRolePolicy API operation for AWS Identity and Access Management. -// -// Updates the policy that grants an IAM entity permission to assume a role. -// This is typically referred to as the "role trust policy". For more information -// about roles, see Using roles to delegate permissions and federate identities -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateAssumeRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAssumeRolePolicy -func (c *IAM) UpdateAssumeRolePolicy(input *UpdateAssumeRolePolicyInput) (*UpdateAssumeRolePolicyOutput, error) { - req, out := c.UpdateAssumeRolePolicyRequest(input) - return out, req.Send() -} - -// UpdateAssumeRolePolicyWithContext is the same as UpdateAssumeRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAssumeRolePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateAssumeRolePolicyWithContext(ctx aws.Context, input *UpdateAssumeRolePolicyInput, opts ...request.Option) (*UpdateAssumeRolePolicyOutput, error) { - req, out := c.UpdateAssumeRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGroup = "UpdateGroup" - -// UpdateGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateGroup for more information on using the UpdateGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateGroupRequest method. -// req, resp := client.UpdateGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateGroup -func (c *IAM) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output *UpdateGroupOutput) { - op := &request.Operation{ - Name: opUpdateGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateGroupInput{} - } - - output = &UpdateGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateGroup API operation for AWS Identity and Access Management. -// -// Updates the name and/or the path of the specified IAM group. -// -// You should understand the implications of changing a group's path or name. -// For more information, see Renaming users and groups (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html) -// in the IAM User Guide. -// -// The person making the request (the principal), must have permission to change -// the role group with the old name and the new name. For example, to change -// the group named Managers to MGRs, the principal must have a policy that allows -// them to update both groups. If the principal has permission to update the -// Managers group, but not the MGRs group, then the update fails. For more information -// about permissions, see Access management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateGroup -func (c *IAM) UpdateGroup(input *UpdateGroupInput) (*UpdateGroupOutput, error) { - req, out := c.UpdateGroupRequest(input) - return out, req.Send() -} - -// UpdateGroupWithContext is the same as UpdateGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateGroupWithContext(ctx aws.Context, input *UpdateGroupInput, opts ...request.Option) (*UpdateGroupOutput, error) { - req, out := c.UpdateGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateLoginProfile = "UpdateLoginProfile" - -// UpdateLoginProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLoginProfile operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateLoginProfile for more information on using the UpdateLoginProfile -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateLoginProfileRequest method. -// req, resp := client.UpdateLoginProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateLoginProfile -func (c *IAM) UpdateLoginProfileRequest(input *UpdateLoginProfileInput) (req *request.Request, output *UpdateLoginProfileOutput) { - op := &request.Operation{ - Name: opUpdateLoginProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateLoginProfileInput{} - } - - output = &UpdateLoginProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateLoginProfile API operation for AWS Identity and Access Management. -// -// Changes the password for the specified IAM user. You can use the CLI, the -// Amazon Web Services API, or the Users page in the IAM console to change the -// password for any IAM user. Use ChangePassword to change your own password -// in the My Security Credentials page in the Amazon Web Services Management -// Console. -// -// For more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateLoginProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodePasswordPolicyViolationException "PasswordPolicyViolation" -// The request was rejected because the provided password did not meet the requirements -// imposed by the account password policy. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateLoginProfile -func (c *IAM) UpdateLoginProfile(input *UpdateLoginProfileInput) (*UpdateLoginProfileOutput, error) { - req, out := c.UpdateLoginProfileRequest(input) - return out, req.Send() -} - -// UpdateLoginProfileWithContext is the same as UpdateLoginProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateLoginProfile for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateLoginProfileWithContext(ctx aws.Context, input *UpdateLoginProfileInput, opts ...request.Option) (*UpdateLoginProfileOutput, error) { - req, out := c.UpdateLoginProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateOpenIDConnectProviderThumbprint = "UpdateOpenIDConnectProviderThumbprint" - -// UpdateOpenIDConnectProviderThumbprintRequest generates a "aws/request.Request" representing the -// client's request for the UpdateOpenIDConnectProviderThumbprint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateOpenIDConnectProviderThumbprint for more information on using the UpdateOpenIDConnectProviderThumbprint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateOpenIDConnectProviderThumbprintRequest method. -// req, resp := client.UpdateOpenIDConnectProviderThumbprintRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateOpenIDConnectProviderThumbprint -func (c *IAM) UpdateOpenIDConnectProviderThumbprintRequest(input *UpdateOpenIDConnectProviderThumbprintInput) (req *request.Request, output *UpdateOpenIDConnectProviderThumbprintOutput) { - op := &request.Operation{ - Name: opUpdateOpenIDConnectProviderThumbprint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateOpenIDConnectProviderThumbprintInput{} - } - - output = &UpdateOpenIDConnectProviderThumbprintOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateOpenIDConnectProviderThumbprint API operation for AWS Identity and Access Management. -// -// Replaces the existing list of server certificate thumbprints associated with -// an OpenID Connect (OIDC) provider resource object with a new list of thumbprints. -// -// The list that you pass with this operation completely replaces the existing -// list of thumbprints. (The lists are not merged.) -// -// Typically, you need to update a thumbprint only when the identity provider -// certificate changes, which occurs rarely. However, if the provider's certificate -// does change, any attempt to assume an IAM role that specifies the OIDC provider -// as a principal fails until the certificate thumbprint is updated. -// -// Amazon Web Services secures communication with some OIDC identity providers -// (IdPs) through our library of trusted root certificate authorities (CAs) -// instead of using a certificate thumbprint to verify your IdP server certificate. -// In these cases, your legacy thumbprint remains in your configuration, but -// is no longer used for validation. These OIDC IdPs include Auth0, GitHub, -// GitLab, Google, and those that use an Amazon S3 bucket to host a JSON Web -// Key Set (JWKS) endpoint. -// -// Trust for the OIDC provider is derived from the provider certificate and -// is validated by the thumbprint. Therefore, it is best to limit access to -// the UpdateOpenIDConnectProviderThumbprint operation to highly privileged -// users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateOpenIDConnectProviderThumbprint for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateOpenIDConnectProviderThumbprint -func (c *IAM) UpdateOpenIDConnectProviderThumbprint(input *UpdateOpenIDConnectProviderThumbprintInput) (*UpdateOpenIDConnectProviderThumbprintOutput, error) { - req, out := c.UpdateOpenIDConnectProviderThumbprintRequest(input) - return out, req.Send() -} - -// UpdateOpenIDConnectProviderThumbprintWithContext is the same as UpdateOpenIDConnectProviderThumbprint with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateOpenIDConnectProviderThumbprint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateOpenIDConnectProviderThumbprintWithContext(ctx aws.Context, input *UpdateOpenIDConnectProviderThumbprintInput, opts ...request.Option) (*UpdateOpenIDConnectProviderThumbprintOutput, error) { - req, out := c.UpdateOpenIDConnectProviderThumbprintRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRole = "UpdateRole" - -// UpdateRoleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRole for more information on using the UpdateRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateRoleRequest method. -// req, resp := client.UpdateRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRole -func (c *IAM) UpdateRoleRequest(input *UpdateRoleInput) (req *request.Request, output *UpdateRoleOutput) { - op := &request.Operation{ - Name: opUpdateRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRoleInput{} - } - - output = &UpdateRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateRole API operation for AWS Identity and Access Management. -// -// Updates the description or maximum session duration setting of a role. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRole -func (c *IAM) UpdateRole(input *UpdateRoleInput) (*UpdateRoleOutput, error) { - req, out := c.UpdateRoleRequest(input) - return out, req.Send() -} - -// UpdateRoleWithContext is the same as UpdateRole with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateRoleWithContext(ctx aws.Context, input *UpdateRoleInput, opts ...request.Option) (*UpdateRoleOutput, error) { - req, out := c.UpdateRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRoleDescription = "UpdateRoleDescription" - -// UpdateRoleDescriptionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRoleDescription operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateRoleDescription for more information on using the UpdateRoleDescription -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateRoleDescriptionRequest method. -// req, resp := client.UpdateRoleDescriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRoleDescription -func (c *IAM) UpdateRoleDescriptionRequest(input *UpdateRoleDescriptionInput) (req *request.Request, output *UpdateRoleDescriptionOutput) { - op := &request.Operation{ - Name: opUpdateRoleDescription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRoleDescriptionInput{} - } - - output = &UpdateRoleDescriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRoleDescription API operation for AWS Identity and Access Management. -// -// Use UpdateRole instead. -// -// Modifies only the description of a role. This operation performs the same -// function as the Description parameter in the UpdateRole operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateRoleDescription for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRoleDescription -func (c *IAM) UpdateRoleDescription(input *UpdateRoleDescriptionInput) (*UpdateRoleDescriptionOutput, error) { - req, out := c.UpdateRoleDescriptionRequest(input) - return out, req.Send() -} - -// UpdateRoleDescriptionWithContext is the same as UpdateRoleDescription with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRoleDescription for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateRoleDescriptionWithContext(ctx aws.Context, input *UpdateRoleDescriptionInput, opts ...request.Option) (*UpdateRoleDescriptionOutput, error) { - req, out := c.UpdateRoleDescriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSAMLProvider = "UpdateSAMLProvider" - -// UpdateSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSAMLProvider for more information on using the UpdateSAMLProvider -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateSAMLProviderRequest method. -// req, resp := client.UpdateSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSAMLProvider -func (c *IAM) UpdateSAMLProviderRequest(input *UpdateSAMLProviderInput) (req *request.Request, output *UpdateSAMLProviderOutput) { - op := &request.Operation{ - Name: opUpdateSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSAMLProviderInput{} - } - - output = &UpdateSAMLProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSAMLProvider API operation for AWS Identity and Access Management. -// -// Updates the metadata document for an existing SAML provider resource object. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSAMLProvider -func (c *IAM) UpdateSAMLProvider(input *UpdateSAMLProviderInput) (*UpdateSAMLProviderOutput, error) { - req, out := c.UpdateSAMLProviderRequest(input) - return out, req.Send() -} - -// UpdateSAMLProviderWithContext is the same as UpdateSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSAMLProvider for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateSAMLProviderWithContext(ctx aws.Context, input *UpdateSAMLProviderInput, opts ...request.Option) (*UpdateSAMLProviderOutput, error) { - req, out := c.UpdateSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSSHPublicKey = "UpdateSSHPublicKey" - -// UpdateSSHPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSSHPublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSSHPublicKey for more information on using the UpdateSSHPublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateSSHPublicKeyRequest method. -// req, resp := client.UpdateSSHPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSSHPublicKey -func (c *IAM) UpdateSSHPublicKeyRequest(input *UpdateSSHPublicKeyInput) (req *request.Request, output *UpdateSSHPublicKeyOutput) { - op := &request.Operation{ - Name: opUpdateSSHPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSSHPublicKeyInput{} - } - - output = &UpdateSSHPublicKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateSSHPublicKey API operation for AWS Identity and Access Management. -// -// Sets the status of an IAM user's SSH public key to active or inactive. SSH -// public keys that are inactive cannot be used for authentication. This operation -// can be used to disable a user's SSH public key as part of a key rotation -// work flow. -// -// The SSH public key affected by this operation is used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information -// about using SSH keys to authenticate to an CodeCommit repository, see Set -// up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateSSHPublicKey for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSSHPublicKey -func (c *IAM) UpdateSSHPublicKey(input *UpdateSSHPublicKeyInput) (*UpdateSSHPublicKeyOutput, error) { - req, out := c.UpdateSSHPublicKeyRequest(input) - return out, req.Send() -} - -// UpdateSSHPublicKeyWithContext is the same as UpdateSSHPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSSHPublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateSSHPublicKeyWithContext(ctx aws.Context, input *UpdateSSHPublicKeyInput, opts ...request.Option) (*UpdateSSHPublicKeyOutput, error) { - req, out := c.UpdateSSHPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateServerCertificate = "UpdateServerCertificate" - -// UpdateServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateServerCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateServerCertificate for more information on using the UpdateServerCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateServerCertificateRequest method. -// req, resp := client.UpdateServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServerCertificate -func (c *IAM) UpdateServerCertificateRequest(input *UpdateServerCertificateInput) (req *request.Request, output *UpdateServerCertificateOutput) { - op := &request.Operation{ - Name: opUpdateServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServerCertificateInput{} - } - - output = &UpdateServerCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateServerCertificate API operation for AWS Identity and Access Management. -// -// Updates the name and/or the path of the specified server certificate stored -// in IAM. -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// You should understand the implications of changing a server certificate's -// path or name. For more information, see Renaming a server certificate (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts) -// in the IAM User Guide. -// -// The person making the request (the principal), must have permission to change -// the server certificate with the old name and the new name. For example, to -// change the certificate named ProductionCert to ProdCert, the principal must -// have a policy that allows them to update both certificates. If the principal -// has permission to update the ProductionCert group, but not the ProdCert certificate, -// then the update fails. For more information about permissions, see Access -// management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServerCertificate -func (c *IAM) UpdateServerCertificate(input *UpdateServerCertificateInput) (*UpdateServerCertificateOutput, error) { - req, out := c.UpdateServerCertificateRequest(input) - return out, req.Send() -} - -// UpdateServerCertificateWithContext is the same as UpdateServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateServerCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateServerCertificateWithContext(ctx aws.Context, input *UpdateServerCertificateInput, opts ...request.Option) (*UpdateServerCertificateOutput, error) { - req, out := c.UpdateServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateServiceSpecificCredential = "UpdateServiceSpecificCredential" - -// UpdateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the -// client's request for the UpdateServiceSpecificCredential operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateServiceSpecificCredential for more information on using the UpdateServiceSpecificCredential -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateServiceSpecificCredentialRequest method. -// req, resp := client.UpdateServiceSpecificCredentialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServiceSpecificCredential -func (c *IAM) UpdateServiceSpecificCredentialRequest(input *UpdateServiceSpecificCredentialInput) (req *request.Request, output *UpdateServiceSpecificCredentialOutput) { - op := &request.Operation{ - Name: opUpdateServiceSpecificCredential, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServiceSpecificCredentialInput{} - } - - output = &UpdateServiceSpecificCredentialOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateServiceSpecificCredential API operation for AWS Identity and Access Management. -// -// Sets the status of a service-specific credential to Active or Inactive. Service-specific -// credentials that are inactive cannot be used for authentication to the service. -// This operation can be used to disable a user's service-specific credential -// as part of a credential rotation work flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateServiceSpecificCredential for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServiceSpecificCredential -func (c *IAM) UpdateServiceSpecificCredential(input *UpdateServiceSpecificCredentialInput) (*UpdateServiceSpecificCredentialOutput, error) { - req, out := c.UpdateServiceSpecificCredentialRequest(input) - return out, req.Send() -} - -// UpdateServiceSpecificCredentialWithContext is the same as UpdateServiceSpecificCredential with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateServiceSpecificCredential for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateServiceSpecificCredentialWithContext(ctx aws.Context, input *UpdateServiceSpecificCredentialInput, opts ...request.Option) (*UpdateServiceSpecificCredentialOutput, error) { - req, out := c.UpdateServiceSpecificCredentialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSigningCertificate = "UpdateSigningCertificate" - -// UpdateSigningCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSigningCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateSigningCertificate for more information on using the UpdateSigningCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateSigningCertificateRequest method. -// req, resp := client.UpdateSigningCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSigningCertificate -func (c *IAM) UpdateSigningCertificateRequest(input *UpdateSigningCertificateInput) (req *request.Request, output *UpdateSigningCertificateOutput) { - op := &request.Operation{ - Name: opUpdateSigningCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSigningCertificateInput{} - } - - output = &UpdateSigningCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateSigningCertificate API operation for AWS Identity and Access Management. -// -// Changes the status of the specified user signing certificate from active -// to disabled, or vice versa. This operation can be used to disable an IAM -// user's signing certificate as part of a certificate rotation work flow. -// -// If the UserName field is not specified, the user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request. -// This operation works for access keys under the Amazon Web Services account. -// Consequently, you can use this operation to manage Amazon Web Services account -// root user credentials even if the Amazon Web Services account has no associated -// users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateSigningCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSigningCertificate -func (c *IAM) UpdateSigningCertificate(input *UpdateSigningCertificateInput) (*UpdateSigningCertificateOutput, error) { - req, out := c.UpdateSigningCertificateRequest(input) - return out, req.Send() -} - -// UpdateSigningCertificateWithContext is the same as UpdateSigningCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSigningCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateSigningCertificateWithContext(ctx aws.Context, input *UpdateSigningCertificateInput, opts ...request.Option) (*UpdateSigningCertificateOutput, error) { - req, out := c.UpdateSigningCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUser = "UpdateUser" - -// UpdateUserRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUser operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateUser for more information on using the UpdateUser -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateUserRequest method. -// req, resp := client.UpdateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateUser -func (c *IAM) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, output *UpdateUserOutput) { - op := &request.Operation{ - Name: opUpdateUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserInput{} - } - - output = &UpdateUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateUser API operation for AWS Identity and Access Management. -// -// Updates the name and/or the path of the specified IAM user. -// -// You should understand the implications of changing an IAM user's path or -// name. For more information, see Renaming an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming) -// and Renaming an IAM group (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html) -// in the IAM User Guide. -// -// To change a user name, the requester must have appropriate permissions on -// both the source object and the target object. For example, to change Bob -// to Robert, the entity making the request must have permission on Bob and -// Robert, or must have permission on all (*). For more information about permissions, -// see Permissions and policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateUser -func (c *IAM) UpdateUser(input *UpdateUserInput) (*UpdateUserOutput, error) { - req, out := c.UpdateUserRequest(input) - return out, req.Send() -} - -// UpdateUserWithContext is the same as UpdateUser with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUser for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInput, opts ...request.Option) (*UpdateUserOutput, error) { - req, out := c.UpdateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadSSHPublicKey = "UploadSSHPublicKey" - -// UploadSSHPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the UploadSSHPublicKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UploadSSHPublicKey for more information on using the UploadSSHPublicKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UploadSSHPublicKeyRequest method. -// req, resp := client.UploadSSHPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSSHPublicKey -func (c *IAM) UploadSSHPublicKeyRequest(input *UploadSSHPublicKeyInput) (req *request.Request, output *UploadSSHPublicKeyOutput) { - op := &request.Operation{ - Name: opUploadSSHPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UploadSSHPublicKeyInput{} - } - - output = &UploadSSHPublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadSSHPublicKey API operation for AWS Identity and Access Management. -// -// Uploads an SSH public key and associates it with the specified IAM user. -// -// The SSH public key uploaded by this operation can be used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information -// about using SSH keys to authenticate to an CodeCommit repository, see Set -// up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UploadSSHPublicKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidPublicKeyException "InvalidPublicKey" -// The request was rejected because the public key is malformed or otherwise -// invalid. -// -// - ErrCodeDuplicateSSHPublicKeyException "DuplicateSSHPublicKey" -// The request was rejected because the SSH public key is already associated -// with the specified IAM user. -// -// - ErrCodeUnrecognizedPublicKeyEncodingException "UnrecognizedPublicKeyEncoding" -// The request was rejected because the public key encoding format is unsupported -// or unrecognized. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSSHPublicKey -func (c *IAM) UploadSSHPublicKey(input *UploadSSHPublicKeyInput) (*UploadSSHPublicKeyOutput, error) { - req, out := c.UploadSSHPublicKeyRequest(input) - return out, req.Send() -} - -// UploadSSHPublicKeyWithContext is the same as UploadSSHPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See UploadSSHPublicKey for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UploadSSHPublicKeyWithContext(ctx aws.Context, input *UploadSSHPublicKeyInput, opts ...request.Option) (*UploadSSHPublicKeyOutput, error) { - req, out := c.UploadSSHPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadServerCertificate = "UploadServerCertificate" - -// UploadServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UploadServerCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UploadServerCertificate for more information on using the UploadServerCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UploadServerCertificateRequest method. -// req, resp := client.UploadServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadServerCertificate -func (c *IAM) UploadServerCertificateRequest(input *UploadServerCertificateInput) (req *request.Request, output *UploadServerCertificateOutput) { - op := &request.Operation{ - Name: opUploadServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UploadServerCertificateInput{} - } - - output = &UploadServerCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadServerCertificate API operation for AWS Identity and Access Management. -// -// Uploads a server certificate entity for the Amazon Web Services account. -// The server certificate entity includes a public key certificate, a private -// key, and an optional certificate chain, which should all be PEM-encoded. -// -// We recommend that you use Certificate Manager (https://docs.aws.amazon.com/acm/) -// to provision, manage, and deploy your server certificates. With ACM you can -// request a certificate, deploy it to Amazon Web Services resources, and let -// ACM handle certificate renewals for you. Certificates provided by ACM are -// free. For more information about using ACM, see the Certificate Manager User -// Guide (https://docs.aws.amazon.com/acm/latest/userguide/). -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// For information about the number of server certificates you can upload, see -// IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Because the body of the public key certificate, private key, and the certificate -// chain can be large, you should use POST rather than GET when calling UploadServerCertificate. -// For information about setting up signatures and authorization through the -// API, see Signing Amazon Web Services API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) -// in the Amazon Web Services General Reference. For general information about -// using the Query API with IAM, see Calling the API by making HTTP query requests -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/programming.html) in the -// IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UploadServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeMalformedCertificateException "MalformedCertificate" -// The request was rejected because the certificate was malformed or expired. -// The error message describes the specific error. -// -// - ErrCodeKeyPairMismatchException "KeyPairMismatch" -// The request was rejected because the public key certificate and the private -// key do not match. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadServerCertificate -func (c *IAM) UploadServerCertificate(input *UploadServerCertificateInput) (*UploadServerCertificateOutput, error) { - req, out := c.UploadServerCertificateRequest(input) - return out, req.Send() -} - -// UploadServerCertificateWithContext is the same as UploadServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UploadServerCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UploadServerCertificateWithContext(ctx aws.Context, input *UploadServerCertificateInput, opts ...request.Option) (*UploadServerCertificateOutput, error) { - req, out := c.UploadServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadSigningCertificate = "UploadSigningCertificate" - -// UploadSigningCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UploadSigningCertificate operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UploadSigningCertificate for more information on using the UploadSigningCertificate -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UploadSigningCertificateRequest method. -// req, resp := client.UploadSigningCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSigningCertificate -func (c *IAM) UploadSigningCertificateRequest(input *UploadSigningCertificateInput) (req *request.Request, output *UploadSigningCertificateOutput) { - op := &request.Operation{ - Name: opUploadSigningCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UploadSigningCertificateInput{} - } - - output = &UploadSigningCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadSigningCertificate API operation for AWS Identity and Access Management. -// -// Uploads an X.509 signing certificate and associates it with the specified -// IAM user. Some Amazon Web Services services require you to use certificates -// to validate requests that are signed with a corresponding private key. When -// you upload the certificate, its default status is Active. -// -// For information about when you would use an X.509 signing certificate, see -// Managing server certificates in IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. -// -// If the UserName is not specified, the IAM user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request. -// This operation works for access keys under the Amazon Web Services account. -// Consequently, you can use this operation to manage Amazon Web Services account -// root user credentials even if the Amazon Web Services account has no associated -// users. -// -// Because the body of an X.509 certificate can be large, you should use POST -// rather than GET when calling UploadSigningCertificate. For information about -// setting up signatures and authorization through the API, see Signing Amazon -// Web Services API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) -// in the Amazon Web Services General Reference. For general information about -// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UploadSigningCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeMalformedCertificateException "MalformedCertificate" -// The request was rejected because the certificate was malformed or expired. -// The error message describes the specific error. -// -// - ErrCodeInvalidCertificateException "InvalidCertificate" -// The request was rejected because the certificate is invalid. -// -// - ErrCodeDuplicateCertificateException "DuplicateCertificate" -// The request was rejected because the same certificate is associated with -// an IAM user in the account. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSigningCertificate -func (c *IAM) UploadSigningCertificate(input *UploadSigningCertificateInput) (*UploadSigningCertificateOutput, error) { - req, out := c.UploadSigningCertificateRequest(input) - return out, req.Send() -} - -// UploadSigningCertificateWithContext is the same as UploadSigningCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UploadSigningCertificate for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) UploadSigningCertificateWithContext(ctx aws.Context, input *UploadSigningCertificateInput, opts ...request.Option) (*UploadSigningCertificateOutput, error) { - req, out := c.UploadSigningCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// An object that contains details about when a principal in the reported Organizations -// entity last attempted to access an Amazon Web Services service. A principal -// can be an IAM user, an IAM role, or the Amazon Web Services account root -// user within the reported Organizations entity. -// -// This data type is a response element in the GetOrganizationsAccessReport -// operation. -type AccessDetail struct { - _ struct{} `type:"structure"` - - // The path of the Organizations entity (root, organizational unit, or account) - // from which an authenticated principal last attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no principals (IAM users, IAM roles, or root user) - // in the reported Organizations entity attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - EntityPath *string `min:"19" type:"string"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when an authenticated principal most recently attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no principals in the reported Organizations entity - // attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticatedTime *time.Time `type:"timestamp"` - - // The Region where the last service access attempt occurred. - // - // This field is null if no principals in the reported Organizations entity - // attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - Region *string `type:"string"` - - // The name of the service in which access was attempted. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The namespace of the service in which access was attempted. - // - // To learn the service namespace of a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to - // view details for that service. In the first paragraph, find the service prefix. - // For example, (service prefix: a4b). For more information about service namespaces, - // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `min:"1" type:"string" required:"true"` - - // The number of accounts with authenticated principals (root user, IAM users, - // and IAM roles) that attempted to access the service in the tracking period. - TotalAuthenticatedEntities *int64 `type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDetail) GoString() string { - return s.String() -} - -// SetEntityPath sets the EntityPath field's value. -func (s *AccessDetail) SetEntityPath(v string) *AccessDetail { - s.EntityPath = &v - return s -} - -// SetLastAuthenticatedTime sets the LastAuthenticatedTime field's value. -func (s *AccessDetail) SetLastAuthenticatedTime(v time.Time) *AccessDetail { - s.LastAuthenticatedTime = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *AccessDetail) SetRegion(v string) *AccessDetail { - s.Region = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *AccessDetail) SetServiceName(v string) *AccessDetail { - s.ServiceName = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *AccessDetail) SetServiceNamespace(v string) *AccessDetail { - s.ServiceNamespace = &v - return s -} - -// SetTotalAuthenticatedEntities sets the TotalAuthenticatedEntities field's value. -func (s *AccessDetail) SetTotalAuthenticatedEntities(v int64) *AccessDetail { - s.TotalAuthenticatedEntities = &v - return s -} - -// Contains information about an Amazon Web Services access key. -// -// This data type is used as a response element in the CreateAccessKey and ListAccessKeys -// operations. -// -// The SecretAccessKey value is returned only in response to CreateAccessKey. -// You can get a secret access key only when you first create an access key; -// you cannot recover the secret access key later. If you lose a secret access -// key, you must create a new access key. -type AccessKey struct { - _ struct{} `type:"structure"` - - // The ID for this access key. - // - // AccessKeyId is a required field - AccessKeyId *string `min:"16" type:"string" required:"true"` - - // The date when the access key was created. - CreateDate *time.Time `type:"timestamp"` - - // The secret key used to sign requests. - // - // SecretAccessKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by AccessKey's - // String and GoString methods. - // - // SecretAccessKey is a required field - SecretAccessKey *string `type:"string" required:"true" sensitive:"true"` - - // The status of the access key. Active means that the key is valid for API - // calls, while Inactive means it is not. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user that the access key is associated with. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKey) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *AccessKey) SetAccessKeyId(v string) *AccessKey { - s.AccessKeyId = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *AccessKey) SetCreateDate(v time.Time) *AccessKey { - s.CreateDate = &v - return s -} - -// SetSecretAccessKey sets the SecretAccessKey field's value. -func (s *AccessKey) SetSecretAccessKey(v string) *AccessKey { - s.SecretAccessKey = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AccessKey) SetStatus(v string) *AccessKey { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AccessKey) SetUserName(v string) *AccessKey { - s.UserName = &v - return s -} - -// Contains information about the last time an Amazon Web Services access key -// was used since IAM began tracking this information on April 22, 2015. -// -// This data type is used as a response element in the GetAccessKeyLastUsed -// operation. -type AccessKeyLastUsed struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the access key was most recently used. This field is null in the following - // situations: - // - // * The user does not have an access key. - // - // * An access key exists but has not been used since IAM began tracking - // this information. - // - // * There is no sign-in data associated with the user. - // - // LastUsedDate is a required field - LastUsedDate *time.Time `type:"timestamp" required:"true"` - - // The Amazon Web Services Region where this access key was most recently used. - // The value for this field is "N/A" in the following situations: - // - // * The user does not have an access key. - // - // * An access key exists but has not been used since IAM began tracking - // this information. - // - // * There is no sign-in data associated with the user. - // - // For more information about Amazon Web Services Regions, see Regions and endpoints - // (https://docs.aws.amazon.com/general/latest/gr/rande.html) in the Amazon - // Web Services General Reference. - // - // Region is a required field - Region *string `type:"string" required:"true"` - - // The name of the Amazon Web Services service with which this access key was - // most recently used. The value of this field is "N/A" in the following situations: - // - // * The user does not have an access key. - // - // * An access key exists but has not been used since IAM started tracking - // this information. - // - // * There is no sign-in data associated with the user. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKeyLastUsed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKeyLastUsed) GoString() string { - return s.String() -} - -// SetLastUsedDate sets the LastUsedDate field's value. -func (s *AccessKeyLastUsed) SetLastUsedDate(v time.Time) *AccessKeyLastUsed { - s.LastUsedDate = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *AccessKeyLastUsed) SetRegion(v string) *AccessKeyLastUsed { - s.Region = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *AccessKeyLastUsed) SetServiceName(v string) *AccessKeyLastUsed { - s.ServiceName = &v - return s -} - -// Contains information about an Amazon Web Services access key, without its -// secret key. -// -// This data type is used as a response element in the ListAccessKeys operation. -type AccessKeyMetadata struct { - _ struct{} `type:"structure"` - - // The ID for this access key. - AccessKeyId *string `min:"16" type:"string"` - - // The date when the access key was created. - CreateDate *time.Time `type:"timestamp"` - - // The status of the access key. Active means that the key is valid for API - // calls; Inactive means it is not. - Status *string `type:"string" enum:"StatusType"` - - // The name of the IAM user that the key is associated with. - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKeyMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKeyMetadata) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *AccessKeyMetadata) SetAccessKeyId(v string) *AccessKeyMetadata { - s.AccessKeyId = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *AccessKeyMetadata) SetCreateDate(v time.Time) *AccessKeyMetadata { - s.CreateDate = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AccessKeyMetadata) SetStatus(v string) *AccessKeyMetadata { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AccessKeyMetadata) SetUserName(v string) *AccessKeyMetadata { - s.UserName = &v - return s -} - -type AddClientIDToOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The client ID (also known as audience) to add to the IAM OpenID Connect provider - // resource. - // - // ClientID is a required field - ClientID *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider - // resource to add the client ID to. You can get a list of OIDC provider ARNs - // by using the ListOpenIDConnectProviders operation. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddClientIDToOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddClientIDToOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddClientIDToOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddClientIDToOpenIDConnectProviderInput"} - if s.ClientID == nil { - invalidParams.Add(request.NewErrParamRequired("ClientID")) - } - if s.ClientID != nil && len(*s.ClientID) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientID", 1)) - } - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientID sets the ClientID field's value. -func (s *AddClientIDToOpenIDConnectProviderInput) SetClientID(v string) *AddClientIDToOpenIDConnectProviderInput { - s.ClientID = &v - return s -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *AddClientIDToOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *AddClientIDToOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -type AddClientIDToOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddClientIDToOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddClientIDToOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type AddRoleToInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The name of the role to add. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddRoleToInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddRoleToInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddRoleToInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddRoleToInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *AddRoleToInstanceProfileInput) SetInstanceProfileName(v string) *AddRoleToInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *AddRoleToInstanceProfileInput) SetRoleName(v string) *AddRoleToInstanceProfileInput { - s.RoleName = &v - return s -} - -type AddRoleToInstanceProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddRoleToInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddRoleToInstanceProfileOutput) GoString() string { - return s.String() -} - -type AddUserToGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The name of the user to add. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddUserToGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddUserToGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddUserToGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddUserToGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *AddUserToGroupInput) SetGroupName(v string) *AddUserToGroupInput { - s.GroupName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AddUserToGroupInput) SetUserName(v string) *AddUserToGroupInput { - s.UserName = &v - return s -} - -type AddUserToGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddUserToGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddUserToGroupOutput) GoString() string { - return s.String() -} - -type AttachGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the group to attach the policy to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *AttachGroupPolicyInput) SetGroupName(v string) *AttachGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *AttachGroupPolicyInput) SetPolicyArn(v string) *AttachGroupPolicyInput { - s.PolicyArn = &v - return s -} - -type AttachGroupPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachGroupPolicyOutput) GoString() string { - return s.String() -} - -type AttachRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the role to attach the policy to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachRolePolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *AttachRolePolicyInput) SetPolicyArn(v string) *AttachRolePolicyInput { - s.PolicyArn = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *AttachRolePolicyInput) SetRoleName(v string) *AttachRolePolicyInput { - s.RoleName = &v - return s -} - -type AttachRolePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachRolePolicyOutput) GoString() string { - return s.String() -} - -type AttachUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM user to attach the policy to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachUserPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *AttachUserPolicyInput) SetPolicyArn(v string) *AttachUserPolicyInput { - s.PolicyArn = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AttachUserPolicyInput) SetUserName(v string) *AttachUserPolicyInput { - s.UserName = &v - return s -} - -type AttachUserPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachUserPolicyOutput) GoString() string { - return s.String() -} - -// Contains information about an attached permissions boundary. -// -// An attached permissions boundary is a managed policy that has been attached -// to a user or role to set the permissions boundary. -// -// For more information about permissions boundaries, see Permissions boundaries -// for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) -// in the IAM User Guide. -type AttachedPermissionsBoundary struct { - _ struct{} `type:"structure"` - - // The ARN of the policy used to set the permissions boundary for the user or - // role. - PermissionsBoundaryArn *string `min:"20" type:"string"` - - // The permissions boundary usage type that indicates what type of IAM resource - // is used as the permissions boundary for an entity. This data type can only - // have a value of Policy. - PermissionsBoundaryType *string `type:"string" enum:"PermissionsBoundaryAttachmentType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachedPermissionsBoundary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachedPermissionsBoundary) GoString() string { - return s.String() -} - -// SetPermissionsBoundaryArn sets the PermissionsBoundaryArn field's value. -func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryArn(v string) *AttachedPermissionsBoundary { - s.PermissionsBoundaryArn = &v - return s -} - -// SetPermissionsBoundaryType sets the PermissionsBoundaryType field's value. -func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryType(v string) *AttachedPermissionsBoundary { - s.PermissionsBoundaryType = &v - return s -} - -// Contains information about an attached policy. -// -// An attached policy is a managed policy that has been attached to a user, -// group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, -// ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails -// operations. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type AttachedPolicy struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - PolicyArn *string `min:"20" type:"string"` - - // The friendly name of the attached policy. - PolicyName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachedPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachedPolicy) GoString() string { - return s.String() -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *AttachedPolicy) SetPolicyArn(v string) *AttachedPolicy { - s.PolicyArn = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *AttachedPolicy) SetPolicyName(v string) *AttachedPolicy { - s.PolicyName = &v - return s -} - -type ChangePasswordInput struct { - _ struct{} `type:"structure"` - - // The new password. The new password must conform to the Amazon Web Services - // account's password policy, if one exists. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of characters. That string can include almost - // any printable ASCII character from the space (\u0020) through the end of - // the ASCII character range (\u00FF). You can also include the tab (\u0009), - // line feed (\u000A), and carriage return (\u000D) characters. Any of these - // characters are valid in a password. However, many tools, such as the Amazon - // Web Services Management Console, might restrict the ability to type certain - // characters because they have special meaning within that tool. - // - // NewPassword is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by ChangePasswordInput's - // String and GoString methods. - // - // NewPassword is a required field - NewPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The IAM user's current password. - // - // OldPassword is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by ChangePasswordInput's - // String and GoString methods. - // - // OldPassword is a required field - OldPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ChangePasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ChangePasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangePasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangePasswordInput"} - if s.NewPassword == nil { - invalidParams.Add(request.NewErrParamRequired("NewPassword")) - } - if s.NewPassword != nil && len(*s.NewPassword) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPassword", 1)) - } - if s.OldPassword == nil { - invalidParams.Add(request.NewErrParamRequired("OldPassword")) - } - if s.OldPassword != nil && len(*s.OldPassword) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OldPassword", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewPassword sets the NewPassword field's value. -func (s *ChangePasswordInput) SetNewPassword(v string) *ChangePasswordInput { - s.NewPassword = &v - return s -} - -// SetOldPassword sets the OldPassword field's value. -func (s *ChangePasswordInput) SetOldPassword(v string) *ChangePasswordInput { - s.OldPassword = &v - return s -} - -type ChangePasswordOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ChangePasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ChangePasswordOutput) GoString() string { - return s.String() -} - -// Contains information about a condition context key. It includes the name -// of the key and specifies the value (or values, if the context key supports -// multiple values) to use in the simulation. This information is used when -// evaluating the Condition elements of the input policies. -// -// This data type is used as an input parameter to SimulateCustomPolicy and -// SimulatePrincipalPolicy. -type ContextEntry struct { - _ struct{} `type:"structure"` - - // The full name of a condition context key, including the service prefix. For - // example, aws:SourceIp or s3:VersionId. - ContextKeyName *string `min:"5" type:"string"` - - // The data type of the value (or values) specified in the ContextKeyValues - // parameter. - ContextKeyType *string `type:"string" enum:"ContextKeyTypeEnum"` - - // The value (or values, if the condition context key supports multiple values) - // to provide to the simulation when the key is referenced by a Condition element - // in an input policy. - ContextKeyValues []*string `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContextEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContextEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContextEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContextEntry"} - if s.ContextKeyName != nil && len(*s.ContextKeyName) < 5 { - invalidParams.Add(request.NewErrParamMinLen("ContextKeyName", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContextKeyName sets the ContextKeyName field's value. -func (s *ContextEntry) SetContextKeyName(v string) *ContextEntry { - s.ContextKeyName = &v - return s -} - -// SetContextKeyType sets the ContextKeyType field's value. -func (s *ContextEntry) SetContextKeyType(v string) *ContextEntry { - s.ContextKeyType = &v - return s -} - -// SetContextKeyValues sets the ContextKeyValues field's value. -func (s *ContextEntry) SetContextKeyValues(v []*string) *ContextEntry { - s.ContextKeyValues = v - return s -} - -type CreateAccessKeyInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM user that the new key will belong to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAccessKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAccessKeyInput"} - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *CreateAccessKeyInput) SetUserName(v string) *CreateAccessKeyInput { - s.UserName = &v - return s -} - -// Contains the response to a successful CreateAccessKey request. -type CreateAccessKeyOutput struct { - _ struct{} `type:"structure"` - - // A structure with details about the access key. - // - // AccessKey is a required field - AccessKey *AccessKey `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessKeyOutput) GoString() string { - return s.String() -} - -// SetAccessKey sets the AccessKey field's value. -func (s *CreateAccessKeyOutput) SetAccessKey(v *AccessKey) *CreateAccessKeyOutput { - s.AccessKey = v - return s -} - -type CreateAccountAliasInput struct { - _ struct{} `type:"structure"` - - // The account alias to create. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of lowercase letters, digits, and dashes. - // You cannot start or finish with a dash, nor can you have two dashes in a - // row. - // - // AccountAlias is a required field - AccountAlias *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccountAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccountAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAccountAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAccountAliasInput"} - if s.AccountAlias == nil { - invalidParams.Add(request.NewErrParamRequired("AccountAlias")) - } - if s.AccountAlias != nil && len(*s.AccountAlias) < 3 { - invalidParams.Add(request.NewErrParamMinLen("AccountAlias", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountAlias sets the AccountAlias field's value. -func (s *CreateAccountAliasInput) SetAccountAlias(v string) *CreateAccountAliasInput { - s.AccountAlias = &v - return s -} - -type CreateAccountAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccountAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccountAliasOutput) GoString() string { - return s.String() -} - -type CreateGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group to create. Do not include the path in this value. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The path to the group. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *CreateGroupInput) SetGroupName(v string) *CreateGroupInput { - s.GroupName = &v - return s -} - -// SetPath sets the Path field's value. -func (s *CreateGroupInput) SetPath(v string) *CreateGroupInput { - s.Path = &v - return s -} - -// Contains the response to a successful CreateGroup request. -type CreateGroupOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new group. - // - // Group is a required field - Group *Group `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateGroupOutput) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *CreateGroupOutput) SetGroup(v *Group) *CreateGroupOutput { - s.Group = v - return s -} - -type CreateInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to create. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The path to the instance profile. For more information about paths, see IAM - // Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` - - // A list of tags that you want to attach to the newly created IAM instance - // profile. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *CreateInstanceProfileInput) SetInstanceProfileName(v string) *CreateInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetPath sets the Path field's value. -func (s *CreateInstanceProfileInput) SetPath(v string) *CreateInstanceProfileInput { - s.Path = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateInstanceProfileInput) SetTags(v []*Tag) *CreateInstanceProfileInput { - s.Tags = v - return s -} - -// Contains the response to a successful CreateInstanceProfile request. -type CreateInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new instance profile. - // - // InstanceProfile is a required field - InstanceProfile *InstanceProfile `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *CreateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *CreateInstanceProfileOutput { - s.InstanceProfile = v - return s -} - -type CreateLoginProfileInput struct { - _ struct{} `type:"structure"` - - // The new password for the user. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of characters. That string can include almost - // any printable ASCII character from the space (\u0020) through the end of - // the ASCII character range (\u00FF). You can also include the tab (\u0009), - // line feed (\u000A), and carriage return (\u000D) characters. Any of these - // characters are valid in a password. However, many tools, such as the Amazon - // Web Services Management Console, might restrict the ability to type certain - // characters because they have special meaning within that tool. - // - // Password is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CreateLoginProfileInput's - // String and GoString methods. - // - // Password is a required field - Password *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // Specifies whether the user is required to set a new password on next sign-in. - PasswordResetRequired *bool `type:"boolean"` - - // The name of the IAM user to create a password for. The user must already - // exist. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLoginProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLoginProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoginProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoginProfileInput"} - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Password", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPassword sets the Password field's value. -func (s *CreateLoginProfileInput) SetPassword(v string) *CreateLoginProfileInput { - s.Password = &v - return s -} - -// SetPasswordResetRequired sets the PasswordResetRequired field's value. -func (s *CreateLoginProfileInput) SetPasswordResetRequired(v bool) *CreateLoginProfileInput { - s.PasswordResetRequired = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *CreateLoginProfileInput) SetUserName(v string) *CreateLoginProfileInput { - s.UserName = &v - return s -} - -// Contains the response to a successful CreateLoginProfile request. -type CreateLoginProfileOutput struct { - _ struct{} `type:"structure"` - - // A structure containing the user name and password create date. - // - // LoginProfile is a required field - LoginProfile *LoginProfile `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLoginProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLoginProfileOutput) GoString() string { - return s.String() -} - -// SetLoginProfile sets the LoginProfile field's value. -func (s *CreateLoginProfileOutput) SetLoginProfile(v *LoginProfile) *CreateLoginProfileOutput { - s.LoginProfile = v - return s -} - -type CreateOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // Provides a list of client IDs, also known as audiences. When a mobile or - // web app registers with an OpenID Connect provider, they establish a value - // that identifies the application. This is the value that's sent as the client_id - // parameter on OAuth requests. - // - // You can register multiple client IDs with the same provider. For example, - // you might have multiple applications that use the same OIDC provider. You - // cannot register more than 100 client IDs with a single IAM OIDC provider. - // - // There is no defined format for a client ID. The CreateOpenIDConnectProviderRequest - // operation accepts client IDs up to 255 characters long. - ClientIDList []*string `type:"list"` - - // A list of tags that you want to attach to the new IAM OpenID Connect (OIDC) - // provider. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` - - // A list of server certificate thumbprints for the OpenID Connect (OIDC) identity - // provider's server certificates. Typically this list includes only one entry. - // However, IAM lets you have up to five thumbprints for an OIDC provider. This - // lets you maintain multiple thumbprints if the identity provider is rotating - // certificates. - // - // The server certificate thumbprint is the hex-encoded SHA-1 hash value of - // the X.509 certificate used by the domain where the OpenID Connect provider - // makes its keys available. It is always a 40-character string. - // - // You must provide at least one thumbprint when creating an IAM OIDC provider. - // For example, assume that the OIDC provider is server.example.com and the - // provider stores its keys at https://keys.server.example.com/openid-connect. - // In that case, the thumbprint string would be the hex-encoded SHA-1 hash value - // of the certificate used by https://keys.server.example.com. - // - // For more information about obtaining the OIDC provider thumbprint, see Obtaining - // the thumbprint for an OpenID Connect provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html) - // in the IAM user Guide. - // - // ThumbprintList is a required field - ThumbprintList []*string `type:"list" required:"true"` - - // The URL of the identity provider. The URL must begin with https:// and should - // correspond to the iss claim in the provider's OpenID Connect ID tokens. Per - // the OIDC standard, path components are allowed but query parameters are not. - // Typically the URL consists of only a hostname, like https://server.example.org - // or https://example.com. The URL should not contain a port number. - // - // You cannot register the same provider multiple times in a single Amazon Web - // Services account. If you try to submit a URL that has already been used for - // an OpenID Connect provider in the Amazon Web Services account, you will get - // an error. - // - // Url is a required field - Url *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOpenIDConnectProviderInput"} - if s.ThumbprintList == nil { - invalidParams.Add(request.NewErrParamRequired("ThumbprintList")) - } - if s.Url == nil { - invalidParams.Add(request.NewErrParamRequired("Url")) - } - if s.Url != nil && len(*s.Url) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Url", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientIDList sets the ClientIDList field's value. -func (s *CreateOpenIDConnectProviderInput) SetClientIDList(v []*string) *CreateOpenIDConnectProviderInput { - s.ClientIDList = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateOpenIDConnectProviderInput) SetTags(v []*Tag) *CreateOpenIDConnectProviderInput { - s.Tags = v - return s -} - -// SetThumbprintList sets the ThumbprintList field's value. -func (s *CreateOpenIDConnectProviderInput) SetThumbprintList(v []*string) *CreateOpenIDConnectProviderInput { - s.ThumbprintList = v - return s -} - -// SetUrl sets the Url field's value. -func (s *CreateOpenIDConnectProviderInput) SetUrl(v string) *CreateOpenIDConnectProviderInput { - s.Url = &v - return s -} - -// Contains the response to a successful CreateOpenIDConnectProvider request. -type CreateOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the new IAM OpenID Connect provider that - // is created. For more information, see OpenIDConnectProviderListEntry. - OpenIDConnectProviderArn *string `min:"20" type:"string"` - - // A list of tags that are attached to the new IAM OIDC provider. The returned - // list of tags is sorted by tag key. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *CreateOpenIDConnectProviderOutput) SetOpenIDConnectProviderArn(v string) *CreateOpenIDConnectProviderOutput { - s.OpenIDConnectProviderArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateOpenIDConnectProviderOutput) SetTags(v []*Tag) *CreateOpenIDConnectProviderOutput { - s.Tags = v - return s -} - -type CreatePolicyInput struct { - _ struct{} `type:"structure"` - - // A friendly description of the policy. - // - // Typically used to store information about the permissions defined in the - // policy. For example, "Grants access to production DynamoDB tables." - // - // The policy description is immutable. After a value is assigned, it cannot - // be changed. - Description *string `type:"string"` - - // The path for the policy. - // - // For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - // - // You cannot use an asterisk (*) in the path name. - Path *string `min:"1" type:"string"` - - // The JSON policy document that you want to use as the content for the new - // policy. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // To learn more about JSON policy grammar, see Grammar of the IAM JSON policy - // language (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html) - // in the IAM User Guide. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The friendly name of the policy. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // A list of tags that you want to attach to the new IAM customer managed policy. - // Each tag consists of a key name and an associated value. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePolicyInput"} - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CreatePolicyInput) SetDescription(v string) *CreatePolicyInput { - s.Description = &v - return s -} - -// SetPath sets the Path field's value. -func (s *CreatePolicyInput) SetPath(v string) *CreatePolicyInput { - s.Path = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreatePolicyInput) SetPolicyDocument(v string) *CreatePolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreatePolicyInput) SetPolicyName(v string) *CreatePolicyInput { - s.PolicyName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreatePolicyInput) SetTags(v []*Tag) *CreatePolicyInput { - s.Tags = v - return s -} - -// Contains the response to a successful CreatePolicy request. -type CreatePolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new policy. - Policy *Policy `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *CreatePolicyOutput) SetPolicy(v *Policy) *CreatePolicyOutput { - s.Policy = v - return s -} - -type CreatePolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy to which you want to add - // a new version. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The JSON policy document that you want to use as the content for this new - // version of the policy. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // Specifies whether to set this version as the policy's default version. - // - // When this parameter is true, the new policy version becomes the operative - // version. That is, it becomes the version that is in effect for the IAM users, - // groups, and roles that the policy is attached to. - // - // For more information about managed policy versions, see Versioning for managed - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - SetAsDefault *bool `type:"boolean"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePolicyVersionInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *CreatePolicyVersionInput) SetPolicyArn(v string) *CreatePolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreatePolicyVersionInput) SetPolicyDocument(v string) *CreatePolicyVersionInput { - s.PolicyDocument = &v - return s -} - -// SetSetAsDefault sets the SetAsDefault field's value. -func (s *CreatePolicyVersionInput) SetSetAsDefault(v bool) *CreatePolicyVersionInput { - s.SetAsDefault = &v - return s -} - -// Contains the response to a successful CreatePolicyVersion request. -type CreatePolicyVersionOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new policy version. - PolicyVersion *PolicyVersion `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyVersionOutput) GoString() string { - return s.String() -} - -// SetPolicyVersion sets the PolicyVersion field's value. -func (s *CreatePolicyVersionOutput) SetPolicyVersion(v *PolicyVersion) *CreatePolicyVersionOutput { - s.PolicyVersion = v - return s -} - -type CreateRoleInput struct { - _ struct{} `type:"structure"` - - // The trust relationship policy document that grants an entity permission to - // assume the role. - // - // In IAM, you must provide a JSON policy that has been converted to a string. - // However, for CloudFormation templates formatted in YAML, you can provide - // the policy in JSON or YAML format. CloudFormation always converts a YAML - // policy to JSON format before submitting it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // Upon success, the response includes the same trust policy in JSON format. - // - // AssumeRolePolicyDocument is a required field - AssumeRolePolicyDocument *string `min:"1" type:"string" required:"true"` - - // A description of the role. - Description *string `type:"string"` - - // The maximum session duration (in seconds) that you want to set for the specified - // role. If you do not specify a value for this setting, the default value of - // one hour is applied. This setting can have a value from 1 hour to 12 hours. - // - // Anyone who assumes the role from the CLI or API can use the DurationSeconds - // API parameter or the duration-seconds CLI parameter to request a longer session. - // The MaxSessionDuration setting determines the maximum duration that can be - // requested using the DurationSeconds parameter. If users don't specify a value - // for the DurationSeconds parameter, their security credentials are valid for - // one hour by default. This applies when you use the AssumeRole* API operations - // or the assume-role* CLI operations but does not apply when you use those - // operations to create a console URL. For more information, see Using IAM roles - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) in the - // IAM User Guide. - MaxSessionDuration *int64 `min:"3600" type:"integer"` - - // The path to the role. For more information about paths, see IAM Identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` - - // The ARN of the managed policy that is used to set the permissions boundary - // for the role. - // - // A permissions boundary policy defines the maximum permissions that identity-based - // policies can grant to an entity, but does not grant permissions. Permissions - // boundaries do not define the maximum permissions that a resource-based policy - // can grant to an entity. To learn more, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - // - // For more information about policy types, see Policy types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. - PermissionsBoundary *string `min:"20" type:"string"` - - // The name of the role to create. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` - - // A list of tags that you want to attach to the new role. Each tag consists - // of a key name and an associated value. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRoleInput"} - if s.AssumeRolePolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("AssumeRolePolicyDocument")) - } - if s.AssumeRolePolicyDocument != nil && len(*s.AssumeRolePolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssumeRolePolicyDocument", 1)) - } - if s.MaxSessionDuration != nil && *s.MaxSessionDuration < 3600 { - invalidParams.Add(request.NewErrParamMinValue("MaxSessionDuration", 3600)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssumeRolePolicyDocument sets the AssumeRolePolicyDocument field's value. -func (s *CreateRoleInput) SetAssumeRolePolicyDocument(v string) *CreateRoleInput { - s.AssumeRolePolicyDocument = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateRoleInput) SetDescription(v string) *CreateRoleInput { - s.Description = &v - return s -} - -// SetMaxSessionDuration sets the MaxSessionDuration field's value. -func (s *CreateRoleInput) SetMaxSessionDuration(v int64) *CreateRoleInput { - s.MaxSessionDuration = &v - return s -} - -// SetPath sets the Path field's value. -func (s *CreateRoleInput) SetPath(v string) *CreateRoleInput { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *CreateRoleInput) SetPermissionsBoundary(v string) *CreateRoleInput { - s.PermissionsBoundary = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *CreateRoleInput) SetRoleName(v string) *CreateRoleInput { - s.RoleName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateRoleInput) SetTags(v []*Tag) *CreateRoleInput { - s.Tags = v - return s -} - -// Contains the response to a successful CreateRole request. -type CreateRoleOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new role. - // - // Role is a required field - Role *Role `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateRoleOutput) GoString() string { - return s.String() -} - -// SetRole sets the Role field's value. -func (s *CreateRoleOutput) SetRole(v *Role) *CreateRoleOutput { - s.Role = v - return s -} - -type CreateSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The name of the provider to create. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // An XML document generated by an identity provider (IdP) that supports SAML - // 2.0. The document includes the issuer's name, expiration information, and - // keys that can be used to validate the SAML authentication response (assertions) - // that are received from the IdP. You must generate the metadata document using - // the identity management software that is used as your organization's IdP. - // - // For more information, see About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) - // in the IAM User Guide - // - // SAMLMetadataDocument is a required field - SAMLMetadataDocument *string `min:"1000" type:"string" required:"true"` - - // A list of tags that you want to attach to the new IAM SAML provider. Each - // tag consists of a key name and an associated value. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSAMLProviderInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.SAMLMetadataDocument == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLMetadataDocument")) - } - if s.SAMLMetadataDocument != nil && len(*s.SAMLMetadataDocument) < 1000 { - invalidParams.Add(request.NewErrParamMinLen("SAMLMetadataDocument", 1000)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *CreateSAMLProviderInput) SetName(v string) *CreateSAMLProviderInput { - s.Name = &v - return s -} - -// SetSAMLMetadataDocument sets the SAMLMetadataDocument field's value. -func (s *CreateSAMLProviderInput) SetSAMLMetadataDocument(v string) *CreateSAMLProviderInput { - s.SAMLMetadataDocument = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSAMLProviderInput) SetTags(v []*Tag) *CreateSAMLProviderInput { - s.Tags = v - return s -} - -// Contains the response to a successful CreateSAMLProvider request. -type CreateSAMLProviderOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the new SAML provider resource in IAM. - SAMLProviderArn *string `min:"20" type:"string"` - - // A list of tags that are attached to the new IAM SAML provider. The returned - // list of tags is sorted by tag key. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSAMLProviderOutput) GoString() string { - return s.String() -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *CreateSAMLProviderOutput) SetSAMLProviderArn(v string) *CreateSAMLProviderOutput { - s.SAMLProviderArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSAMLProviderOutput) SetTags(v []*Tag) *CreateSAMLProviderOutput { - s.Tags = v - return s -} - -type CreateServiceLinkedRoleInput struct { - _ struct{} `type:"structure"` - - // The service principal for the Amazon Web Services service to which this role - // is attached. You use a string similar to a URL but without the http:// in - // front. For example: elasticbeanstalk.amazonaws.com. - // - // Service principals are unique and case-sensitive. To find the exact service - // principal for your service-linked role, see Amazon Web Services services - // that work with IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) - // in the IAM User Guide. Look for the services that have Yes in the Service-Linked - // Role column. Choose the Yes link to view the service-linked role documentation - // for that service. - // - // AWSServiceName is a required field - AWSServiceName *string `min:"1" type:"string" required:"true"` - - // A string that you provide, which is combined with the service-provided prefix - // to form the complete role name. If you make multiple requests for the same - // service, then you must supply a different CustomSuffix for each request. - // Otherwise the request fails with a duplicate role name error. For example, - // you could add -1 or -debug to the suffix. - // - // Some services do not support the CustomSuffix parameter. If you provide an - // optional suffix and the operation fails, try the operation again without - // the suffix. - CustomSuffix *string `min:"1" type:"string"` - - // The description of the role. - Description *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceLinkedRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceLinkedRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateServiceLinkedRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateServiceLinkedRoleInput"} - if s.AWSServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("AWSServiceName")) - } - if s.AWSServiceName != nil && len(*s.AWSServiceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AWSServiceName", 1)) - } - if s.CustomSuffix != nil && len(*s.CustomSuffix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomSuffix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAWSServiceName sets the AWSServiceName field's value. -func (s *CreateServiceLinkedRoleInput) SetAWSServiceName(v string) *CreateServiceLinkedRoleInput { - s.AWSServiceName = &v - return s -} - -// SetCustomSuffix sets the CustomSuffix field's value. -func (s *CreateServiceLinkedRoleInput) SetCustomSuffix(v string) *CreateServiceLinkedRoleInput { - s.CustomSuffix = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateServiceLinkedRoleInput) SetDescription(v string) *CreateServiceLinkedRoleInput { - s.Description = &v - return s -} - -type CreateServiceLinkedRoleOutput struct { - _ struct{} `type:"structure"` - - // A Role object that contains details about the newly created role. - Role *Role `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceLinkedRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceLinkedRoleOutput) GoString() string { - return s.String() -} - -// SetRole sets the Role field's value. -func (s *CreateServiceLinkedRoleOutput) SetRole(v *Role) *CreateServiceLinkedRoleOutput { - s.Role = v - return s -} - -type CreateServiceSpecificCredentialInput struct { - _ struct{} `type:"structure"` - - // The name of the Amazon Web Services service that is to be associated with - // the credentials. The service you specify here is the only service that can - // be accessed using these credentials. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The name of the IAM user that is to be associated with the credentials. The - // new service-specific credentials have the same permissions as the associated - // user except that they can be used only to access the specified service. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceSpecificCredentialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceSpecificCredentialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateServiceSpecificCredentialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateServiceSpecificCredentialInput"} - if s.ServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceName")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceName sets the ServiceName field's value. -func (s *CreateServiceSpecificCredentialInput) SetServiceName(v string) *CreateServiceSpecificCredentialInput { - s.ServiceName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *CreateServiceSpecificCredentialInput) SetUserName(v string) *CreateServiceSpecificCredentialInput { - s.UserName = &v - return s -} - -type CreateServiceSpecificCredentialOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains information about the newly created service-specific - // credential. - // - // This is the only time that the password for this credential set is available. - // It cannot be recovered later. Instead, you must reset the password with ResetServiceSpecificCredential. - ServiceSpecificCredential *ServiceSpecificCredential `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceSpecificCredentialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceSpecificCredentialOutput) GoString() string { - return s.String() -} - -// SetServiceSpecificCredential sets the ServiceSpecificCredential field's value. -func (s *CreateServiceSpecificCredentialOutput) SetServiceSpecificCredential(v *ServiceSpecificCredential) *CreateServiceSpecificCredentialOutput { - s.ServiceSpecificCredential = v - return s -} - -type CreateUserInput struct { - _ struct{} `type:"structure"` - - // The path for the user name. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` - - // The ARN of the managed policy that is used to set the permissions boundary - // for the user. - // - // A permissions boundary policy defines the maximum permissions that identity-based - // policies can grant to an entity, but does not grant permissions. Permissions - // boundaries do not define the maximum permissions that a resource-based policy - // can grant to an entity. To learn more, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - // - // For more information about policy types, see Policy types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. - PermissionsBoundary *string `min:"20" type:"string"` - - // A list of tags that you want to attach to the new user. Each tag consists - // of a key name and an associated value. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` - - // The name of the user to create. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPath sets the Path field's value. -func (s *CreateUserInput) SetPath(v string) *CreateUserInput { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *CreateUserInput) SetPermissionsBoundary(v string) *CreateUserInput { - s.PermissionsBoundary = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateUserInput) SetTags(v []*Tag) *CreateUserInput { - s.Tags = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *CreateUserInput) SetUserName(v string) *CreateUserInput { - s.UserName = &v - return s -} - -// Contains the response to a successful CreateUser request. -type CreateUserOutput struct { - _ struct{} `type:"structure"` - - // A structure with details about the new IAM user. - User *User `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateUserOutput) GoString() string { - return s.String() -} - -// SetUser sets the User field's value. -func (s *CreateUserOutput) SetUser(v *User) *CreateUserOutput { - s.User = v - return s -} - -type CreateVirtualMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The path for the virtual MFA device. For more information about paths, see - // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` - - // A list of tags that you want to attach to the new IAM virtual MFA device. - // Each tag consists of a key name and an associated value. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` - - // The name of the virtual MFA device, which must be unique. Use with path to - // uniquely identify a virtual MFA device. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // VirtualMFADeviceName is a required field - VirtualMFADeviceName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateVirtualMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateVirtualMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVirtualMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVirtualMFADeviceInput"} - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.VirtualMFADeviceName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualMFADeviceName")) - } - if s.VirtualMFADeviceName != nil && len(*s.VirtualMFADeviceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualMFADeviceName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPath sets the Path field's value. -func (s *CreateVirtualMFADeviceInput) SetPath(v string) *CreateVirtualMFADeviceInput { - s.Path = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateVirtualMFADeviceInput) SetTags(v []*Tag) *CreateVirtualMFADeviceInput { - s.Tags = v - return s -} - -// SetVirtualMFADeviceName sets the VirtualMFADeviceName field's value. -func (s *CreateVirtualMFADeviceInput) SetVirtualMFADeviceName(v string) *CreateVirtualMFADeviceInput { - s.VirtualMFADeviceName = &v - return s -} - -// Contains the response to a successful CreateVirtualMFADevice request. -type CreateVirtualMFADeviceOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new virtual MFA device. - // - // VirtualMFADevice is a required field - VirtualMFADevice *VirtualMFADevice `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateVirtualMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateVirtualMFADeviceOutput) GoString() string { - return s.String() -} - -// SetVirtualMFADevice sets the VirtualMFADevice field's value. -func (s *CreateVirtualMFADeviceOutput) SetVirtualMFADevice(v *VirtualMFADevice) *CreateVirtualMFADeviceOutput { - s.VirtualMFADevice = v - return s -} - -type DeactivateMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the device ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@:/- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The name of the user whose MFA device you want to deactivate. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeactivateMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeactivateMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeactivateMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeactivateMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *DeactivateMFADeviceInput) SetSerialNumber(v string) *DeactivateMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeactivateMFADeviceInput) SetUserName(v string) *DeactivateMFADeviceInput { - s.UserName = &v - return s -} - -type DeactivateMFADeviceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeactivateMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeactivateMFADeviceOutput) GoString() string { - return s.String() -} - -type DeleteAccessKeyInput struct { - _ struct{} `type:"structure"` - - // The access key ID for the access key ID and secret access key you want to - // delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // AccessKeyId is a required field - AccessKeyId *string `min:"16" type:"string" required:"true"` - - // The name of the user whose access key pair you want to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAccessKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAccessKeyInput"} - if s.AccessKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) - } - if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { - invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *DeleteAccessKeyInput) SetAccessKeyId(v string) *DeleteAccessKeyInput { - s.AccessKeyId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteAccessKeyInput) SetUserName(v string) *DeleteAccessKeyInput { - s.UserName = &v - return s -} - -type DeleteAccessKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessKeyOutput) GoString() string { - return s.String() -} - -type DeleteAccountAliasInput struct { - _ struct{} `type:"structure"` - - // The name of the account alias to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of lowercase letters, digits, and dashes. - // You cannot start or finish with a dash, nor can you have two dashes in a - // row. - // - // AccountAlias is a required field - AccountAlias *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAccountAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAccountAliasInput"} - if s.AccountAlias == nil { - invalidParams.Add(request.NewErrParamRequired("AccountAlias")) - } - if s.AccountAlias != nil && len(*s.AccountAlias) < 3 { - invalidParams.Add(request.NewErrParamMinLen("AccountAlias", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountAlias sets the AccountAlias field's value. -func (s *DeleteAccountAliasInput) SetAccountAlias(v string) *DeleteAccountAliasInput { - s.AccountAlias = &v - return s -} - -type DeleteAccountAliasOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountAliasOutput) GoString() string { - return s.String() -} - -type DeleteAccountPasswordPolicyInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPasswordPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPasswordPolicyInput) GoString() string { - return s.String() -} - -type DeleteAccountPasswordPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPasswordPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPasswordPolicyOutput) GoString() string { - return s.String() -} - -type DeleteGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM group to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *DeleteGroupInput) SetGroupName(v string) *DeleteGroupInput { - s.GroupName = &v - return s -} - -type DeleteGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupOutput) GoString() string { - return s.String() -} - -type DeleteGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) identifying the group that the policy is - // embedded in. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The name identifying the policy document to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *DeleteGroupPolicyInput) SetGroupName(v string) *DeleteGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteGroupPolicyInput) SetPolicyName(v string) *DeleteGroupPolicyInput { - s.PolicyName = &v - return s -} - -type DeleteGroupPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupPolicyOutput) GoString() string { - return s.String() -} - -type DeleteInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *DeleteInstanceProfileInput) SetInstanceProfileName(v string) *DeleteInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -type DeleteInstanceProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteInstanceProfileOutput) GoString() string { - return s.String() -} - -type DeleteLoginProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the user whose password you want to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteLoginProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteLoginProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoginProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoginProfileInput"} - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *DeleteLoginProfileInput) SetUserName(v string) *DeleteLoginProfileInput { - s.UserName = &v - return s -} - -type DeleteLoginProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteLoginProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteLoginProfileOutput) GoString() string { - return s.String() -} - -type DeleteOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM OpenID Connect provider resource - // object to delete. You can get a list of OpenID Connect provider resource - // ARNs by using the ListOpenIDConnectProviders operation. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteOpenIDConnectProviderInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *DeleteOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *DeleteOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -type DeleteOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type DeletePolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to delete. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DeletePolicyInput) SetPolicyArn(v string) *DeletePolicyInput { - s.PolicyArn = &v - return s -} - -type DeletePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyOutput) GoString() string { - return s.String() -} - -type DeletePolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy from which you want to delete - // a version. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The policy version to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consists of the lowercase letter 'v' followed - // by one or two digits, and optionally followed by a period '.' and a string - // of letters and digits. - // - // For more information about managed policy versions, see Versioning for managed - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - // - // VersionId is a required field - VersionId *string `type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyVersionInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.VersionId == nil { - invalidParams.Add(request.NewErrParamRequired("VersionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DeletePolicyVersionInput) SetPolicyArn(v string) *DeletePolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeletePolicyVersionInput) SetVersionId(v string) *DeletePolicyVersionInput { - s.VersionId = &v - return s -} - -type DeletePolicyVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyVersionOutput) GoString() string { - return s.String() -} - -type DeleteRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the role to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteRoleInput) SetRoleName(v string) *DeleteRoleInput { - s.RoleName = &v - return s -} - -type DeleteRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRoleOutput) GoString() string { - return s.String() -} - -type DeleteRolePermissionsBoundaryInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the IAM role from which you want to - // remove the permissions boundary. - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePermissionsBoundaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePermissionsBoundaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRolePermissionsBoundaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRolePermissionsBoundaryInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteRolePermissionsBoundaryInput) SetRoleName(v string) *DeleteRolePermissionsBoundaryInput { - s.RoleName = &v - return s -} - -type DeleteRolePermissionsBoundaryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePermissionsBoundaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePermissionsBoundaryOutput) GoString() string { - return s.String() -} - -type DeleteRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the inline policy to delete from the specified IAM role. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name (friendly name, not ARN) identifying the role that the policy is - // embedded in. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRolePolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteRolePolicyInput) SetPolicyName(v string) *DeleteRolePolicyInput { - s.PolicyName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteRolePolicyInput) SetRoleName(v string) *DeleteRolePolicyInput { - s.RoleName = &v - return s -} - -type DeleteRolePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePolicyOutput) GoString() string { - return s.String() -} - -type DeleteSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SAML provider to delete. - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSAMLProviderInput"} - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *DeleteSAMLProviderInput) SetSAMLProviderArn(v string) *DeleteSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -type DeleteSAMLProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSAMLProviderOutput) GoString() string { - return s.String() -} - -type DeleteSSHPublicKeyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The name of the IAM user associated with the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSSHPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSSHPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSSHPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSSHPublicKeyInput"} - if s.SSHPublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) - } - if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *DeleteSSHPublicKeyInput) SetSSHPublicKeyId(v string) *DeleteSSHPublicKeyInput { - s.SSHPublicKeyId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteSSHPublicKeyInput) SetUserName(v string) *DeleteSSHPublicKeyInput { - s.UserName = &v - return s -} - -type DeleteSSHPublicKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSSHPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSSHPublicKeyOutput) GoString() string { - return s.String() -} - -type DeleteServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the server certificate you want to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServerCertificateInput"} - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *DeleteServerCertificateInput) SetServerCertificateName(v string) *DeleteServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -type DeleteServerCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServerCertificateOutput) GoString() string { - return s.String() -} - -type DeleteServiceLinkedRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the service-linked role to be deleted. - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceLinkedRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceLinkedRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceLinkedRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceLinkedRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinkedRoleInput { - s.RoleName = &v - return s -} - -type DeleteServiceLinkedRoleOutput struct { - _ struct{} `type:"structure"` - - // The deletion task identifier that you can use to check the status of the - // deletion. This identifier is returned in the format task/aws-service-role///. - // - // DeletionTaskId is a required field - DeletionTaskId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceLinkedRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceLinkedRoleOutput) GoString() string { - return s.String() -} - -// SetDeletionTaskId sets the DeletionTaskId field's value. -func (s *DeleteServiceLinkedRoleOutput) SetDeletionTaskId(v string) *DeleteServiceLinkedRoleOutput { - s.DeletionTaskId = &v - return s -} - -type DeleteServiceSpecificCredentialInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the service-specific credential. You can get this - // value by calling ListServiceSpecificCredentials. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The name of the IAM user associated with the service-specific credential. - // If this value is not specified, then the operation assumes the user whose - // credentials are used to call the operation. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceSpecificCredentialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceSpecificCredentialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceSpecificCredentialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceSpecificCredentialInput"} - if s.ServiceSpecificCredentialId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceSpecificCredentialId")) - } - if s.ServiceSpecificCredentialId != nil && len(*s.ServiceSpecificCredentialId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ServiceSpecificCredentialId", 20)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *DeleteServiceSpecificCredentialInput) SetServiceSpecificCredentialId(v string) *DeleteServiceSpecificCredentialInput { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteServiceSpecificCredentialInput) SetUserName(v string) *DeleteServiceSpecificCredentialInput { - s.UserName = &v - return s -} - -type DeleteServiceSpecificCredentialOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceSpecificCredentialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceSpecificCredentialOutput) GoString() string { - return s.String() -} - -type DeleteSigningCertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the signing certificate to delete. - // - // The format of this parameter, as described by its regex (http://wikipedia.org/wiki/regex) - // pattern, is a string of characters that can be upper- or lower-cased letters - // or digits. - // - // CertificateId is a required field - CertificateId *string `min:"24" type:"string" required:"true"` - - // The name of the user the signing certificate belongs to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSigningCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSigningCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSigningCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSigningCertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 24 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 24)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *DeleteSigningCertificateInput) SetCertificateId(v string) *DeleteSigningCertificateInput { - s.CertificateId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteSigningCertificateInput) SetUserName(v string) *DeleteSigningCertificateInput { - s.UserName = &v - return s -} - -type DeleteSigningCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSigningCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSigningCertificateOutput) GoString() string { - return s.String() -} - -type DeleteUserInput struct { - _ struct{} `type:"structure"` - - // The name of the user to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *DeleteUserInput) SetUserName(v string) *DeleteUserInput { - s.UserName = &v - return s -} - -type DeleteUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserOutput) GoString() string { - return s.String() -} - -type DeleteUserPermissionsBoundaryInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the IAM user from which you want to - // remove the permissions boundary. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPermissionsBoundaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPermissionsBoundaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserPermissionsBoundaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserPermissionsBoundaryInput"} - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *DeleteUserPermissionsBoundaryInput) SetUserName(v string) *DeleteUserPermissionsBoundaryInput { - s.UserName = &v - return s -} - -type DeleteUserPermissionsBoundaryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPermissionsBoundaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPermissionsBoundaryOutput) GoString() string { - return s.String() -} - -type DeleteUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The name identifying the policy document to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name (friendly name, not ARN) identifying the user that the policy is - // embedded in. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteUserPolicyInput) SetPolicyName(v string) *DeleteUserPolicyInput { - s.PolicyName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteUserPolicyInput) SetUserName(v string) *DeleteUserPolicyInput { - s.UserName = &v - return s -} - -type DeleteUserPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPolicyOutput) GoString() string { - return s.String() -} - -type DeleteVirtualMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the same as the ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@:/- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteVirtualMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteVirtualMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVirtualMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *DeleteVirtualMFADeviceInput) SetSerialNumber(v string) *DeleteVirtualMFADeviceInput { - s.SerialNumber = &v - return s -} - -type DeleteVirtualMFADeviceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteVirtualMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteVirtualMFADeviceOutput) GoString() string { - return s.String() -} - -// The reason that the service-linked role deletion failed. -// -// This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus -// operation. -type DeletionTaskFailureReasonType struct { - _ struct{} `type:"structure"` - - // A short description of the reason that the service-linked role deletion failed. - Reason *string `type:"string"` - - // A list of objects that contains details about the service-linked role deletion - // failure, if that information is returned by the service. If the service-linked - // role has active sessions or if any resources that were used by the role have - // not been deleted from the linked service, the role can't be deleted. This - // parameter includes a list of the resources that are associated with the role - // and the Region in which the resources are being used. - RoleUsageList []*RoleUsageType `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletionTaskFailureReasonType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletionTaskFailureReasonType) GoString() string { - return s.String() -} - -// SetReason sets the Reason field's value. -func (s *DeletionTaskFailureReasonType) SetReason(v string) *DeletionTaskFailureReasonType { - s.Reason = &v - return s -} - -// SetRoleUsageList sets the RoleUsageList field's value. -func (s *DeletionTaskFailureReasonType) SetRoleUsageList(v []*RoleUsageType) *DeletionTaskFailureReasonType { - s.RoleUsageList = v - return s -} - -type DetachGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the IAM group to detach the policy from. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *DetachGroupPolicyInput) SetGroupName(v string) *DetachGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DetachGroupPolicyInput) SetPolicyArn(v string) *DetachGroupPolicyInput { - s.PolicyArn = &v - return s -} - -type DetachGroupPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachGroupPolicyOutput) GoString() string { - return s.String() -} - -type DetachRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM role to detach the policy from. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachRolePolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DetachRolePolicyInput) SetPolicyArn(v string) *DetachRolePolicyInput { - s.PolicyArn = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *DetachRolePolicyInput) SetRoleName(v string) *DetachRolePolicyInput { - s.RoleName = &v - return s -} - -type DetachRolePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachRolePolicyOutput) GoString() string { - return s.String() -} - -type DetachUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM user to detach the policy from. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachUserPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DetachUserPolicyInput) SetPolicyArn(v string) *DetachUserPolicyInput { - s.PolicyArn = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DetachUserPolicyInput) SetUserName(v string) *DetachUserPolicyInput { - s.UserName = &v - return s -} - -type DetachUserPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachUserPolicyOutput) GoString() string { - return s.String() -} - -type EnableMFADeviceInput struct { - _ struct{} `type:"structure"` - - // An authentication code emitted by the device. - // - // The format for this parameter is a string of six digits. - // - // Submit your request immediately after generating the authentication codes. - // If you generate the codes and then wait too long to submit the request, the - // MFA device successfully associates with the user but the MFA device becomes - // out of sync. This happens because time-based one-time passwords (TOTP) expire - // after a short period of time. If this happens, you can resync the device - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html). - // - // AuthenticationCode1 is a required field - AuthenticationCode1 *string `min:"6" type:"string" required:"true"` - - // A subsequent authentication code emitted by the device. - // - // The format for this parameter is a string of six digits. - // - // Submit your request immediately after generating the authentication codes. - // If you generate the codes and then wait too long to submit the request, the - // MFA device successfully associates with the user but the MFA device becomes - // out of sync. This happens because time-based one-time passwords (TOTP) expire - // after a short period of time. If this happens, you can resync the device - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html). - // - // AuthenticationCode2 is a required field - AuthenticationCode2 *string `min:"6" type:"string" required:"true"` - - // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the device ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@:/- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The name of the IAM user for whom you want to enable the MFA device. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EnableMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EnableMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableMFADeviceInput"} - if s.AuthenticationCode1 == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationCode1")) - } - if s.AuthenticationCode1 != nil && len(*s.AuthenticationCode1) < 6 { - invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode1", 6)) - } - if s.AuthenticationCode2 == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationCode2")) - } - if s.AuthenticationCode2 != nil && len(*s.AuthenticationCode2) < 6 { - invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode2", 6)) - } - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationCode1 sets the AuthenticationCode1 field's value. -func (s *EnableMFADeviceInput) SetAuthenticationCode1(v string) *EnableMFADeviceInput { - s.AuthenticationCode1 = &v - return s -} - -// SetAuthenticationCode2 sets the AuthenticationCode2 field's value. -func (s *EnableMFADeviceInput) SetAuthenticationCode2(v string) *EnableMFADeviceInput { - s.AuthenticationCode2 = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *EnableMFADeviceInput) SetSerialNumber(v string) *EnableMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *EnableMFADeviceInput) SetUserName(v string) *EnableMFADeviceInput { - s.UserName = &v - return s -} - -type EnableMFADeviceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EnableMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EnableMFADeviceOutput) GoString() string { - return s.String() -} - -// An object that contains details about when the IAM entities (users or roles) -// were last used in an attempt to access the specified Amazon Web Services -// service. -// -// This data type is a response element in the GetServiceLastAccessedDetailsWithEntities -// operation. -type EntityDetails struct { - _ struct{} `type:"structure"` - - // The EntityInfo object that contains details about the entity (user or role). - // - // EntityInfo is a required field - EntityInfo *EntityInfo `type:"structure" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the authenticated entity last attempted to access Amazon Web Services. - // Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticated *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EntityDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EntityDetails) GoString() string { - return s.String() -} - -// SetEntityInfo sets the EntityInfo field's value. -func (s *EntityDetails) SetEntityInfo(v *EntityInfo) *EntityDetails { - s.EntityInfo = v - return s -} - -// SetLastAuthenticated sets the LastAuthenticated field's value. -func (s *EntityDetails) SetLastAuthenticated(v time.Time) *EntityDetails { - s.LastAuthenticated = &v - return s -} - -// Contains details about the specified entity (user or role). -// -// This data type is an element of the EntityDetails object. -type EntityInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The identifier of the entity (user or role). - // - // Id is a required field - Id *string `min:"16" type:"string" required:"true"` - - // The name of the entity (user or role). - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The path to the entity (user or role). For more information about paths, - // see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The type of entity (user or role). - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"PolicyOwnerEntityType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EntityInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EntityInfo) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *EntityInfo) SetArn(v string) *EntityInfo { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *EntityInfo) SetId(v string) *EntityInfo { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *EntityInfo) SetName(v string) *EntityInfo { - s.Name = &v - return s -} - -// SetPath sets the Path field's value. -func (s *EntityInfo) SetPath(v string) *EntityInfo { - s.Path = &v - return s -} - -// SetType sets the Type field's value. -func (s *EntityInfo) SetType(v string) *EntityInfo { - s.Type = &v - return s -} - -// Contains information about the reason that the operation failed. -// -// This data type is used as a response element in the GetOrganizationsAccessReport, -// GetServiceLastAccessedDetails, and GetServiceLastAccessedDetailsWithEntities -// operations. -type ErrorDetails struct { - _ struct{} `type:"structure"` - - // The error code associated with the operation failure. - // - // Code is a required field - Code *string `type:"string" required:"true"` - - // Detailed information about the reason that the operation failed. - // - // Message is a required field - Message *string `type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ErrorDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ErrorDetails) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ErrorDetails) SetCode(v string) *ErrorDetails { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ErrorDetails) SetMessage(v string) *ErrorDetails { - s.Message = &v - return s -} - -// Contains the results of a simulation. -// -// This data type is used by the return parameter of SimulateCustomPolicy and -// SimulatePrincipalPolicy . -type EvaluationResult struct { - _ struct{} `type:"structure"` - - // The name of the API operation tested on the indicated resource. - // - // EvalActionName is a required field - EvalActionName *string `min:"3" type:"string" required:"true"` - - // The result of the simulation. - // - // EvalDecision is a required field - EvalDecision *string `type:"string" required:"true" enum:"PolicyEvaluationDecisionType"` - - // Additional details about the results of the cross-account evaluation decision. - // This parameter is populated for only cross-account simulations. It contains - // a brief summary of how each policy type contributes to the final evaluation - // decision. - // - // If the simulation evaluates policies within the same account and includes - // a resource ARN, then the parameter is present but the response is empty. - // If the simulation evaluates policies within the same account and specifies - // all resources (*), then the parameter is not returned. - // - // When you make a cross-account request, Amazon Web Services evaluates the - // request in the trusting account and the trusted account. The request is allowed - // only if both evaluations return true. For more information about how policies - // are evaluated, see Evaluating policies within a single account (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics). - // - // If an Organizations SCP included in the evaluation denies access, the simulation - // ends. In this case, policy evaluation does not proceed any further and this - // parameter is not returned. - EvalDecisionDetails map[string]*string `type:"map"` - - // The ARN of the resource that the indicated API operation was tested on. - EvalResourceName *string `min:"1" type:"string"` - - // A list of the statements in the input policies that determine the result - // for this scenario. Remember that even if multiple statements allow the operation - // on the resource, if only one statement denies that operation, then the explicit - // deny overrides any allow. In addition, the deny statement is the only entry - // included in the result. - MatchedStatements []*Statement `type:"list"` - - // A list of context keys that are required by the included input policies but - // that were not provided by one of the input parameters. This list is used - // when the resource in a simulation is "*", either explicitly, or when the - // ResourceArns parameter blank. If you include a list of resources, then any - // missing context values are instead included under the ResourceSpecificResults - // section. To discover the context keys used by a set of policies, you can - // call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy. - MissingContextValues []*string `type:"list"` - - // A structure that details how Organizations and its service control policies - // affect the results of the simulation. Only applies if the simulated user's - // account is part of an organization. - OrganizationsDecisionDetail *OrganizationsDecisionDetail `type:"structure"` - - // Contains information about the effect that a permissions boundary has on - // a policy simulation when the boundary is applied to an IAM entity. - PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail `type:"structure"` - - // The individual results of the simulation of the API operation specified in - // EvalActionName on each resource. - ResourceSpecificResults []*ResourceSpecificResult `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EvaluationResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EvaluationResult) GoString() string { - return s.String() -} - -// SetEvalActionName sets the EvalActionName field's value. -func (s *EvaluationResult) SetEvalActionName(v string) *EvaluationResult { - s.EvalActionName = &v - return s -} - -// SetEvalDecision sets the EvalDecision field's value. -func (s *EvaluationResult) SetEvalDecision(v string) *EvaluationResult { - s.EvalDecision = &v - return s -} - -// SetEvalDecisionDetails sets the EvalDecisionDetails field's value. -func (s *EvaluationResult) SetEvalDecisionDetails(v map[string]*string) *EvaluationResult { - s.EvalDecisionDetails = v - return s -} - -// SetEvalResourceName sets the EvalResourceName field's value. -func (s *EvaluationResult) SetEvalResourceName(v string) *EvaluationResult { - s.EvalResourceName = &v - return s -} - -// SetMatchedStatements sets the MatchedStatements field's value. -func (s *EvaluationResult) SetMatchedStatements(v []*Statement) *EvaluationResult { - s.MatchedStatements = v - return s -} - -// SetMissingContextValues sets the MissingContextValues field's value. -func (s *EvaluationResult) SetMissingContextValues(v []*string) *EvaluationResult { - s.MissingContextValues = v - return s -} - -// SetOrganizationsDecisionDetail sets the OrganizationsDecisionDetail field's value. -func (s *EvaluationResult) SetOrganizationsDecisionDetail(v *OrganizationsDecisionDetail) *EvaluationResult { - s.OrganizationsDecisionDetail = v - return s -} - -// SetPermissionsBoundaryDecisionDetail sets the PermissionsBoundaryDecisionDetail field's value. -func (s *EvaluationResult) SetPermissionsBoundaryDecisionDetail(v *PermissionsBoundaryDecisionDetail) *EvaluationResult { - s.PermissionsBoundaryDecisionDetail = v - return s -} - -// SetResourceSpecificResults sets the ResourceSpecificResults field's value. -func (s *EvaluationResult) SetResourceSpecificResults(v []*ResourceSpecificResult) *EvaluationResult { - s.ResourceSpecificResults = v - return s -} - -type GenerateCredentialReportInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateCredentialReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateCredentialReportInput) GoString() string { - return s.String() -} - -// Contains the response to a successful GenerateCredentialReport request. -type GenerateCredentialReportOutput struct { - _ struct{} `type:"structure"` - - // Information about the credential report. - Description *string `type:"string"` - - // Information about the state of the credential report. - State *string `type:"string" enum:"ReportStateType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateCredentialReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateCredentialReportOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *GenerateCredentialReportOutput) SetDescription(v string) *GenerateCredentialReportOutput { - s.Description = &v - return s -} - -// SetState sets the State field's value. -func (s *GenerateCredentialReportOutput) SetState(v string) *GenerateCredentialReportOutput { - s.State = &v - return s -} - -type GenerateOrganizationsAccessReportInput struct { - _ struct{} `type:"structure"` - - // The path of the Organizations entity (root, OU, or account). You can build - // an entity path using the known structure of your organization. For example, - // assume that your account ID is 123456789012 and its parent OU ID is ou-rge0-awsabcde. - // The organization root ID is r-f6g7h8i9j0example and your organization ID - // is o-a1b2c3d4e5. Your entity path is o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-rge0-awsabcde/123456789012. - // - // EntityPath is a required field - EntityPath *string `min:"19" type:"string" required:"true"` - - // The identifier of the Organizations service control policy (SCP). This parameter - // is optional. - // - // This ID is used to generate information about when an account principal that - // is limited by the SCP attempted to access an Amazon Web Services service. - OrganizationsPolicyId *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateOrganizationsAccessReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateOrganizationsAccessReportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GenerateOrganizationsAccessReportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GenerateOrganizationsAccessReportInput"} - if s.EntityPath == nil { - invalidParams.Add(request.NewErrParamRequired("EntityPath")) - } - if s.EntityPath != nil && len(*s.EntityPath) < 19 { - invalidParams.Add(request.NewErrParamMinLen("EntityPath", 19)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntityPath sets the EntityPath field's value. -func (s *GenerateOrganizationsAccessReportInput) SetEntityPath(v string) *GenerateOrganizationsAccessReportInput { - s.EntityPath = &v - return s -} - -// SetOrganizationsPolicyId sets the OrganizationsPolicyId field's value. -func (s *GenerateOrganizationsAccessReportInput) SetOrganizationsPolicyId(v string) *GenerateOrganizationsAccessReportInput { - s.OrganizationsPolicyId = &v - return s -} - -type GenerateOrganizationsAccessReportOutput struct { - _ struct{} `type:"structure"` - - // The job identifier that you can use in the GetOrganizationsAccessReport operation. - JobId *string `min:"36" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateOrganizationsAccessReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateOrganizationsAccessReportOutput) GoString() string { - return s.String() -} - -// SetJobId sets the JobId field's value. -func (s *GenerateOrganizationsAccessReportOutput) SetJobId(v string) *GenerateOrganizationsAccessReportOutput { - s.JobId = &v - return s -} - -type GenerateServiceLastAccessedDetailsInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM resource (user, group, role, or managed policy) used to - // generate information about when the resource was last used in an attempt - // to access an Amazon Web Services service. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The level of detail that you want to generate. You can specify whether you - // want to generate information about the last attempt to access services or - // actions. If you specify service-level granularity, this operation generates - // only service data. If you specify action-level granularity, it generates - // service and action data. If you don't include this optional parameter, the - // operation generates service data. - Granularity *string `type:"string" enum:"AccessAdvisorUsageGranularityType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateServiceLastAccessedDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateServiceLastAccessedDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GenerateServiceLastAccessedDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GenerateServiceLastAccessedDetailsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GenerateServiceLastAccessedDetailsInput) SetArn(v string) *GenerateServiceLastAccessedDetailsInput { - s.Arn = &v - return s -} - -// SetGranularity sets the Granularity field's value. -func (s *GenerateServiceLastAccessedDetailsInput) SetGranularity(v string) *GenerateServiceLastAccessedDetailsInput { - s.Granularity = &v - return s -} - -type GenerateServiceLastAccessedDetailsOutput struct { - _ struct{} `type:"structure"` - - // The JobId that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities - // operations. The JobId returned by GenerateServiceLastAccessedDetail must - // be used by the same role within a session, or by the same user when used - // to call GetServiceLastAccessedDetail. - JobId *string `min:"36" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateServiceLastAccessedDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateServiceLastAccessedDetailsOutput) GoString() string { - return s.String() -} - -// SetJobId sets the JobId field's value. -func (s *GenerateServiceLastAccessedDetailsOutput) SetJobId(v string) *GenerateServiceLastAccessedDetailsOutput { - s.JobId = &v - return s -} - -type GetAccessKeyLastUsedInput struct { - _ struct{} `type:"structure"` - - // The identifier of an access key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // AccessKeyId is a required field - AccessKeyId *string `min:"16" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccessKeyLastUsedInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccessKeyLastUsedInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAccessKeyLastUsedInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAccessKeyLastUsedInput"} - if s.AccessKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) - } - if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { - invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *GetAccessKeyLastUsedInput) SetAccessKeyId(v string) *GetAccessKeyLastUsedInput { - s.AccessKeyId = &v - return s -} - -// Contains the response to a successful GetAccessKeyLastUsed request. It is -// also returned as a member of the AccessKeyMetaData structure returned by -// the ListAccessKeys action. -type GetAccessKeyLastUsedOutput struct { - _ struct{} `type:"structure"` - - // Contains information about the last time the access key was used. - AccessKeyLastUsed *AccessKeyLastUsed `type:"structure"` - - // The name of the IAM user that owns this access key. - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccessKeyLastUsedOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccessKeyLastUsedOutput) GoString() string { - return s.String() -} - -// SetAccessKeyLastUsed sets the AccessKeyLastUsed field's value. -func (s *GetAccessKeyLastUsedOutput) SetAccessKeyLastUsed(v *AccessKeyLastUsed) *GetAccessKeyLastUsedOutput { - s.AccessKeyLastUsed = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetAccessKeyLastUsedOutput) SetUserName(v string) *GetAccessKeyLastUsedOutput { - s.UserName = &v - return s -} - -type GetAccountAuthorizationDetailsInput struct { - _ struct{} `type:"structure"` - - // A list of entity types used to filter the results. Only the entities that - // match the types you specify are included in the output. Use the value LocalManagedPolicy - // to include customer managed policies. - // - // The format for this parameter is a comma-separated (if more than one) list - // of strings. Each string value in the list must be one of the valid values - // listed below. - Filter []*string `type:"list" enum:"EntityType"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountAuthorizationDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountAuthorizationDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAccountAuthorizationDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAccountAuthorizationDetailsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *GetAccountAuthorizationDetailsInput) SetFilter(v []*string) *GetAccountAuthorizationDetailsInput { - s.Filter = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetAccountAuthorizationDetailsInput) SetMarker(v string) *GetAccountAuthorizationDetailsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetAccountAuthorizationDetailsInput) SetMaxItems(v int64) *GetAccountAuthorizationDetailsInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful GetAccountAuthorizationDetails request. -type GetAccountAuthorizationDetailsOutput struct { - _ struct{} `type:"structure"` - - // A list containing information about IAM groups. - GroupDetailList []*GroupDetail `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list containing information about managed policies. - Policies []*ManagedPolicyDetail `type:"list"` - - // A list containing information about IAM roles. - RoleDetailList []*RoleDetail `type:"list"` - - // A list containing information about IAM users. - UserDetailList []*UserDetail `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountAuthorizationDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountAuthorizationDetailsOutput) GoString() string { - return s.String() -} - -// SetGroupDetailList sets the GroupDetailList field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetGroupDetailList(v []*GroupDetail) *GetAccountAuthorizationDetailsOutput { - s.GroupDetailList = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetIsTruncated(v bool) *GetAccountAuthorizationDetailsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetMarker(v string) *GetAccountAuthorizationDetailsOutput { - s.Marker = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetPolicies(v []*ManagedPolicyDetail) *GetAccountAuthorizationDetailsOutput { - s.Policies = v - return s -} - -// SetRoleDetailList sets the RoleDetailList field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetRoleDetailList(v []*RoleDetail) *GetAccountAuthorizationDetailsOutput { - s.RoleDetailList = v - return s -} - -// SetUserDetailList sets the UserDetailList field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetUserDetailList(v []*UserDetail) *GetAccountAuthorizationDetailsOutput { - s.UserDetailList = v - return s -} - -type GetAccountPasswordPolicyInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountPasswordPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountPasswordPolicyInput) GoString() string { - return s.String() -} - -// Contains the response to a successful GetAccountPasswordPolicy request. -type GetAccountPasswordPolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the account's password policy. - // - // PasswordPolicy is a required field - PasswordPolicy *PasswordPolicy `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountPasswordPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountPasswordPolicyOutput) GoString() string { - return s.String() -} - -// SetPasswordPolicy sets the PasswordPolicy field's value. -func (s *GetAccountPasswordPolicyOutput) SetPasswordPolicy(v *PasswordPolicy) *GetAccountPasswordPolicyOutput { - s.PasswordPolicy = v - return s -} - -type GetAccountSummaryInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountSummaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountSummaryInput) GoString() string { - return s.String() -} - -// Contains the response to a successful GetAccountSummary request. -type GetAccountSummaryOutput struct { - _ struct{} `type:"structure"` - - // A set of key–value pairs containing information about IAM entity usage - // and IAM quotas. - SummaryMap map[string]*int64 `type:"map"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountSummaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountSummaryOutput) GoString() string { - return s.String() -} - -// SetSummaryMap sets the SummaryMap field's value. -func (s *GetAccountSummaryOutput) SetSummaryMap(v map[string]*int64) *GetAccountSummaryOutput { - s.SummaryMap = v - return s -} - -type GetContextKeysForCustomPolicyInput struct { - _ struct{} `type:"structure"` - - // A list of policies for which you want the list of context keys referenced - // in those policies. Each document is specified as a string containing the - // complete, valid JSON text of an IAM policy. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyInputList is a required field - PolicyInputList []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForCustomPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForCustomPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetContextKeysForCustomPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetContextKeysForCustomPolicyInput"} - if s.PolicyInputList == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyInputList")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *GetContextKeysForCustomPolicyInput) SetPolicyInputList(v []*string) *GetContextKeysForCustomPolicyInput { - s.PolicyInputList = v - return s -} - -// Contains the response to a successful GetContextKeysForPrincipalPolicy or -// GetContextKeysForCustomPolicy request. -type GetContextKeysForPolicyResponse struct { - _ struct{} `type:"structure"` - - // The list of context keys that are referenced in the input policies. - ContextKeyNames []*string `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForPolicyResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForPolicyResponse) GoString() string { - return s.String() -} - -// SetContextKeyNames sets the ContextKeyNames field's value. -func (s *GetContextKeysForPolicyResponse) SetContextKeyNames(v []*string) *GetContextKeysForPolicyResponse { - s.ContextKeyNames = v - return s -} - -type GetContextKeysForPrincipalPolicyInput struct { - _ struct{} `type:"structure"` - - // An optional list of additional policies for which you want the list of context - // keys that are referenced. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - PolicyInputList []*string `type:"list"` - - // The ARN of a user, group, or role whose policies contain the context keys - // that you want listed. If you specify a user, the list includes context keys - // that are found in all policies that are attached to the user. The list also - // includes all groups that the user is a member of. If you pick a group or - // a role, then it includes only those context keys that are found in policies - // attached to that entity. Note that all parameters are shown in unencoded - // form here for clarity, but must be URL encoded to be included as a part of - // a real HTML request. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicySourceArn is a required field - PolicySourceArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForPrincipalPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForPrincipalPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetContextKeysForPrincipalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetContextKeysForPrincipalPolicyInput"} - if s.PolicySourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicySourceArn")) - } - if s.PolicySourceArn != nil && len(*s.PolicySourceArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicySourceArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *GetContextKeysForPrincipalPolicyInput) SetPolicyInputList(v []*string) *GetContextKeysForPrincipalPolicyInput { - s.PolicyInputList = v - return s -} - -// SetPolicySourceArn sets the PolicySourceArn field's value. -func (s *GetContextKeysForPrincipalPolicyInput) SetPolicySourceArn(v string) *GetContextKeysForPrincipalPolicyInput { - s.PolicySourceArn = &v - return s -} - -type GetCredentialReportInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCredentialReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCredentialReportInput) GoString() string { - return s.String() -} - -// Contains the response to a successful GetCredentialReport request. -type GetCredentialReportOutput struct { - _ struct{} `type:"structure"` - - // Contains the credential report. The report is Base64-encoded. - // Content is automatically base64 encoded/decoded by the SDK. - Content []byte `type:"blob"` - - // The date and time when the credential report was created, in ISO 8601 date-time - // format (http://www.iso.org/iso/iso8601). - GeneratedTime *time.Time `type:"timestamp"` - - // The format (MIME type) of the credential report. - ReportFormat *string `type:"string" enum:"ReportFormatType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCredentialReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCredentialReportOutput) GoString() string { - return s.String() -} - -// SetContent sets the Content field's value. -func (s *GetCredentialReportOutput) SetContent(v []byte) *GetCredentialReportOutput { - s.Content = v - return s -} - -// SetGeneratedTime sets the GeneratedTime field's value. -func (s *GetCredentialReportOutput) SetGeneratedTime(v time.Time) *GetCredentialReportOutput { - s.GeneratedTime = &v - return s -} - -// SetReportFormat sets the ReportFormat field's value. -func (s *GetCredentialReportOutput) SetReportFormat(v string) *GetCredentialReportOutput { - s.ReportFormat = &v - return s -} - -type GetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupInput) SetGroupName(v string) *GetGroupInput { - s.GroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetGroupInput) SetMarker(v string) *GetGroupInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetGroupInput) SetMaxItems(v int64) *GetGroupInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful GetGroup request. -type GetGroupOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the group. - // - // Group is a required field - Group *Group `type:"structure" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of users in the group. - // - // Users is a required field - Users []*User `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupOutput) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *GetGroupOutput) SetGroup(v *Group) *GetGroupOutput { - s.Group = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetGroupOutput) SetIsTruncated(v bool) *GetGroupOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetGroupOutput) SetMarker(v string) *GetGroupOutput { - s.Marker = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *GetGroupOutput) SetUsers(v []*User) *GetGroupOutput { - s.Users = v - return s -} - -type GetGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the group the policy is associated with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The name of the policy document to get. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupPolicyInput) SetGroupName(v string) *GetGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetGroupPolicyInput) SetPolicyName(v string) *GetGroupPolicyInput { - s.PolicyName = &v - return s -} - -// Contains the response to a successful GetGroupPolicy request. -type GetGroupPolicyOutput struct { - _ struct{} `type:"structure"` - - // The group the policy is associated with. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The policy document. - // - // IAM stores policies in JSON format. However, resources that were created - // using CloudFormation templates can be formatted in YAML. CloudFormation always - // converts a YAML policy to JSON format before submitting it to IAM. - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupPolicyOutput) GoString() string { - return s.String() -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupPolicyOutput) SetGroupName(v string) *GetGroupPolicyOutput { - s.GroupName = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetGroupPolicyOutput) SetPolicyDocument(v string) *GetGroupPolicyOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetGroupPolicyOutput) SetPolicyName(v string) *GetGroupPolicyOutput { - s.PolicyName = &v - return s -} - -type GetInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to get information about. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *GetInstanceProfileInput) SetInstanceProfileName(v string) *GetInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// Contains the response to a successful GetInstanceProfile request. -type GetInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the instance profile. - // - // InstanceProfile is a required field - InstanceProfile *InstanceProfile `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *GetInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *GetInstanceProfileOutput { - s.InstanceProfile = v - return s -} - -type GetLoginProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the user whose login profile you want to retrieve. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetLoginProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetLoginProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoginProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoginProfileInput"} - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *GetLoginProfileInput) SetUserName(v string) *GetLoginProfileInput { - s.UserName = &v - return s -} - -// Contains the response to a successful GetLoginProfile request. -type GetLoginProfileOutput struct { - _ struct{} `type:"structure"` - - // A structure containing the user name and the profile creation date for the - // user. - // - // LoginProfile is a required field - LoginProfile *LoginProfile `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetLoginProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetLoginProfileOutput) GoString() string { - return s.String() -} - -// SetLoginProfile sets the LoginProfile field's value. -func (s *GetLoginProfileOutput) SetLoginProfile(v *LoginProfile) *GetLoginProfileOutput { - s.LoginProfile = v - return s -} - -type GetMFADeviceInput struct { - _ struct{} `type:"structure"` - - // Serial number that uniquely identifies the MFA device. For this API, we only - // accept FIDO security key ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html). - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The friendly name identifying the user. - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *GetMFADeviceInput) SetSerialNumber(v string) *GetMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetMFADeviceInput) SetUserName(v string) *GetMFADeviceInput { - s.UserName = &v - return s -} - -type GetMFADeviceOutput struct { - _ struct{} `type:"structure"` - - // The certifications of a specified user's MFA device. We currently provide - // FIPS-140-2, FIPS-140-3, and FIDO certification levels obtained from FIDO - // Alliance Metadata Service (MDS) (https://fidoalliance.org/metadata/). - Certifications map[string]*string `type:"map"` - - // The date that a specified user's MFA device was first enabled. - EnableDate *time.Time `type:"timestamp"` - - // Serial number that uniquely identifies the MFA device. For this API, we only - // accept FIDO security key ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html). - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The friendly name identifying the user. - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetMFADeviceOutput) GoString() string { - return s.String() -} - -// SetCertifications sets the Certifications field's value. -func (s *GetMFADeviceOutput) SetCertifications(v map[string]*string) *GetMFADeviceOutput { - s.Certifications = v - return s -} - -// SetEnableDate sets the EnableDate field's value. -func (s *GetMFADeviceOutput) SetEnableDate(v time.Time) *GetMFADeviceOutput { - s.EnableDate = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *GetMFADeviceOutput) SetSerialNumber(v string) *GetMFADeviceOutput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetMFADeviceOutput) SetUserName(v string) *GetMFADeviceOutput { - s.UserName = &v - return s -} - -type GetOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the OIDC provider resource object in IAM - // to get information for. You can get a list of OIDC provider resource ARNs - // by using the ListOpenIDConnectProviders operation. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOpenIDConnectProviderInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *GetOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *GetOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -// Contains the response to a successful GetOpenIDConnectProvider request. -type GetOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` - - // A list of client IDs (also known as audiences) that are associated with the - // specified IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider. - ClientIDList []*string `type:"list"` - - // The date and time when the IAM OIDC provider resource object was created - // in the Amazon Web Services account. - CreateDate *time.Time `type:"timestamp"` - - // A list of tags that are attached to the specified IAM OIDC provider. The - // returned list of tags is sorted by tag key. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // A list of certificate thumbprints that are associated with the specified - // IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider. - ThumbprintList []*string `type:"list"` - - // The URL that the IAM OIDC provider resource object is associated with. For - // more information, see CreateOpenIDConnectProvider. - Url *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -// SetClientIDList sets the ClientIDList field's value. -func (s *GetOpenIDConnectProviderOutput) SetClientIDList(v []*string) *GetOpenIDConnectProviderOutput { - s.ClientIDList = v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *GetOpenIDConnectProviderOutput) SetCreateDate(v time.Time) *GetOpenIDConnectProviderOutput { - s.CreateDate = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *GetOpenIDConnectProviderOutput) SetTags(v []*Tag) *GetOpenIDConnectProviderOutput { - s.Tags = v - return s -} - -// SetThumbprintList sets the ThumbprintList field's value. -func (s *GetOpenIDConnectProviderOutput) SetThumbprintList(v []*string) *GetOpenIDConnectProviderOutput { - s.ThumbprintList = v - return s -} - -// SetUrl sets the Url field's value. -func (s *GetOpenIDConnectProviderOutput) SetUrl(v string) *GetOpenIDConnectProviderOutput { - s.Url = &v - return s -} - -type GetOrganizationsAccessReportInput struct { - _ struct{} `type:"structure"` - - // The identifier of the request generated by the GenerateOrganizationsAccessReport - // operation. - // - // JobId is a required field - JobId *string `min:"36" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The key that is used to sort the results. If you choose the namespace key, - // the results are returned in alphabetical order. If you choose the time key, - // the results are sorted numerically by the date and time. - SortKey *string `type:"string" enum:"SortKeyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOrganizationsAccessReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOrganizationsAccessReportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOrganizationsAccessReportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOrganizationsAccessReportInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 36)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *GetOrganizationsAccessReportInput) SetJobId(v string) *GetOrganizationsAccessReportInput { - s.JobId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetOrganizationsAccessReportInput) SetMarker(v string) *GetOrganizationsAccessReportInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetOrganizationsAccessReportInput) SetMaxItems(v int64) *GetOrganizationsAccessReportInput { - s.MaxItems = &v - return s -} - -// SetSortKey sets the SortKey field's value. -func (s *GetOrganizationsAccessReportInput) SetSortKey(v string) *GetOrganizationsAccessReportInput { - s.SortKey = &v - return s -} - -type GetOrganizationsAccessReportOutput struct { - _ struct{} `type:"structure"` - - // An object that contains details about the most recent attempt to access the - // service. - AccessDetails []*AccessDetail `type:"list"` - - // Contains information about the reason that the operation failed. - // - // This data type is used as a response element in the GetOrganizationsAccessReport, - // GetServiceLastAccessedDetails, and GetServiceLastAccessedDetailsWithEntities - // operations. - ErrorDetails *ErrorDetails `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the generated report job was completed or failed. - // - // This field is null if the job is still in progress, as indicated by a job - // status value of IN_PROGRESS. - JobCompletionDate *time.Time `type:"timestamp"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the report job was created. - // - // JobCreationDate is a required field - JobCreationDate *time.Time `type:"timestamp" required:"true"` - - // The status of the job. - // - // JobStatus is a required field - JobStatus *string `type:"string" required:"true" enum:"JobStatusType"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `min:"1" type:"string"` - - // The number of services that the applicable SCPs allow account principals - // to access. - NumberOfServicesAccessible *int64 `type:"integer"` - - // The number of services that account principals are allowed but did not attempt - // to access. - NumberOfServicesNotAccessed *int64 `type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOrganizationsAccessReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOrganizationsAccessReportOutput) GoString() string { - return s.String() -} - -// SetAccessDetails sets the AccessDetails field's value. -func (s *GetOrganizationsAccessReportOutput) SetAccessDetails(v []*AccessDetail) *GetOrganizationsAccessReportOutput { - s.AccessDetails = v - return s -} - -// SetErrorDetails sets the ErrorDetails field's value. -func (s *GetOrganizationsAccessReportOutput) SetErrorDetails(v *ErrorDetails) *GetOrganizationsAccessReportOutput { - s.ErrorDetails = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetOrganizationsAccessReportOutput) SetIsTruncated(v bool) *GetOrganizationsAccessReportOutput { - s.IsTruncated = &v - return s -} - -// SetJobCompletionDate sets the JobCompletionDate field's value. -func (s *GetOrganizationsAccessReportOutput) SetJobCompletionDate(v time.Time) *GetOrganizationsAccessReportOutput { - s.JobCompletionDate = &v - return s -} - -// SetJobCreationDate sets the JobCreationDate field's value. -func (s *GetOrganizationsAccessReportOutput) SetJobCreationDate(v time.Time) *GetOrganizationsAccessReportOutput { - s.JobCreationDate = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *GetOrganizationsAccessReportOutput) SetJobStatus(v string) *GetOrganizationsAccessReportOutput { - s.JobStatus = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetOrganizationsAccessReportOutput) SetMarker(v string) *GetOrganizationsAccessReportOutput { - s.Marker = &v - return s -} - -// SetNumberOfServicesAccessible sets the NumberOfServicesAccessible field's value. -func (s *GetOrganizationsAccessReportOutput) SetNumberOfServicesAccessible(v int64) *GetOrganizationsAccessReportOutput { - s.NumberOfServicesAccessible = &v - return s -} - -// SetNumberOfServicesNotAccessed sets the NumberOfServicesNotAccessed field's value. -func (s *GetOrganizationsAccessReportOutput) SetNumberOfServicesNotAccessed(v int64) *GetOrganizationsAccessReportOutput { - s.NumberOfServicesNotAccessed = &v - return s -} - -type GetPolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the managed policy that you want information - // about. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *GetPolicyInput) SetPolicyArn(v string) *GetPolicyInput { - s.PolicyArn = &v - return s -} - -// Contains the response to a successful GetPolicy request. -type GetPolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the policy. - Policy *Policy `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetPolicyOutput) SetPolicy(v *Policy) *GetPolicyOutput { - s.Policy = v - return s -} - -type GetPolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the managed policy that you want information - // about. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // Identifies the policy version to retrieve. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consists of the lowercase letter 'v' followed - // by one or two digits, and optionally followed by a period '.' and a string - // of letters and digits. - // - // VersionId is a required field - VersionId *string `type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPolicyVersionInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.VersionId == nil { - invalidParams.Add(request.NewErrParamRequired("VersionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *GetPolicyVersionInput) SetPolicyArn(v string) *GetPolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetPolicyVersionInput) SetVersionId(v string) *GetPolicyVersionInput { - s.VersionId = &v - return s -} - -// Contains the response to a successful GetPolicyVersion request. -type GetPolicyVersionOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the policy version. - PolicyVersion *PolicyVersion `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyVersionOutput) GoString() string { - return s.String() -} - -// SetPolicyVersion sets the PolicyVersion field's value. -func (s *GetPolicyVersionOutput) SetPolicyVersion(v *PolicyVersion) *GetPolicyVersionOutput { - s.PolicyVersion = v - return s -} - -type GetRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM role to get information about. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *GetRoleInput) SetRoleName(v string) *GetRoleInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful GetRole request. -type GetRoleOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the IAM role. - // - // Role is a required field - Role *Role `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRoleOutput) GoString() string { - return s.String() -} - -// SetRole sets the Role field's value. -func (s *GetRoleOutput) SetRole(v *Role) *GetRoleOutput { - s.Role = v - return s -} - -type GetRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy document to get. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name of the role associated with the policy. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRolePolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetRolePolicyInput) SetPolicyName(v string) *GetRolePolicyInput { - s.PolicyName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *GetRolePolicyInput) SetRoleName(v string) *GetRolePolicyInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful GetRolePolicy request. -type GetRolePolicyOutput struct { - _ struct{} `type:"structure"` - - // The policy document. - // - // IAM stores policies in JSON format. However, resources that were created - // using CloudFormation templates can be formatted in YAML. CloudFormation always - // converts a YAML policy to JSON format before submitting it to IAM. - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The role the policy is associated with. - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRolePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetRolePolicyOutput) SetPolicyDocument(v string) *GetRolePolicyOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetRolePolicyOutput) SetPolicyName(v string) *GetRolePolicyOutput { - s.PolicyName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *GetRolePolicyOutput) SetRoleName(v string) *GetRolePolicyOutput { - s.RoleName = &v - return s -} - -type GetSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SAML provider resource object in IAM - // to get information about. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSAMLProviderInput"} - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *GetSAMLProviderInput) SetSAMLProviderArn(v string) *GetSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -// Contains the response to a successful GetSAMLProvider request. -type GetSAMLProviderOutput struct { - _ struct{} `type:"structure"` - - // The date and time when the SAML provider was created. - CreateDate *time.Time `type:"timestamp"` - - // The XML metadata document that includes information about an identity provider. - SAMLMetadataDocument *string `min:"1000" type:"string"` - - // A list of tags that are attached to the specified IAM SAML provider. The - // returned list of tags is sorted by tag key. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The expiration date and time for the SAML provider. - ValidUntil *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSAMLProviderOutput) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *GetSAMLProviderOutput) SetCreateDate(v time.Time) *GetSAMLProviderOutput { - s.CreateDate = &v - return s -} - -// SetSAMLMetadataDocument sets the SAMLMetadataDocument field's value. -func (s *GetSAMLProviderOutput) SetSAMLMetadataDocument(v string) *GetSAMLProviderOutput { - s.SAMLMetadataDocument = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *GetSAMLProviderOutput) SetTags(v []*Tag) *GetSAMLProviderOutput { - s.Tags = v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *GetSAMLProviderOutput) SetValidUntil(v time.Time) *GetSAMLProviderOutput { - s.ValidUntil = &v - return s -} - -type GetSSHPublicKeyInput struct { - _ struct{} `type:"structure"` - - // Specifies the public key encoding format to use in the response. To retrieve - // the public key in ssh-rsa format, use SSH. To retrieve the public key in - // PEM format, use PEM. - // - // Encoding is a required field - Encoding *string `type:"string" required:"true" enum:"EncodingType"` - - // The unique identifier for the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The name of the IAM user associated with the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSSHPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSSHPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSSHPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSSHPublicKeyInput"} - if s.Encoding == nil { - invalidParams.Add(request.NewErrParamRequired("Encoding")) - } - if s.SSHPublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) - } - if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncoding sets the Encoding field's value. -func (s *GetSSHPublicKeyInput) SetEncoding(v string) *GetSSHPublicKeyInput { - s.Encoding = &v - return s -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *GetSSHPublicKeyInput) SetSSHPublicKeyId(v string) *GetSSHPublicKeyInput { - s.SSHPublicKeyId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetSSHPublicKeyInput) SetUserName(v string) *GetSSHPublicKeyInput { - s.UserName = &v - return s -} - -// Contains the response to a successful GetSSHPublicKey request. -type GetSSHPublicKeyOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the SSH public key. - SSHPublicKey *SSHPublicKey `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSSHPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSSHPublicKeyOutput) GoString() string { - return s.String() -} - -// SetSSHPublicKey sets the SSHPublicKey field's value. -func (s *GetSSHPublicKeyOutput) SetSSHPublicKey(v *SSHPublicKey) *GetSSHPublicKeyOutput { - s.SSHPublicKey = v - return s -} - -type GetServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the server certificate you want to retrieve information about. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServerCertificateInput"} - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *GetServerCertificateInput) SetServerCertificateName(v string) *GetServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -// Contains the response to a successful GetServerCertificate request. -type GetServerCertificateOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the server certificate. - // - // ServerCertificate is a required field - ServerCertificate *ServerCertificate `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServerCertificateOutput) GoString() string { - return s.String() -} - -// SetServerCertificate sets the ServerCertificate field's value. -func (s *GetServerCertificateOutput) SetServerCertificate(v *ServerCertificate) *GetServerCertificateOutput { - s.ServerCertificate = v - return s -} - -type GetServiceLastAccessedDetailsInput struct { - _ struct{} `type:"structure"` - - // The ID of the request generated by the GenerateServiceLastAccessedDetails - // operation. The JobId returned by GenerateServiceLastAccessedDetail must be - // used by the same role within a session, or by the same user when used to - // call GetServiceLastAccessedDetail. - // - // JobId is a required field - JobId *string `min:"36" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServiceLastAccessedDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServiceLastAccessedDetailsInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 36)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *GetServiceLastAccessedDetailsInput) SetJobId(v string) *GetServiceLastAccessedDetailsInput { - s.JobId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetServiceLastAccessedDetailsInput) SetMarker(v string) *GetServiceLastAccessedDetailsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetServiceLastAccessedDetailsInput) SetMaxItems(v int64) *GetServiceLastAccessedDetailsInput { - s.MaxItems = &v - return s -} - -type GetServiceLastAccessedDetailsOutput struct { - _ struct{} `type:"structure"` - - // An object that contains details about the reason the operation failed. - Error *ErrorDetails `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the generated report job was completed or failed. - // - // This field is null if the job is still in progress, as indicated by a job - // status value of IN_PROGRESS. - // - // JobCompletionDate is a required field - JobCompletionDate *time.Time `type:"timestamp" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the report job was created. - // - // JobCreationDate is a required field - JobCreationDate *time.Time `type:"timestamp" required:"true"` - - // The status of the job. - // - // JobStatus is a required field - JobStatus *string `type:"string" required:"true" enum:"JobStatusType"` - - // The type of job. Service jobs return information about when each service - // was last accessed. Action jobs also include information about when tracked - // actions within the service were last accessed. - JobType *string `type:"string" enum:"AccessAdvisorUsageGranularityType"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A ServiceLastAccessed object that contains details about the most recent - // attempt to access the service. - // - // ServicesLastAccessed is a required field - ServicesLastAccessed []*ServiceLastAccessed `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsOutput) GoString() string { - return s.String() -} - -// SetError sets the Error field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetError(v *ErrorDetails) *GetServiceLastAccessedDetailsOutput { - s.Error = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetIsTruncated(v bool) *GetServiceLastAccessedDetailsOutput { - s.IsTruncated = &v - return s -} - -// SetJobCompletionDate sets the JobCompletionDate field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetJobCompletionDate(v time.Time) *GetServiceLastAccessedDetailsOutput { - s.JobCompletionDate = &v - return s -} - -// SetJobCreationDate sets the JobCreationDate field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetJobCreationDate(v time.Time) *GetServiceLastAccessedDetailsOutput { - s.JobCreationDate = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetJobStatus(v string) *GetServiceLastAccessedDetailsOutput { - s.JobStatus = &v - return s -} - -// SetJobType sets the JobType field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetJobType(v string) *GetServiceLastAccessedDetailsOutput { - s.JobType = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetMarker(v string) *GetServiceLastAccessedDetailsOutput { - s.Marker = &v - return s -} - -// SetServicesLastAccessed sets the ServicesLastAccessed field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetServicesLastAccessed(v []*ServiceLastAccessed) *GetServiceLastAccessedDetailsOutput { - s.ServicesLastAccessed = v - return s -} - -type GetServiceLastAccessedDetailsWithEntitiesInput struct { - _ struct{} `type:"structure"` - - // The ID of the request generated by the GenerateServiceLastAccessedDetails - // operation. - // - // JobId is a required field - JobId *string `min:"36" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The service namespace for an Amazon Web Services service. Provide the service - // namespace to learn when the IAM entity last attempted to access the specified - // service. - // - // To learn the service namespace for a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the IAM User Guide. Choose the name of the service to view details for - // that service. In the first paragraph, find the service prefix. For example, - // (service prefix: a4b). For more information about service namespaces, see - // Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsWithEntitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsWithEntitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServiceLastAccessedDetailsWithEntitiesInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 36)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - if s.ServiceNamespace != nil && len(*s.ServiceNamespace) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceNamespace", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetJobId(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { - s.JobId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetMarker(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetMaxItems(v int64) *GetServiceLastAccessedDetailsWithEntitiesInput { - s.MaxItems = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetServiceNamespace(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { - s.ServiceNamespace = &v - return s -} - -type GetServiceLastAccessedDetailsWithEntitiesOutput struct { - _ struct{} `type:"structure"` - - // An EntityDetailsList object that contains details about when an IAM entity - // (user or role) used group or policy permissions in an attempt to access the - // specified Amazon Web Services service. - // - // EntityDetailsList is a required field - EntityDetailsList []*EntityDetails `type:"list" required:"true"` - - // An object that contains details about the reason the operation failed. - Error *ErrorDetails `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the generated report job was completed or failed. - // - // This field is null if the job is still in progress, as indicated by a job - // status value of IN_PROGRESS. - // - // JobCompletionDate is a required field - JobCompletionDate *time.Time `type:"timestamp" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the report job was created. - // - // JobCreationDate is a required field - JobCreationDate *time.Time `type:"timestamp" required:"true"` - - // The status of the job. - // - // JobStatus is a required field - JobStatus *string `type:"string" required:"true" enum:"JobStatusType"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsWithEntitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsWithEntitiesOutput) GoString() string { - return s.String() -} - -// SetEntityDetailsList sets the EntityDetailsList field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetEntityDetailsList(v []*EntityDetails) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.EntityDetailsList = v - return s -} - -// SetError sets the Error field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetError(v *ErrorDetails) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.Error = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetIsTruncated(v bool) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.IsTruncated = &v - return s -} - -// SetJobCompletionDate sets the JobCompletionDate field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobCompletionDate(v time.Time) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.JobCompletionDate = &v - return s -} - -// SetJobCreationDate sets the JobCreationDate field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobCreationDate(v time.Time) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.JobCreationDate = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobStatus(v string) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.JobStatus = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetMarker(v string) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.Marker = &v - return s -} - -type GetServiceLinkedRoleDeletionStatusInput struct { - _ struct{} `type:"structure"` - - // The deletion task identifier. This identifier is returned by the DeleteServiceLinkedRole - // operation in the format task/aws-service-role///. - // - // DeletionTaskId is a required field - DeletionTaskId *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLinkedRoleDeletionStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLinkedRoleDeletionStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServiceLinkedRoleDeletionStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServiceLinkedRoleDeletionStatusInput"} - if s.DeletionTaskId == nil { - invalidParams.Add(request.NewErrParamRequired("DeletionTaskId")) - } - if s.DeletionTaskId != nil && len(*s.DeletionTaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeletionTaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeletionTaskId sets the DeletionTaskId field's value. -func (s *GetServiceLinkedRoleDeletionStatusInput) SetDeletionTaskId(v string) *GetServiceLinkedRoleDeletionStatusInput { - s.DeletionTaskId = &v - return s -} - -type GetServiceLinkedRoleDeletionStatusOutput struct { - _ struct{} `type:"structure"` - - // An object that contains details about the reason the deletion failed. - Reason *DeletionTaskFailureReasonType `type:"structure"` - - // The status of the deletion. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"DeletionTaskStatusType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLinkedRoleDeletionStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLinkedRoleDeletionStatusOutput) GoString() string { - return s.String() -} - -// SetReason sets the Reason field's value. -func (s *GetServiceLinkedRoleDeletionStatusOutput) SetReason(v *DeletionTaskFailureReasonType) *GetServiceLinkedRoleDeletionStatusOutput { - s.Reason = v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetServiceLinkedRoleDeletionStatusOutput) SetStatus(v string) *GetServiceLinkedRoleDeletionStatusOutput { - s.Status = &v - return s -} - -type GetUserInput struct { - _ struct{} `type:"structure"` - - // The name of the user to get information about. - // - // This parameter is optional. If it is not included, it defaults to the user - // making the request. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserInput"} - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *GetUserInput) SetUserName(v string) *GetUserInput { - s.UserName = &v - return s -} - -// Contains the response to a successful GetUser request. -type GetUserOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the IAM user. - // - // Due to a service issue, password last used data does not include password - // use from May 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last - // sign-in (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html) - // dates shown in the IAM console and password last used dates in the IAM credential - // report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html), - // and returned by this operation. If users signed in during the affected time, - // the password last used date that is returned is the date the user last signed - // in before May 3, 2018. For users that signed in after May 23, 2018 14:08 - // PDT, the returned password last used date is accurate. - // - // You can use password last used information to identify unused credentials - // for deletion. For example, you might delete users who did not sign in to - // Amazon Web Services in the last 90 days. In cases like this, we recommend - // that you adjust your evaluation window to include dates after May 23, 2018. - // Alternatively, if your users use access keys to access Amazon Web Services - // programmatically you can refer to access key last used information because - // it is accurate for all dates. - // - // User is a required field - User *User `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserOutput) GoString() string { - return s.String() -} - -// SetUser sets the User field's value. -func (s *GetUserOutput) SetUser(v *User) *GetUserOutput { - s.User = v - return s -} - -type GetUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy document to get. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name of the user who the policy is associated with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetUserPolicyInput) SetPolicyName(v string) *GetUserPolicyInput { - s.PolicyName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetUserPolicyInput) SetUserName(v string) *GetUserPolicyInput { - s.UserName = &v - return s -} - -// Contains the response to a successful GetUserPolicy request. -type GetUserPolicyOutput struct { - _ struct{} `type:"structure"` - - // The policy document. - // - // IAM stores policies in JSON format. However, resources that were created - // using CloudFormation templates can be formatted in YAML. CloudFormation always - // converts a YAML policy to JSON format before submitting it to IAM. - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The user the policy is associated with. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetUserPolicyOutput) SetPolicyDocument(v string) *GetUserPolicyOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetUserPolicyOutput) SetPolicyName(v string) *GetUserPolicyOutput { - s.PolicyName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetUserPolicyOutput) SetUserName(v string) *GetUserPolicyOutput { - s.UserName = &v - return s -} - -// Contains information about an IAM group entity. -// -// This data type is used as a response element in the following operations: -// -// - CreateGroup -// -// - GetGroup -// -// - ListGroups -type Group struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) specifying the group. For more information - // about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the group was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The stable and unique string identifying the group. For more information - // about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // GroupId is a required field - GroupId *string `min:"16" type:"string" required:"true"` - - // The friendly name that identifies the group. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The path to the group. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Group) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Group) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Group) SetArn(v string) *Group { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Group) SetCreateDate(v time.Time) *Group { - s.CreateDate = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *Group) SetGroupId(v string) *Group { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *Group) SetGroupName(v string) *Group { - s.GroupName = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Group) SetPath(v string) *Group { - s.Path = &v - return s -} - -// Contains information about an IAM group, including all of the group's policies. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -type GroupDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // A list of the managed policies attached to the group. - AttachedManagedPolicies []*AttachedPolicy `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the group was created. - CreateDate *time.Time `type:"timestamp"` - - // The stable and unique string identifying the group. For more information - // about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - GroupId *string `min:"16" type:"string"` - - // The friendly name that identifies the group. - GroupName *string `min:"1" type:"string"` - - // A list of the inline policies embedded in the group. - GroupPolicyList []*PolicyDetail `type:"list"` - - // The path to the group. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GroupDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GroupDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *GroupDetail) SetArn(v string) *GroupDetail { - s.Arn = &v - return s -} - -// SetAttachedManagedPolicies sets the AttachedManagedPolicies field's value. -func (s *GroupDetail) SetAttachedManagedPolicies(v []*AttachedPolicy) *GroupDetail { - s.AttachedManagedPolicies = v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *GroupDetail) SetCreateDate(v time.Time) *GroupDetail { - s.CreateDate = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *GroupDetail) SetGroupId(v string) *GroupDetail { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *GroupDetail) SetGroupName(v string) *GroupDetail { - s.GroupName = &v - return s -} - -// SetGroupPolicyList sets the GroupPolicyList field's value. -func (s *GroupDetail) SetGroupPolicyList(v []*PolicyDetail) *GroupDetail { - s.GroupPolicyList = v - return s -} - -// SetPath sets the Path field's value. -func (s *GroupDetail) SetPath(v string) *GroupDetail { - s.Path = &v - return s -} - -// Contains information about an instance profile. -// -// This data type is used as a response element in the following operations: -// -// - CreateInstanceProfile -// -// - GetInstanceProfile -// -// - ListInstanceProfiles -// -// - ListInstanceProfilesForRole -type InstanceProfile struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) specifying the instance profile. For more - // information about ARNs and how to use them in policies, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The date when the instance profile was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The stable and unique string identifying the instance profile. For more information - // about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // InstanceProfileId is a required field - InstanceProfileId *string `min:"16" type:"string" required:"true"` - - // The name identifying the instance profile. - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The path to the instance profile. For more information about paths, see IAM - // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // The role associated with the instance profile. - // - // Roles is a required field - Roles []*Role `type:"list" required:"true"` - - // A list of tags that are attached to the instance profile. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InstanceProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InstanceProfile) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *InstanceProfile) SetArn(v string) *InstanceProfile { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *InstanceProfile) SetCreateDate(v time.Time) *InstanceProfile { - s.CreateDate = &v - return s -} - -// SetInstanceProfileId sets the InstanceProfileId field's value. -func (s *InstanceProfile) SetInstanceProfileId(v string) *InstanceProfile { - s.InstanceProfileId = &v - return s -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *InstanceProfile) SetInstanceProfileName(v string) *InstanceProfile { - s.InstanceProfileName = &v - return s -} - -// SetPath sets the Path field's value. -func (s *InstanceProfile) SetPath(v string) *InstanceProfile { - s.Path = &v - return s -} - -// SetRoles sets the Roles field's value. -func (s *InstanceProfile) SetRoles(v []*Role) *InstanceProfile { - s.Roles = v - return s -} - -// SetTags sets the Tags field's value. -func (s *InstanceProfile) SetTags(v []*Tag) *InstanceProfile { - s.Tags = v - return s -} - -type ListAccessKeysInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the user. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccessKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccessKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAccessKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAccessKeysInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListAccessKeysInput) SetMarker(v string) *ListAccessKeysInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAccessKeysInput) SetMaxItems(v int64) *ListAccessKeysInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListAccessKeysInput) SetUserName(v string) *ListAccessKeysInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListAccessKeys request. -type ListAccessKeysOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing metadata about the access keys. - // - // AccessKeyMetadata is a required field - AccessKeyMetadata []*AccessKeyMetadata `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccessKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccessKeysOutput) GoString() string { - return s.String() -} - -// SetAccessKeyMetadata sets the AccessKeyMetadata field's value. -func (s *ListAccessKeysOutput) SetAccessKeyMetadata(v []*AccessKeyMetadata) *ListAccessKeysOutput { - s.AccessKeyMetadata = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAccessKeysOutput) SetIsTruncated(v bool) *ListAccessKeysOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAccessKeysOutput) SetMarker(v string) *ListAccessKeysOutput { - s.Marker = &v - return s -} - -type ListAccountAliasesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccountAliasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccountAliasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAccountAliasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAccountAliasesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListAccountAliasesInput) SetMarker(v string) *ListAccountAliasesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAccountAliasesInput) SetMaxItems(v int64) *ListAccountAliasesInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful ListAccountAliases request. -type ListAccountAliasesOutput struct { - _ struct{} `type:"structure"` - - // A list of aliases associated with the account. Amazon Web Services supports - // only one alias per account. - // - // AccountAliases is a required field - AccountAliases []*string `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccountAliasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccountAliasesOutput) GoString() string { - return s.String() -} - -// SetAccountAliases sets the AccountAliases field's value. -func (s *ListAccountAliasesOutput) SetAccountAliases(v []*string) *ListAccountAliasesOutput { - s.AccountAliases = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAccountAliasesOutput) SetIsTruncated(v bool) *ListAccountAliasesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAccountAliasesOutput) SetMarker(v string) *ListAccountAliasesOutput { - s.Marker = &v - return s -} - -type ListAttachedGroupPoliciesInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the group to list attached policies - // for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all policies. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedGroupPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedGroupPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttachedGroupPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttachedGroupPoliciesInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *ListAttachedGroupPoliciesInput) SetGroupName(v string) *ListAttachedGroupPoliciesInput { - s.GroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedGroupPoliciesInput) SetMarker(v string) *ListAttachedGroupPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAttachedGroupPoliciesInput) SetMaxItems(v int64) *ListAttachedGroupPoliciesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListAttachedGroupPoliciesInput) SetPathPrefix(v string) *ListAttachedGroupPoliciesInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListAttachedGroupPolicies request. -type ListAttachedGroupPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A list of the attached policies. - AttachedPolicies []*AttachedPolicy `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedGroupPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedGroupPoliciesOutput) GoString() string { - return s.String() -} - -// SetAttachedPolicies sets the AttachedPolicies field's value. -func (s *ListAttachedGroupPoliciesOutput) SetAttachedPolicies(v []*AttachedPolicy) *ListAttachedGroupPoliciesOutput { - s.AttachedPolicies = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAttachedGroupPoliciesOutput) SetIsTruncated(v bool) *ListAttachedGroupPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedGroupPoliciesOutput) SetMarker(v string) *ListAttachedGroupPoliciesOutput { - s.Marker = &v - return s -} - -type ListAttachedRolePoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all policies. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` - - // The name (friendly name, not ARN) of the role to list attached policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedRolePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedRolePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttachedRolePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttachedRolePoliciesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedRolePoliciesInput) SetMarker(v string) *ListAttachedRolePoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAttachedRolePoliciesInput) SetMaxItems(v int64) *ListAttachedRolePoliciesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListAttachedRolePoliciesInput) SetPathPrefix(v string) *ListAttachedRolePoliciesInput { - s.PathPrefix = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ListAttachedRolePoliciesInput) SetRoleName(v string) *ListAttachedRolePoliciesInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful ListAttachedRolePolicies request. -type ListAttachedRolePoliciesOutput struct { - _ struct{} `type:"structure"` - - // A list of the attached policies. - AttachedPolicies []*AttachedPolicy `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedRolePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedRolePoliciesOutput) GoString() string { - return s.String() -} - -// SetAttachedPolicies sets the AttachedPolicies field's value. -func (s *ListAttachedRolePoliciesOutput) SetAttachedPolicies(v []*AttachedPolicy) *ListAttachedRolePoliciesOutput { - s.AttachedPolicies = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAttachedRolePoliciesOutput) SetIsTruncated(v bool) *ListAttachedRolePoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedRolePoliciesOutput) SetMarker(v string) *ListAttachedRolePoliciesOutput { - s.Marker = &v - return s -} - -type ListAttachedUserPoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all policies. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` - - // The name (friendly name, not ARN) of the user to list attached policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedUserPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedUserPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttachedUserPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttachedUserPoliciesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedUserPoliciesInput) SetMarker(v string) *ListAttachedUserPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAttachedUserPoliciesInput) SetMaxItems(v int64) *ListAttachedUserPoliciesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListAttachedUserPoliciesInput) SetPathPrefix(v string) *ListAttachedUserPoliciesInput { - s.PathPrefix = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListAttachedUserPoliciesInput) SetUserName(v string) *ListAttachedUserPoliciesInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListAttachedUserPolicies request. -type ListAttachedUserPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A list of the attached policies. - AttachedPolicies []*AttachedPolicy `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedUserPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedUserPoliciesOutput) GoString() string { - return s.String() -} - -// SetAttachedPolicies sets the AttachedPolicies field's value. -func (s *ListAttachedUserPoliciesOutput) SetAttachedPolicies(v []*AttachedPolicy) *ListAttachedUserPoliciesOutput { - s.AttachedPolicies = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAttachedUserPoliciesOutput) SetIsTruncated(v bool) *ListAttachedUserPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedUserPoliciesOutput) SetMarker(v string) *ListAttachedUserPoliciesOutput { - s.Marker = &v - return s -} - -type ListEntitiesForPolicyInput struct { - _ struct{} `type:"structure"` - - // The entity type to use for filtering the results. - // - // For example, when EntityFilter is Role, only the roles that are attached - // to the specified policy are returned. This parameter is optional. If it is - // not included, all attached entities (users, groups, and roles) are returned. - // The argument for this parameter must be one of the valid values listed below. - EntityFilter *string `type:"string" enum:"EntityType"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all entities. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the IAM policy for which you want the versions. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The policy usage method to use for filtering the results. - // - // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy. - // To list only the policies used to set permissions boundaries, set the value - // to PermissionsBoundary. - // - // This parameter is optional. If it is not included, all policies are returned. - PolicyUsageFilter *string `type:"string" enum:"PolicyUsageType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListEntitiesForPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListEntitiesForPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEntitiesForPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEntitiesForPolicyInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntityFilter sets the EntityFilter field's value. -func (s *ListEntitiesForPolicyInput) SetEntityFilter(v string) *ListEntitiesForPolicyInput { - s.EntityFilter = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListEntitiesForPolicyInput) SetMarker(v string) *ListEntitiesForPolicyInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListEntitiesForPolicyInput) SetMaxItems(v int64) *ListEntitiesForPolicyInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListEntitiesForPolicyInput) SetPathPrefix(v string) *ListEntitiesForPolicyInput { - s.PathPrefix = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *ListEntitiesForPolicyInput) SetPolicyArn(v string) *ListEntitiesForPolicyInput { - s.PolicyArn = &v - return s -} - -// SetPolicyUsageFilter sets the PolicyUsageFilter field's value. -func (s *ListEntitiesForPolicyInput) SetPolicyUsageFilter(v string) *ListEntitiesForPolicyInput { - s.PolicyUsageFilter = &v - return s -} - -// Contains the response to a successful ListEntitiesForPolicy request. -type ListEntitiesForPolicyOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of IAM groups that the policy is attached to. - PolicyGroups []*PolicyGroup `type:"list"` - - // A list of IAM roles that the policy is attached to. - PolicyRoles []*PolicyRole `type:"list"` - - // A list of IAM users that the policy is attached to. - PolicyUsers []*PolicyUser `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListEntitiesForPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListEntitiesForPolicyOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListEntitiesForPolicyOutput) SetIsTruncated(v bool) *ListEntitiesForPolicyOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListEntitiesForPolicyOutput) SetMarker(v string) *ListEntitiesForPolicyOutput { - s.Marker = &v - return s -} - -// SetPolicyGroups sets the PolicyGroups field's value. -func (s *ListEntitiesForPolicyOutput) SetPolicyGroups(v []*PolicyGroup) *ListEntitiesForPolicyOutput { - s.PolicyGroups = v - return s -} - -// SetPolicyRoles sets the PolicyRoles field's value. -func (s *ListEntitiesForPolicyOutput) SetPolicyRoles(v []*PolicyRole) *ListEntitiesForPolicyOutput { - s.PolicyRoles = v - return s -} - -// SetPolicyUsers sets the PolicyUsers field's value. -func (s *ListEntitiesForPolicyOutput) SetPolicyUsers(v []*PolicyUser) *ListEntitiesForPolicyOutput { - s.PolicyUsers = v - return s -} - -type ListGroupPoliciesInput struct { - _ struct{} `type:"structure"` - - // The name of the group to list policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupPoliciesInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *ListGroupPoliciesInput) SetGroupName(v string) *ListGroupPoliciesInput { - s.GroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupPoliciesInput) SetMarker(v string) *ListGroupPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListGroupPoliciesInput) SetMaxItems(v int64) *ListGroupPoliciesInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful ListGroupPolicies request. -type ListGroupPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policy names. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyNames is a required field - PolicyNames []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupPoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListGroupPoliciesOutput) SetIsTruncated(v bool) *ListGroupPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupPoliciesOutput) SetMarker(v string) *ListGroupPoliciesOutput { - s.Marker = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListGroupPoliciesOutput) SetPolicyNames(v []*string) *ListGroupPoliciesOutput { - s.PolicyNames = v - return s -} - -type ListGroupsForUserInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the user to list groups for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsForUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsForUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupsForUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupsForUserInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupsForUserInput) SetMarker(v string) *ListGroupsForUserInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListGroupsForUserInput) SetMaxItems(v int64) *ListGroupsForUserInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListGroupsForUserInput) SetUserName(v string) *ListGroupsForUserInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListGroupsForUser request. -type ListGroupsForUserOutput struct { - _ struct{} `type:"structure"` - - // A list of groups. - // - // Groups is a required field - Groups []*Group `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsForUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsForUserOutput) GoString() string { - return s.String() -} - -// SetGroups sets the Groups field's value. -func (s *ListGroupsForUserOutput) SetGroups(v []*Group) *ListGroupsForUserOutput { - s.Groups = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListGroupsForUserOutput) SetIsTruncated(v bool) *ListGroupsForUserOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupsForUserOutput) SetMarker(v string) *ListGroupsForUserOutput { - s.Marker = &v - return s -} - -type ListGroupsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example, the prefix /division_abc/subdivision_xyz/ - // gets all groups whose path starts with /division_abc/subdivision_xyz/. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all groups. This parameter allows (through its regex pattern - // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either - // a forward slash (/) by itself or a string that must begin and end with forward - // slashes. In addition, it can contain any ASCII character from the ! (\u0021) - // through the DEL character (\u007F), including most punctuation characters, - // digits, and upper and lowercased letters. - PathPrefix *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupsInput) SetMarker(v string) *ListGroupsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListGroupsInput) SetMaxItems(v int64) *ListGroupsInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListGroupsInput) SetPathPrefix(v string) *ListGroupsInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListGroups request. -type ListGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of groups. - // - // Groups is a required field - Groups []*Group `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsOutput) GoString() string { - return s.String() -} - -// SetGroups sets the Groups field's value. -func (s *ListGroupsOutput) SetGroups(v []*Group) *ListGroupsOutput { - s.Groups = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListGroupsOutput) SetIsTruncated(v bool) *ListGroupsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupsOutput) SetMarker(v string) *ListGroupsOutput { - s.Marker = &v - return s -} - -type ListInstanceProfileTagsInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM instance profile whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfileTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfileTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceProfileTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfileTagsInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *ListInstanceProfileTagsInput) SetInstanceProfileName(v string) *ListInstanceProfileTagsInput { - s.InstanceProfileName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfileTagsInput) SetMarker(v string) *ListInstanceProfileTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListInstanceProfileTagsInput) SetMaxItems(v int64) *ListInstanceProfileTagsInput { - s.MaxItems = &v - return s -} - -type ListInstanceProfileTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the IAM instance profile. - // Each tag consists of a key name and an associated value. If no tags are attached - // to the specified resource, the response contains an empty list. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfileTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfileTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListInstanceProfileTagsOutput) SetIsTruncated(v bool) *ListInstanceProfileTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfileTagsOutput) SetMarker(v string) *ListInstanceProfileTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListInstanceProfileTagsOutput) SetTags(v []*Tag) *ListInstanceProfileTagsOutput { - s.Tags = v - return s -} - -type ListInstanceProfilesForRoleInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the role to list instance profiles for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesForRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesForRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceProfilesForRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesForRoleInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfilesForRoleInput) SetMarker(v string) *ListInstanceProfilesForRoleInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListInstanceProfilesForRoleInput) SetMaxItems(v int64) *ListInstanceProfilesForRoleInput { - s.MaxItems = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ListInstanceProfilesForRoleInput) SetRoleName(v string) *ListInstanceProfilesForRoleInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful ListInstanceProfilesForRole request. -type ListInstanceProfilesForRoleOutput struct { - _ struct{} `type:"structure"` - - // A list of instance profiles. - // - // InstanceProfiles is a required field - InstanceProfiles []*InstanceProfile `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesForRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesForRoleOutput) GoString() string { - return s.String() -} - -// SetInstanceProfiles sets the InstanceProfiles field's value. -func (s *ListInstanceProfilesForRoleOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesForRoleOutput { - s.InstanceProfiles = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListInstanceProfilesForRoleOutput) SetIsTruncated(v bool) *ListInstanceProfilesForRoleOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfilesForRoleOutput) SetMarker(v string) *ListInstanceProfilesForRoleOutput { - s.Marker = &v - return s -} - -type ListInstanceProfilesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example, the prefix /application_abc/component_xyz/ - // gets all instance profiles whose path starts with /application_abc/component_xyz/. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all instance profiles. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex)) a string of characters consisting - // of either a forward slash (/) by itself or a string that must begin and end - // with forward slashes. In addition, it can contain any ASCII character from - // the ! (\u0021) through the DEL character (\u007F), including most punctuation - // characters, digits, and upper and lowercased letters. - PathPrefix *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceProfilesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfilesInput) SetMarker(v string) *ListInstanceProfilesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListInstanceProfilesInput) SetMaxItems(v int64) *ListInstanceProfilesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListInstanceProfilesInput) SetPathPrefix(v string) *ListInstanceProfilesInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListInstanceProfiles request. -type ListInstanceProfilesOutput struct { - _ struct{} `type:"structure"` - - // A list of instance profiles. - // - // InstanceProfiles is a required field - InstanceProfiles []*InstanceProfile `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesOutput) GoString() string { - return s.String() -} - -// SetInstanceProfiles sets the InstanceProfiles field's value. -func (s *ListInstanceProfilesOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesOutput { - s.InstanceProfiles = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListInstanceProfilesOutput) SetIsTruncated(v bool) *ListInstanceProfilesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfilesOutput) SetMarker(v string) *ListInstanceProfilesOutput { - s.Marker = &v - return s -} - -type ListMFADeviceTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The unique identifier for the IAM virtual MFA device whose tags you want - // to see. For virtual MFA devices, the serial number is the same as the ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADeviceTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADeviceTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMFADeviceTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMFADeviceTagsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListMFADeviceTagsInput) SetMarker(v string) *ListMFADeviceTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListMFADeviceTagsInput) SetMaxItems(v int64) *ListMFADeviceTagsInput { - s.MaxItems = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *ListMFADeviceTagsInput) SetSerialNumber(v string) *ListMFADeviceTagsInput { - s.SerialNumber = &v - return s -} - -type ListMFADeviceTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the virtual MFA device. Each - // tag consists of a key name and an associated value. If no tags are attached - // to the specified resource, the response contains an empty list. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADeviceTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADeviceTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListMFADeviceTagsOutput) SetIsTruncated(v bool) *ListMFADeviceTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListMFADeviceTagsOutput) SetMarker(v string) *ListMFADeviceTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListMFADeviceTagsOutput) SetTags(v []*Tag) *ListMFADeviceTagsOutput { - s.Tags = v - return s -} - -type ListMFADevicesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the user whose MFA devices you want to list. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMFADevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMFADevicesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListMFADevicesInput) SetMarker(v string) *ListMFADevicesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListMFADevicesInput) SetMaxItems(v int64) *ListMFADevicesInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListMFADevicesInput) SetUserName(v string) *ListMFADevicesInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListMFADevices request. -type ListMFADevicesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // A list of MFA devices. - // - // MFADevices is a required field - MFADevices []*MFADevice `type:"list" required:"true"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADevicesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListMFADevicesOutput) SetIsTruncated(v bool) *ListMFADevicesOutput { - s.IsTruncated = &v - return s -} - -// SetMFADevices sets the MFADevices field's value. -func (s *ListMFADevicesOutput) SetMFADevices(v []*MFADevice) *ListMFADevicesOutput { - s.MFADevices = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListMFADevicesOutput) SetMarker(v string) *ListMFADevicesOutput { - s.Marker = &v - return s -} - -type ListOpenIDConnectProviderTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The ARN of the OpenID Connect (OIDC) identity provider whose tags you want - // to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProviderTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProviderTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOpenIDConnectProviderTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOpenIDConnectProviderTagsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListOpenIDConnectProviderTagsInput) SetMarker(v string) *ListOpenIDConnectProviderTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListOpenIDConnectProviderTagsInput) SetMaxItems(v int64) *ListOpenIDConnectProviderTagsInput { - s.MaxItems = &v - return s -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *ListOpenIDConnectProviderTagsInput) SetOpenIDConnectProviderArn(v string) *ListOpenIDConnectProviderTagsInput { - s.OpenIDConnectProviderArn = &v - return s -} - -type ListOpenIDConnectProviderTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the OpenID Connect (OIDC) - // identity provider. Each tag consists of a key name and an associated value. - // If no tags are attached to the specified resource, the response contains - // an empty list. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProviderTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProviderTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListOpenIDConnectProviderTagsOutput) SetIsTruncated(v bool) *ListOpenIDConnectProviderTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListOpenIDConnectProviderTagsOutput) SetMarker(v string) *ListOpenIDConnectProviderTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListOpenIDConnectProviderTagsOutput) SetTags(v []*Tag) *ListOpenIDConnectProviderTagsOutput { - s.Tags = v - return s -} - -type ListOpenIDConnectProvidersInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProvidersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProvidersInput) GoString() string { - return s.String() -} - -// Contains the response to a successful ListOpenIDConnectProviders request. -type ListOpenIDConnectProvidersOutput struct { - _ struct{} `type:"structure"` - - // The list of IAM OIDC provider resource objects defined in the Amazon Web - // Services account. - OpenIDConnectProviderList []*OpenIDConnectProviderListEntry `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProvidersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProvidersOutput) GoString() string { - return s.String() -} - -// SetOpenIDConnectProviderList sets the OpenIDConnectProviderList field's value. -func (s *ListOpenIDConnectProvidersOutput) SetOpenIDConnectProviderList(v []*OpenIDConnectProviderListEntry) *ListOpenIDConnectProvidersOutput { - s.OpenIDConnectProviderList = v - return s -} - -// Contains details about the permissions policies that are attached to the -// specified identity (user, group, or role). -// -// This data type is used as a response element in the ListPoliciesGrantingServiceAccess -// operation. -type ListPoliciesGrantingServiceAccessEntry struct { - _ struct{} `type:"structure"` - - // The PoliciesGrantingServiceAccess object that contains details about the - // policy. - Policies []*PolicyGrantingServiceAccess `type:"list"` - - // The namespace of the service that was accessed. - // - // To learn the service namespace of a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to - // view details for that service. In the first paragraph, find the service prefix. - // For example, (service prefix: a4b). For more information about service namespaces, - // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - ServiceNamespace *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessEntry) GoString() string { - return s.String() -} - -// SetPolicies sets the Policies field's value. -func (s *ListPoliciesGrantingServiceAccessEntry) SetPolicies(v []*PolicyGrantingServiceAccess) *ListPoliciesGrantingServiceAccessEntry { - s.Policies = v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *ListPoliciesGrantingServiceAccessEntry) SetServiceNamespace(v string) *ListPoliciesGrantingServiceAccessEntry { - s.ServiceNamespace = &v - return s -} - -type ListPoliciesGrantingServiceAccessInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM identity (user, group, or role) whose policies you want - // to list. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // The service namespace for the Amazon Web Services services whose policies - // you want to list. - // - // To learn the service namespace for a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the IAM User Guide. Choose the name of the service to view details for - // that service. In the first paragraph, find the service prefix. For example, - // (service prefix: a4b). For more information about service namespaces, see - // Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespaces is a required field - ServiceNamespaces []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPoliciesGrantingServiceAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPoliciesGrantingServiceAccessInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.ServiceNamespaces == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespaces")) - } - if s.ServiceNamespaces != nil && len(s.ServiceNamespaces) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceNamespaces", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListPoliciesGrantingServiceAccessInput) SetArn(v string) *ListPoliciesGrantingServiceAccessInput { - s.Arn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesGrantingServiceAccessInput) SetMarker(v string) *ListPoliciesGrantingServiceAccessInput { - s.Marker = &v - return s -} - -// SetServiceNamespaces sets the ServiceNamespaces field's value. -func (s *ListPoliciesGrantingServiceAccessInput) SetServiceNamespaces(v []*string) *ListPoliciesGrantingServiceAccessInput { - s.ServiceNamespaces = v - return s -} - -type ListPoliciesGrantingServiceAccessOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. We recommend that you check IsTruncated - // after every call to ensure that you receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A ListPoliciesGrantingServiceAccess object that contains details about the - // permissions policies attached to the specified identity (user, group, or - // role). - // - // PoliciesGrantingServiceAccess is a required field - PoliciesGrantingServiceAccess []*ListPoliciesGrantingServiceAccessEntry `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPoliciesGrantingServiceAccessOutput) SetIsTruncated(v bool) *ListPoliciesGrantingServiceAccessOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesGrantingServiceAccessOutput) SetMarker(v string) *ListPoliciesGrantingServiceAccessOutput { - s.Marker = &v - return s -} - -// SetPoliciesGrantingServiceAccess sets the PoliciesGrantingServiceAccess field's value. -func (s *ListPoliciesGrantingServiceAccessOutput) SetPoliciesGrantingServiceAccess(v []*ListPoliciesGrantingServiceAccessEntry) *ListPoliciesGrantingServiceAccessOutput { - s.PoliciesGrantingServiceAccess = v - return s -} - -type ListPoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // A flag to filter the results to only the attached policies. - // - // When OnlyAttached is true, the returned list contains only the policies that - // are attached to an IAM user, group, or role. When OnlyAttached is false, - // or when the parameter is not included, all policies are returned. - OnlyAttached *bool `type:"boolean"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all policies. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` - - // The policy usage method to use for filtering the results. - // - // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy. - // To list only the policies used to set permissions boundaries, set the value - // to PermissionsBoundary. - // - // This parameter is optional. If it is not included, all policies are returned. - PolicyUsageFilter *string `type:"string" enum:"PolicyUsageType"` - - // The scope to use for filtering the results. - // - // To list only Amazon Web Services managed policies, set Scope to AWS. To list - // only the customer managed policies in your Amazon Web Services account, set - // Scope to Local. - // - // This parameter is optional. If it is not included, or if it is set to All, - // all policies are returned. - Scope *string `type:"string" enum:"PolicyScopeType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesInput) SetMarker(v string) *ListPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListPoliciesInput) SetMaxItems(v int64) *ListPoliciesInput { - s.MaxItems = &v - return s -} - -// SetOnlyAttached sets the OnlyAttached field's value. -func (s *ListPoliciesInput) SetOnlyAttached(v bool) *ListPoliciesInput { - s.OnlyAttached = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListPoliciesInput) SetPathPrefix(v string) *ListPoliciesInput { - s.PathPrefix = &v - return s -} - -// SetPolicyUsageFilter sets the PolicyUsageFilter field's value. -func (s *ListPoliciesInput) SetPolicyUsageFilter(v string) *ListPoliciesInput { - s.PolicyUsageFilter = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *ListPoliciesInput) SetScope(v string) *ListPoliciesInput { - s.Scope = &v - return s -} - -// Contains the response to a successful ListPolicies request. -type ListPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policies. - Policies []*Policy `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPoliciesOutput) SetIsTruncated(v bool) *ListPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesOutput) SetMarker(v string) *ListPoliciesOutput { - s.Marker = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *ListPoliciesOutput) SetPolicies(v []*Policy) *ListPoliciesOutput { - s.Policies = v - return s -} - -type ListPolicyTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The ARN of the IAM customer managed policy whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPolicyTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPolicyTagsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyTagsInput) SetMarker(v string) *ListPolicyTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListPolicyTagsInput) SetMaxItems(v int64) *ListPolicyTagsInput { - s.MaxItems = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *ListPolicyTagsInput) SetPolicyArn(v string) *ListPolicyTagsInput { - s.PolicyArn = &v - return s -} - -type ListPolicyTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the IAM customer managed - // policy. Each tag consists of a key name and an associated value. If no tags - // are attached to the specified resource, the response contains an empty list. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPolicyTagsOutput) SetIsTruncated(v bool) *ListPolicyTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyTagsOutput) SetMarker(v string) *ListPolicyTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListPolicyTagsOutput) SetTags(v []*Tag) *ListPolicyTagsOutput { - s.Tags = v - return s -} - -type ListPolicyVersionsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The Amazon Resource Name (ARN) of the IAM policy for which you want the versions. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPolicyVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPolicyVersionsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyVersionsInput) SetMarker(v string) *ListPolicyVersionsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListPolicyVersionsInput) SetMaxItems(v int64) *ListPolicyVersionsInput { - s.MaxItems = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *ListPolicyVersionsInput) SetPolicyArn(v string) *ListPolicyVersionsInput { - s.PolicyArn = &v - return s -} - -// Contains the response to a successful ListPolicyVersions request. -type ListPolicyVersionsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policy versions. - // - // For more information about managed policy versions, see Versioning for managed - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - Versions []*PolicyVersion `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyVersionsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPolicyVersionsOutput) SetIsTruncated(v bool) *ListPolicyVersionsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyVersionsOutput) SetMarker(v string) *ListPolicyVersionsOutput { - s.Marker = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *ListPolicyVersionsOutput) SetVersions(v []*PolicyVersion) *ListPolicyVersionsOutput { - s.Versions = v - return s -} - -type ListRolePoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the role to list policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRolePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRolePoliciesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListRolePoliciesInput) SetMarker(v string) *ListRolePoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListRolePoliciesInput) SetMaxItems(v int64) *ListRolePoliciesInput { - s.MaxItems = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ListRolePoliciesInput) SetRoleName(v string) *ListRolePoliciesInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful ListRolePolicies request. -type ListRolePoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policy names. - // - // PolicyNames is a required field - PolicyNames []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolePoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListRolePoliciesOutput) SetIsTruncated(v bool) *ListRolePoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListRolePoliciesOutput) SetMarker(v string) *ListRolePoliciesOutput { - s.Marker = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListRolePoliciesOutput) SetPolicyNames(v []*string) *ListRolePoliciesOutput { - s.PolicyNames = v - return s -} - -type ListRoleTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM role for which you want to see the list of tags. - // - // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consist of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRoleTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRoleTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRoleTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRoleTagsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListRoleTagsInput) SetMarker(v string) *ListRoleTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListRoleTagsInput) SetMaxItems(v int64) *ListRoleTagsInput { - s.MaxItems = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ListRoleTagsInput) SetRoleName(v string) *ListRoleTagsInput { - s.RoleName = &v - return s -} - -type ListRoleTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the role. Each tag consists - // of a key name and an associated value. If no tags are attached to the specified - // resource, the response contains an empty list. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRoleTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRoleTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListRoleTagsOutput) SetIsTruncated(v bool) *ListRoleTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListRoleTagsOutput) SetMarker(v string) *ListRoleTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListRoleTagsOutput) SetTags(v []*Tag) *ListRoleTagsOutput { - s.Tags = v - return s -} - -type ListRolesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example, the prefix /application_abc/component_xyz/ - // gets all roles whose path starts with /application_abc/component_xyz/. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all roles. This parameter allows (through its regex pattern - // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either - // a forward slash (/) by itself or a string that must begin and end with forward - // slashes. In addition, it can contain any ASCII character from the ! (\u0021) - // through the DEL character (\u007F), including most punctuation characters, - // digits, and upper and lowercased letters. - PathPrefix *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRolesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRolesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListRolesInput) SetMarker(v string) *ListRolesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListRolesInput) SetMaxItems(v int64) *ListRolesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListRolesInput) SetPathPrefix(v string) *ListRolesInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListRoles request. -type ListRolesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of roles. - // - // Roles is a required field - Roles []*Role `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListRolesOutput) SetIsTruncated(v bool) *ListRolesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListRolesOutput) SetMarker(v string) *ListRolesOutput { - s.Marker = &v - return s -} - -// SetRoles sets the Roles field's value. -func (s *ListRolesOutput) SetRoles(v []*Role) *ListRolesOutput { - s.Roles = v - return s -} - -type ListSAMLProviderTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The ARN of the Security Assertion Markup Language (SAML) identity provider - // whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProviderTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProviderTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSAMLProviderTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSAMLProviderTagsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListSAMLProviderTagsInput) SetMarker(v string) *ListSAMLProviderTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListSAMLProviderTagsInput) SetMaxItems(v int64) *ListSAMLProviderTagsInput { - s.MaxItems = &v - return s -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *ListSAMLProviderTagsInput) SetSAMLProviderArn(v string) *ListSAMLProviderTagsInput { - s.SAMLProviderArn = &v - return s -} - -type ListSAMLProviderTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the Security Assertion Markup - // Language (SAML) identity provider. Each tag consists of a key name and an - // associated value. If no tags are attached to the specified resource, the - // response contains an empty list. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProviderTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProviderTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListSAMLProviderTagsOutput) SetIsTruncated(v bool) *ListSAMLProviderTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListSAMLProviderTagsOutput) SetMarker(v string) *ListSAMLProviderTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListSAMLProviderTagsOutput) SetTags(v []*Tag) *ListSAMLProviderTagsOutput { - s.Tags = v - return s -} - -type ListSAMLProvidersInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProvidersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProvidersInput) GoString() string { - return s.String() -} - -// Contains the response to a successful ListSAMLProviders request. -type ListSAMLProvidersOutput struct { - _ struct{} `type:"structure"` - - // The list of SAML provider resource objects defined in IAM for this Amazon - // Web Services account. - SAMLProviderList []*SAMLProviderListEntry `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProvidersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProvidersOutput) GoString() string { - return s.String() -} - -// SetSAMLProviderList sets the SAMLProviderList field's value. -func (s *ListSAMLProvidersOutput) SetSAMLProviderList(v []*SAMLProviderListEntry) *ListSAMLProvidersOutput { - s.SAMLProviderList = v - return s -} - -type ListSSHPublicKeysInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM user to list SSH public keys for. If none is specified, - // the UserName field is determined implicitly based on the Amazon Web Services - // access key used to sign the request. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSSHPublicKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSSHPublicKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSSHPublicKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSSHPublicKeysInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListSSHPublicKeysInput) SetMarker(v string) *ListSSHPublicKeysInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListSSHPublicKeysInput) SetMaxItems(v int64) *ListSSHPublicKeysInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListSSHPublicKeysInput) SetUserName(v string) *ListSSHPublicKeysInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListSSHPublicKeys request. -type ListSSHPublicKeysOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of the SSH public keys assigned to IAM user. - SSHPublicKeys []*SSHPublicKeyMetadata `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSSHPublicKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSSHPublicKeysOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListSSHPublicKeysOutput) SetIsTruncated(v bool) *ListSSHPublicKeysOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListSSHPublicKeysOutput) SetMarker(v string) *ListSSHPublicKeysOutput { - s.Marker = &v - return s -} - -// SetSSHPublicKeys sets the SSHPublicKeys field's value. -func (s *ListSSHPublicKeysOutput) SetSSHPublicKeys(v []*SSHPublicKeyMetadata) *ListSSHPublicKeysOutput { - s.SSHPublicKeys = v - return s -} - -type ListServerCertificateTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM server certificate whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServerCertificateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServerCertificateTagsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListServerCertificateTagsInput) SetMarker(v string) *ListServerCertificateTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListServerCertificateTagsInput) SetMaxItems(v int64) *ListServerCertificateTagsInput { - s.MaxItems = &v - return s -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *ListServerCertificateTagsInput) SetServerCertificateName(v string) *ListServerCertificateTagsInput { - s.ServerCertificateName = &v - return s -} - -type ListServerCertificateTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the IAM server certificate. - // Each tag consists of a key name and an associated value. If no tags are attached - // to the specified resource, the response contains an empty list. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificateTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListServerCertificateTagsOutput) SetIsTruncated(v bool) *ListServerCertificateTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListServerCertificateTagsOutput) SetMarker(v string) *ListServerCertificateTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListServerCertificateTagsOutput) SetTags(v []*Tag) *ListServerCertificateTagsOutput { - s.Tags = v - return s -} - -type ListServerCertificatesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example: /company/servercerts - // would get all server certificates for which the path starts with /company/servercerts. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all server certificates. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex)) a string of characters consisting - // of either a forward slash (/) by itself or a string that must begin and end - // with forward slashes. In addition, it can contain any ASCII character from - // the ! (\u0021) through the DEL character (\u007F), including most punctuation - // characters, digits, and upper and lowercased letters. - PathPrefix *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServerCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServerCertificatesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListServerCertificatesInput) SetMarker(v string) *ListServerCertificatesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListServerCertificatesInput) SetMaxItems(v int64) *ListServerCertificatesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListServerCertificatesInput) SetPathPrefix(v string) *ListServerCertificatesInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListServerCertificates request. -type ListServerCertificatesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of server certificates. - // - // ServerCertificateMetadataList is a required field - ServerCertificateMetadataList []*ServerCertificateMetadata `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificatesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListServerCertificatesOutput) SetIsTruncated(v bool) *ListServerCertificatesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListServerCertificatesOutput) SetMarker(v string) *ListServerCertificatesOutput { - s.Marker = &v - return s -} - -// SetServerCertificateMetadataList sets the ServerCertificateMetadataList field's value. -func (s *ListServerCertificatesOutput) SetServerCertificateMetadataList(v []*ServerCertificateMetadata) *ListServerCertificatesOutput { - s.ServerCertificateMetadataList = v - return s -} - -type ListServiceSpecificCredentialsInput struct { - _ struct{} `type:"structure"` - - // Filters the returned results to only those for the specified Amazon Web Services - // service. If not specified, then Amazon Web Services returns service-specific - // credentials for all services. - ServiceName *string `type:"string"` - - // The name of the user whose service-specific credentials you want information - // about. If this value is not specified, then the operation assumes the user - // whose credentials are used to call the operation. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServiceSpecificCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServiceSpecificCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServiceSpecificCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServiceSpecificCredentialsInput"} - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceName sets the ServiceName field's value. -func (s *ListServiceSpecificCredentialsInput) SetServiceName(v string) *ListServiceSpecificCredentialsInput { - s.ServiceName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListServiceSpecificCredentialsInput) SetUserName(v string) *ListServiceSpecificCredentialsInput { - s.UserName = &v - return s -} - -type ListServiceSpecificCredentialsOutput struct { - _ struct{} `type:"structure"` - - // A list of structures that each contain details about a service-specific credential. - ServiceSpecificCredentials []*ServiceSpecificCredentialMetadata `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServiceSpecificCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServiceSpecificCredentialsOutput) GoString() string { - return s.String() -} - -// SetServiceSpecificCredentials sets the ServiceSpecificCredentials field's value. -func (s *ListServiceSpecificCredentialsOutput) SetServiceSpecificCredentials(v []*ServiceSpecificCredentialMetadata) *ListServiceSpecificCredentialsOutput { - s.ServiceSpecificCredentials = v - return s -} - -type ListSigningCertificatesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM user whose signing certificates you want to examine. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSigningCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSigningCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSigningCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSigningCertificatesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListSigningCertificatesInput) SetMarker(v string) *ListSigningCertificatesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListSigningCertificatesInput) SetMaxItems(v int64) *ListSigningCertificatesInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListSigningCertificatesInput) SetUserName(v string) *ListSigningCertificatesInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListSigningCertificates request. -type ListSigningCertificatesOutput struct { - _ struct{} `type:"structure"` - - // A list of the user's signing certificate information. - // - // Certificates is a required field - Certificates []*SigningCertificate `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSigningCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSigningCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *ListSigningCertificatesOutput) SetCertificates(v []*SigningCertificate) *ListSigningCertificatesOutput { - s.Certificates = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListSigningCertificatesOutput) SetIsTruncated(v bool) *ListSigningCertificatesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListSigningCertificatesOutput) SetMarker(v string) *ListSigningCertificatesOutput { - s.Marker = &v - return s -} - -type ListUserPoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the user to list policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUserPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUserPoliciesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListUserPoliciesInput) SetMarker(v string) *ListUserPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListUserPoliciesInput) SetMaxItems(v int64) *ListUserPoliciesInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListUserPoliciesInput) SetUserName(v string) *ListUserPoliciesInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListUserPolicies request. -type ListUserPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policy names. - // - // PolicyNames is a required field - PolicyNames []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserPoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListUserPoliciesOutput) SetIsTruncated(v bool) *ListUserPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListUserPoliciesOutput) SetMarker(v string) *ListUserPoliciesOutput { - s.Marker = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListUserPoliciesOutput) SetPolicyNames(v []*string) *ListUserPoliciesOutput { - s.PolicyNames = v - return s -} - -type ListUserTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM user whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUserTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUserTagsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListUserTagsInput) SetMarker(v string) *ListUserTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListUserTagsInput) SetMaxItems(v int64) *ListUserTagsInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListUserTagsInput) SetUserName(v string) *ListUserTagsInput { - s.UserName = &v - return s -} - -type ListUserTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the user. Each tag consists - // of a key name and an associated value. If no tags are attached to the specified - // resource, the response contains an empty list. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListUserTagsOutput) SetIsTruncated(v bool) *ListUserTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListUserTagsOutput) SetMarker(v string) *ListUserTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListUserTagsOutput) SetTags(v []*Tag) *ListUserTagsOutput { - s.Tags = v - return s -} - -type ListUsersInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example: /division_abc/subdivision_xyz/, - // which would get all user names whose path starts with /division_abc/subdivision_xyz/. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all user names. This parameter allows (through its regex pattern - // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either - // a forward slash (/) by itself or a string that must begin and end with forward - // slashes. In addition, it can contain any ASCII character from the ! (\u0021) - // through the DEL character (\u007F), including most punctuation characters, - // digits, and upper and lowercased letters. - PathPrefix *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUsersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUsersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUsersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListUsersInput) SetMarker(v string) *ListUsersInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListUsersInput) SetMaxItems(v int64) *ListUsersInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListUsersInput) SetPathPrefix(v string) *ListUsersInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListUsers request. -type ListUsersOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of users. - // - // Users is a required field - Users []*User `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUsersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUsersOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListUsersOutput) SetIsTruncated(v bool) *ListUsersOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListUsersOutput) SetMarker(v string) *ListUsersOutput { - s.Marker = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *ListUsersOutput) SetUsers(v []*User) *ListUsersOutput { - s.Users = v - return s -} - -type ListVirtualMFADevicesInput struct { - _ struct{} `type:"structure"` - - // The status (Unassigned or Assigned) of the devices to list. If you do not - // specify an AssignmentStatus, the operation defaults to Any, which lists both - // assigned and unassigned virtual MFA devices., - AssignmentStatus *string `type:"string" enum:"AssignmentStatusType"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListVirtualMFADevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListVirtualMFADevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVirtualMFADevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVirtualMFADevicesInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssignmentStatus sets the AssignmentStatus field's value. -func (s *ListVirtualMFADevicesInput) SetAssignmentStatus(v string) *ListVirtualMFADevicesInput { - s.AssignmentStatus = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListVirtualMFADevicesInput) SetMarker(v string) *ListVirtualMFADevicesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListVirtualMFADevicesInput) SetMaxItems(v int64) *ListVirtualMFADevicesInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful ListVirtualMFADevices request. -type ListVirtualMFADevicesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of virtual MFA devices in the current account that match the AssignmentStatus - // value that was passed in the request. - // - // VirtualMFADevices is a required field - VirtualMFADevices []*VirtualMFADevice `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListVirtualMFADevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListVirtualMFADevicesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListVirtualMFADevicesOutput) SetIsTruncated(v bool) *ListVirtualMFADevicesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListVirtualMFADevicesOutput) SetMarker(v string) *ListVirtualMFADevicesOutput { - s.Marker = &v - return s -} - -// SetVirtualMFADevices sets the VirtualMFADevices field's value. -func (s *ListVirtualMFADevicesOutput) SetVirtualMFADevices(v []*VirtualMFADevice) *ListVirtualMFADevicesOutput { - s.VirtualMFADevices = v - return s -} - -// Contains the user name and password create date for a user. -// -// This data type is used as a response element in the CreateLoginProfile and -// GetLoginProfile operations. -type LoginProfile struct { - _ struct{} `type:"structure"` - - // The date when the password for the user was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // Specifies whether the user is required to set a new password on next sign-in. - PasswordResetRequired *bool `type:"boolean"` - - // The name of the user, which can be used for signing in to the Amazon Web - // Services Management Console. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LoginProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LoginProfile) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *LoginProfile) SetCreateDate(v time.Time) *LoginProfile { - s.CreateDate = &v - return s -} - -// SetPasswordResetRequired sets the PasswordResetRequired field's value. -func (s *LoginProfile) SetPasswordResetRequired(v bool) *LoginProfile { - s.PasswordResetRequired = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *LoginProfile) SetUserName(v string) *LoginProfile { - s.UserName = &v - return s -} - -// Contains information about an MFA device. -// -// This data type is used as a response element in the ListMFADevices operation. -type MFADevice struct { - _ struct{} `type:"structure"` - - // The date when the MFA device was enabled for the user. - // - // EnableDate is a required field - EnableDate *time.Time `type:"timestamp" required:"true"` - - // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the device ARN. - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The user with whom the MFA device is associated. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MFADevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MFADevice) GoString() string { - return s.String() -} - -// SetEnableDate sets the EnableDate field's value. -func (s *MFADevice) SetEnableDate(v time.Time) *MFADevice { - s.EnableDate = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *MFADevice) SetSerialNumber(v string) *MFADevice { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *MFADevice) SetUserName(v string) *MFADevice { - s.UserName = &v - return s -} - -// Contains information about a managed policy, including the policy's ARN, -// versions, and the number of principal entities (users, groups, and roles) -// that the policy is attached to. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -// -// For more information about managed policies, see Managed policies and inline -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type ManagedPolicyDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // The number of principal entities (users, groups, and roles) that the policy - // is attached to. - AttachmentCount *int64 `type:"integer"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy was created. - CreateDate *time.Time `type:"timestamp"` - - // The identifier for the version of the policy that is set as the default (operative) - // version. - // - // For more information about policy versions, see Versioning for managed policies - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - DefaultVersionId *string `type:"string"` - - // A friendly description of the policy. - Description *string `type:"string"` - - // Specifies whether the policy can be attached to an IAM user, group, or role. - IsAttachable *bool `type:"boolean"` - - // The path to the policy. - // - // For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The number of entities (users and roles) for which the policy is used as - // the permissions boundary. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundaryUsageCount *int64 `type:"integer"` - - // The stable and unique string identifying the policy. - // - // For more information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - PolicyId *string `min:"16" type:"string"` - - // The friendly name (not ARN) identifying the policy. - PolicyName *string `min:"1" type:"string"` - - // A list containing information about the versions of the policy. - PolicyVersionList []*PolicyVersion `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy was last updated. - // - // When a policy has only one version, this field contains the date and time - // when the policy was created. When a policy has more than one version, this - // field contains the date and time when the most recent policy version was - // created. - UpdateDate *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ManagedPolicyDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ManagedPolicyDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ManagedPolicyDetail) SetArn(v string) *ManagedPolicyDetail { - s.Arn = &v - return s -} - -// SetAttachmentCount sets the AttachmentCount field's value. -func (s *ManagedPolicyDetail) SetAttachmentCount(v int64) *ManagedPolicyDetail { - s.AttachmentCount = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ManagedPolicyDetail) SetCreateDate(v time.Time) *ManagedPolicyDetail { - s.CreateDate = &v - return s -} - -// SetDefaultVersionId sets the DefaultVersionId field's value. -func (s *ManagedPolicyDetail) SetDefaultVersionId(v string) *ManagedPolicyDetail { - s.DefaultVersionId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ManagedPolicyDetail) SetDescription(v string) *ManagedPolicyDetail { - s.Description = &v - return s -} - -// SetIsAttachable sets the IsAttachable field's value. -func (s *ManagedPolicyDetail) SetIsAttachable(v bool) *ManagedPolicyDetail { - s.IsAttachable = &v - return s -} - -// SetPath sets the Path field's value. -func (s *ManagedPolicyDetail) SetPath(v string) *ManagedPolicyDetail { - s.Path = &v - return s -} - -// SetPermissionsBoundaryUsageCount sets the PermissionsBoundaryUsageCount field's value. -func (s *ManagedPolicyDetail) SetPermissionsBoundaryUsageCount(v int64) *ManagedPolicyDetail { - s.PermissionsBoundaryUsageCount = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *ManagedPolicyDetail) SetPolicyId(v string) *ManagedPolicyDetail { - s.PolicyId = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ManagedPolicyDetail) SetPolicyName(v string) *ManagedPolicyDetail { - s.PolicyName = &v - return s -} - -// SetPolicyVersionList sets the PolicyVersionList field's value. -func (s *ManagedPolicyDetail) SetPolicyVersionList(v []*PolicyVersion) *ManagedPolicyDetail { - s.PolicyVersionList = v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *ManagedPolicyDetail) SetUpdateDate(v time.Time) *ManagedPolicyDetail { - s.UpdateDate = &v - return s -} - -// Contains the Amazon Resource Name (ARN) for an IAM OpenID Connect provider. -type OpenIDConnectProviderListEntry struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OpenIDConnectProviderListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OpenIDConnectProviderListEntry) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *OpenIDConnectProviderListEntry) SetArn(v string) *OpenIDConnectProviderListEntry { - s.Arn = &v - return s -} - -// Contains information about the effect that Organizations has on a policy -// simulation. -type OrganizationsDecisionDetail struct { - _ struct{} `type:"structure"` - - // Specifies whether the simulated operation is allowed by the Organizations - // service control policies that impact the simulated user's account. - AllowedByOrganizations *bool `type:"boolean"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OrganizationsDecisionDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OrganizationsDecisionDetail) GoString() string { - return s.String() -} - -// SetAllowedByOrganizations sets the AllowedByOrganizations field's value. -func (s *OrganizationsDecisionDetail) SetAllowedByOrganizations(v bool) *OrganizationsDecisionDetail { - s.AllowedByOrganizations = &v - return s -} - -// Contains information about the account password policy. -// -// This data type is used as a response element in the GetAccountPasswordPolicy -// operation. -type PasswordPolicy struct { - _ struct{} `type:"structure"` - - // Specifies whether IAM users are allowed to change their own password. Gives - // IAM users permissions to iam:ChangePassword for only their user and to the - // iam:GetAccountPasswordPolicy action. This option does not attach a permissions - // policy to each user, rather the permissions are applied at the account-level - // for all users by IAM. - AllowUsersToChangePassword *bool `type:"boolean"` - - // Indicates whether passwords in the account expire. Returns true if MaxPasswordAge - // contains a value greater than 0. Returns false if MaxPasswordAge is 0 or - // not present. - ExpirePasswords *bool `type:"boolean"` - - // Specifies whether IAM users are prevented from setting a new password via - // the Amazon Web Services Management Console after their password has expired. - // The IAM user cannot access the console until an administrator resets the - // password. IAM users with iam:ChangePassword permission and active access - // keys can reset their own expired console password using the CLI or API. - HardExpiry *bool `type:"boolean"` - - // The number of days that an IAM user password is valid. - MaxPasswordAge *int64 `min:"1" type:"integer"` - - // Minimum length to require for IAM user passwords. - MinimumPasswordLength *int64 `min:"6" type:"integer"` - - // Specifies the number of previous passwords that IAM users are prevented from - // reusing. - PasswordReusePrevention *int64 `min:"1" type:"integer"` - - // Specifies whether IAM user passwords must contain at least one lowercase - // character (a to z). - RequireLowercaseCharacters *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one numeric character - // (0 to 9). - RequireNumbers *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one of the following - // symbols: - // - // ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' - RequireSymbols *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one uppercase - // character (A to Z). - RequireUppercaseCharacters *bool `type:"boolean"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PasswordPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PasswordPolicy) GoString() string { - return s.String() -} - -// SetAllowUsersToChangePassword sets the AllowUsersToChangePassword field's value. -func (s *PasswordPolicy) SetAllowUsersToChangePassword(v bool) *PasswordPolicy { - s.AllowUsersToChangePassword = &v - return s -} - -// SetExpirePasswords sets the ExpirePasswords field's value. -func (s *PasswordPolicy) SetExpirePasswords(v bool) *PasswordPolicy { - s.ExpirePasswords = &v - return s -} - -// SetHardExpiry sets the HardExpiry field's value. -func (s *PasswordPolicy) SetHardExpiry(v bool) *PasswordPolicy { - s.HardExpiry = &v - return s -} - -// SetMaxPasswordAge sets the MaxPasswordAge field's value. -func (s *PasswordPolicy) SetMaxPasswordAge(v int64) *PasswordPolicy { - s.MaxPasswordAge = &v - return s -} - -// SetMinimumPasswordLength sets the MinimumPasswordLength field's value. -func (s *PasswordPolicy) SetMinimumPasswordLength(v int64) *PasswordPolicy { - s.MinimumPasswordLength = &v - return s -} - -// SetPasswordReusePrevention sets the PasswordReusePrevention field's value. -func (s *PasswordPolicy) SetPasswordReusePrevention(v int64) *PasswordPolicy { - s.PasswordReusePrevention = &v - return s -} - -// SetRequireLowercaseCharacters sets the RequireLowercaseCharacters field's value. -func (s *PasswordPolicy) SetRequireLowercaseCharacters(v bool) *PasswordPolicy { - s.RequireLowercaseCharacters = &v - return s -} - -// SetRequireNumbers sets the RequireNumbers field's value. -func (s *PasswordPolicy) SetRequireNumbers(v bool) *PasswordPolicy { - s.RequireNumbers = &v - return s -} - -// SetRequireSymbols sets the RequireSymbols field's value. -func (s *PasswordPolicy) SetRequireSymbols(v bool) *PasswordPolicy { - s.RequireSymbols = &v - return s -} - -// SetRequireUppercaseCharacters sets the RequireUppercaseCharacters field's value. -func (s *PasswordPolicy) SetRequireUppercaseCharacters(v bool) *PasswordPolicy { - s.RequireUppercaseCharacters = &v - return s -} - -// Contains information about the effect that a permissions boundary has on -// a policy simulation when the boundary is applied to an IAM entity. -type PermissionsBoundaryDecisionDetail struct { - _ struct{} `type:"structure"` - - // Specifies whether an action is allowed by a permissions boundary that is - // applied to an IAM entity (user or role). A value of true means that the permissions - // boundary does not deny the action. This means that the policy includes an - // Allow statement that matches the request. In this case, if an identity-based - // policy also allows the action, the request is allowed. A value of false means - // that either the requested action is not allowed (implicitly denied) or that - // the action is explicitly denied by the permissions boundary. In both of these - // cases, the action is not allowed, regardless of the identity-based policy. - AllowedByPermissionsBoundary *bool `type:"boolean"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PermissionsBoundaryDecisionDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PermissionsBoundaryDecisionDetail) GoString() string { - return s.String() -} - -// SetAllowedByPermissionsBoundary sets the AllowedByPermissionsBoundary field's value. -func (s *PermissionsBoundaryDecisionDetail) SetAllowedByPermissionsBoundary(v bool) *PermissionsBoundaryDecisionDetail { - s.AllowedByPermissionsBoundary = &v - return s -} - -// Contains information about a managed policy. -// -// This data type is used as a response element in the CreatePolicy, GetPolicy, -// and ListPolicies operations. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type Policy struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // The number of entities (users, groups, and roles) that the policy is attached - // to. - AttachmentCount *int64 `type:"integer"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy was created. - CreateDate *time.Time `type:"timestamp"` - - // The identifier for the version of the policy that is set as the default version. - DefaultVersionId *string `type:"string"` - - // A friendly description of the policy. - // - // This element is included in the response to the GetPolicy operation. It is - // not included in the response to the ListPolicies operation. - Description *string `type:"string"` - - // Specifies whether the policy can be attached to an IAM user, group, or role. - IsAttachable *bool `type:"boolean"` - - // The path to the policy. - // - // For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The number of entities (users and roles) for which the policy is used to - // set the permissions boundary. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundaryUsageCount *int64 `type:"integer"` - - // The stable and unique string identifying the policy. - // - // For more information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - PolicyId *string `min:"16" type:"string"` - - // The friendly name (not ARN) identifying the policy. - PolicyName *string `min:"1" type:"string"` - - // A list of tags that are attached to the instance profile. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy was last updated. - // - // When a policy has only one version, this field contains the date and time - // when the policy was created. When a policy has more than one version, this - // field contains the date and time when the most recent policy version was - // created. - UpdateDate *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Policy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Policy) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Policy) SetArn(v string) *Policy { - s.Arn = &v - return s -} - -// SetAttachmentCount sets the AttachmentCount field's value. -func (s *Policy) SetAttachmentCount(v int64) *Policy { - s.AttachmentCount = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Policy) SetCreateDate(v time.Time) *Policy { - s.CreateDate = &v - return s -} - -// SetDefaultVersionId sets the DefaultVersionId field's value. -func (s *Policy) SetDefaultVersionId(v string) *Policy { - s.DefaultVersionId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Policy) SetDescription(v string) *Policy { - s.Description = &v - return s -} - -// SetIsAttachable sets the IsAttachable field's value. -func (s *Policy) SetIsAttachable(v bool) *Policy { - s.IsAttachable = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Policy) SetPath(v string) *Policy { - s.Path = &v - return s -} - -// SetPermissionsBoundaryUsageCount sets the PermissionsBoundaryUsageCount field's value. -func (s *Policy) SetPermissionsBoundaryUsageCount(v int64) *Policy { - s.PermissionsBoundaryUsageCount = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *Policy) SetPolicyId(v string) *Policy { - s.PolicyId = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *Policy) SetPolicyName(v string) *Policy { - s.PolicyName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Policy) SetTags(v []*Tag) *Policy { - s.Tags = v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *Policy) SetUpdateDate(v time.Time) *Policy { - s.UpdateDate = &v - return s -} - -// Contains information about an IAM policy, including the policy document. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -type PolicyDetail struct { - _ struct{} `type:"structure"` - - // The policy document. - PolicyDocument *string `min:"1" type:"string"` - - // The name of the policy. - PolicyName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyDetail) GoString() string { - return s.String() -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PolicyDetail) SetPolicyDocument(v string) *PolicyDetail { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicyDetail) SetPolicyName(v string) *PolicyDetail { - s.PolicyName = &v - return s -} - -// Contains details about the permissions policies that are attached to the -// specified identity (user, group, or role). -// -// This data type is an element of the ListPoliciesGrantingServiceAccessEntry -// object. -type PolicyGrantingServiceAccess struct { - _ struct{} `type:"structure"` - - // The name of the entity (user or role) to which the inline policy is attached. - // - // This field is null for managed policies. For more information about these - // policy types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. - EntityName *string `min:"1" type:"string"` - - // The type of entity (user or role) that used the policy to access the service - // to which the inline policy is attached. - // - // This field is null for managed policies. For more information about these - // policy types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. - EntityType *string `type:"string" enum:"PolicyOwnerEntityType"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - PolicyArn *string `min:"20" type:"string"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The policy type. For more information about these policy types, see Managed - // policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. - // - // PolicyType is a required field - PolicyType *string `type:"string" required:"true" enum:"PolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyGrantingServiceAccess) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyGrantingServiceAccess) GoString() string { - return s.String() -} - -// SetEntityName sets the EntityName field's value. -func (s *PolicyGrantingServiceAccess) SetEntityName(v string) *PolicyGrantingServiceAccess { - s.EntityName = &v - return s -} - -// SetEntityType sets the EntityType field's value. -func (s *PolicyGrantingServiceAccess) SetEntityType(v string) *PolicyGrantingServiceAccess { - s.EntityType = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *PolicyGrantingServiceAccess) SetPolicyArn(v string) *PolicyGrantingServiceAccess { - s.PolicyArn = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicyGrantingServiceAccess) SetPolicyName(v string) *PolicyGrantingServiceAccess { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *PolicyGrantingServiceAccess) SetPolicyType(v string) *PolicyGrantingServiceAccess { - s.PolicyType = &v - return s -} - -// Contains information about a group that a managed policy is attached to. -// -// This data type is used as a response element in the ListEntitiesForPolicy -// operation. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type PolicyGroup struct { - _ struct{} `type:"structure"` - - // The stable and unique string identifying the group. For more information - // about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. - GroupId *string `min:"16" type:"string"` - - // The name (friendly name, not ARN) identifying the group. - GroupName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyGroup) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *PolicyGroup) SetGroupId(v string) *PolicyGroup { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *PolicyGroup) SetGroupName(v string) *PolicyGroup { - s.GroupName = &v - return s -} - -// Contains information about a role that a managed policy is attached to. -// -// This data type is used as a response element in the ListEntitiesForPolicy -// operation. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type PolicyRole struct { - _ struct{} `type:"structure"` - - // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. - RoleId *string `min:"16" type:"string"` - - // The name (friendly name, not ARN) identifying the role. - RoleName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyRole) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyRole) GoString() string { - return s.String() -} - -// SetRoleId sets the RoleId field's value. -func (s *PolicyRole) SetRoleId(v string) *PolicyRole { - s.RoleId = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *PolicyRole) SetRoleName(v string) *PolicyRole { - s.RoleName = &v - return s -} - -// Contains information about a user that a managed policy is attached to. -// -// This data type is used as a response element in the ListEntitiesForPolicy -// operation. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type PolicyUser struct { - _ struct{} `type:"structure"` - - // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. - UserId *string `min:"16" type:"string"` - - // The name (friendly name, not ARN) identifying the user. - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyUser) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyUser) GoString() string { - return s.String() -} - -// SetUserId sets the UserId field's value. -func (s *PolicyUser) SetUserId(v string) *PolicyUser { - s.UserId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *PolicyUser) SetUserName(v string) *PolicyUser { - s.UserName = &v - return s -} - -// Contains information about a version of a managed policy. -// -// This data type is used as a response element in the CreatePolicyVersion, -// GetPolicyVersion, ListPolicyVersions, and GetAccountAuthorizationDetails -// operations. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type PolicyVersion struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy version was created. - CreateDate *time.Time `type:"timestamp"` - - // The policy document. - // - // The policy document is returned in the response to the GetPolicyVersion and - // GetAccountAuthorizationDetails operations. It is not returned in the response - // to the CreatePolicyVersion or ListPolicyVersions operations. - // - // The policy document returned in this structure is URL-encoded compliant with - // RFC 3986 (https://tools.ietf.org/html/rfc3986). You can use a URL decoding - // method to convert the policy back to plain JSON text. For example, if you - // use Java, you can use the decode method of the java.net.URLDecoder utility - // class in the Java SDK. Other languages and SDKs provide similar functionality. - Document *string `min:"1" type:"string"` - - // Specifies whether the policy version is set as the policy's default version. - IsDefaultVersion *bool `type:"boolean"` - - // The identifier for the policy version. - // - // Policy version identifiers always begin with v (always lowercase). When a - // policy is created, the first policy version is v1. - VersionId *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyVersion) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *PolicyVersion) SetCreateDate(v time.Time) *PolicyVersion { - s.CreateDate = &v - return s -} - -// SetDocument sets the Document field's value. -func (s *PolicyVersion) SetDocument(v string) *PolicyVersion { - s.Document = &v - return s -} - -// SetIsDefaultVersion sets the IsDefaultVersion field's value. -func (s *PolicyVersion) SetIsDefaultVersion(v bool) *PolicyVersion { - s.IsDefaultVersion = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PolicyVersion) SetVersionId(v string) *PolicyVersion { - s.VersionId = &v - return s -} - -// Contains the row and column of a location of a Statement element in a policy -// document. -// -// This data type is used as a member of the Statement type. -type Position struct { - _ struct{} `type:"structure"` - - // The column in the line containing the specified position in the document. - Column *int64 `type:"integer"` - - // The line containing the specified position in the document. - Line *int64 `type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Position) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Position) GoString() string { - return s.String() -} - -// SetColumn sets the Column field's value. -func (s *Position) SetColumn(v int64) *Position { - s.Column = &v - return s -} - -// SetLine sets the Line field's value. -func (s *Position) SetLine(v int64) *Position { - s.Line = &v - return s -} - -type PutGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the group to associate the policy with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@-. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The policy document. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy document. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *PutGroupPolicyInput) SetGroupName(v string) *PutGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutGroupPolicyInput) SetPolicyDocument(v string) *PutGroupPolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutGroupPolicyInput) SetPolicyName(v string) *PutGroupPolicyInput { - s.PolicyName = &v - return s -} - -type PutGroupPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutGroupPolicyOutput) GoString() string { - return s.String() -} - -type PutRolePermissionsBoundaryInput struct { - _ struct{} `type:"structure"` - - // The ARN of the managed policy that is used to set the permissions boundary - // for the role. - // - // A permissions boundary policy defines the maximum permissions that identity-based - // policies can grant to an entity, but does not grant permissions. Permissions - // boundaries do not define the maximum permissions that a resource-based policy - // can grant to an entity. To learn more, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - // - // For more information about policy types, see Policy types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. - // - // PermissionsBoundary is a required field - PermissionsBoundary *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM role for which you want to set - // the permissions boundary. - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePermissionsBoundaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePermissionsBoundaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRolePermissionsBoundaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRolePermissionsBoundaryInput"} - if s.PermissionsBoundary == nil { - invalidParams.Add(request.NewErrParamRequired("PermissionsBoundary")) - } - if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *PutRolePermissionsBoundaryInput) SetPermissionsBoundary(v string) *PutRolePermissionsBoundaryInput { - s.PermissionsBoundary = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *PutRolePermissionsBoundaryInput) SetRoleName(v string) *PutRolePermissionsBoundaryInput { - s.RoleName = &v - return s -} - -type PutRolePermissionsBoundaryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePermissionsBoundaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePermissionsBoundaryOutput) GoString() string { - return s.String() -} - -type PutRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The policy document. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy document. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name of the role to associate the policy with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRolePolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutRolePolicyInput) SetPolicyDocument(v string) *PutRolePolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutRolePolicyInput) SetPolicyName(v string) *PutRolePolicyInput { - s.PolicyName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *PutRolePolicyInput) SetRoleName(v string) *PutRolePolicyInput { - s.RoleName = &v - return s -} - -type PutRolePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePolicyOutput) GoString() string { - return s.String() -} - -type PutUserPermissionsBoundaryInput struct { - _ struct{} `type:"structure"` - - // The ARN of the managed policy that is used to set the permissions boundary - // for the user. - // - // A permissions boundary policy defines the maximum permissions that identity-based - // policies can grant to an entity, but does not grant permissions. Permissions - // boundaries do not define the maximum permissions that a resource-based policy - // can grant to an entity. To learn more, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - // - // For more information about policy types, see Policy types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. - // - // PermissionsBoundary is a required field - PermissionsBoundary *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM user for which you want to set - // the permissions boundary. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPermissionsBoundaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPermissionsBoundaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutUserPermissionsBoundaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutUserPermissionsBoundaryInput"} - if s.PermissionsBoundary == nil { - invalidParams.Add(request.NewErrParamRequired("PermissionsBoundary")) - } - if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *PutUserPermissionsBoundaryInput) SetPermissionsBoundary(v string) *PutUserPermissionsBoundaryInput { - s.PermissionsBoundary = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *PutUserPermissionsBoundaryInput) SetUserName(v string) *PutUserPermissionsBoundaryInput { - s.UserName = &v - return s -} - -type PutUserPermissionsBoundaryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPermissionsBoundaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPermissionsBoundaryOutput) GoString() string { - return s.String() -} - -type PutUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The policy document. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy document. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name of the user to associate the policy with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutUserPolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutUserPolicyInput) SetPolicyDocument(v string) *PutUserPolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutUserPolicyInput) SetPolicyName(v string) *PutUserPolicyInput { - s.PolicyName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *PutUserPolicyInput) SetUserName(v string) *PutUserPolicyInput { - s.UserName = &v - return s -} - -type PutUserPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPolicyOutput) GoString() string { - return s.String() -} - -type RemoveClientIDFromOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The client ID (also known as audience) to remove from the IAM OIDC provider - // resource. For more information about client IDs, see CreateOpenIDConnectProvider. - // - // ClientID is a required field - ClientID *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM OIDC provider resource to remove - // the client ID from. You can get a list of OIDC provider ARNs by using the - // ListOpenIDConnectProviders operation. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveClientIDFromOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveClientIDFromOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveClientIDFromOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveClientIDFromOpenIDConnectProviderInput"} - if s.ClientID == nil { - invalidParams.Add(request.NewErrParamRequired("ClientID")) - } - if s.ClientID != nil && len(*s.ClientID) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientID", 1)) - } - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientID sets the ClientID field's value. -func (s *RemoveClientIDFromOpenIDConnectProviderInput) SetClientID(v string) *RemoveClientIDFromOpenIDConnectProviderInput { - s.ClientID = &v - return s -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *RemoveClientIDFromOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *RemoveClientIDFromOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -type RemoveClientIDFromOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveClientIDFromOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveClientIDFromOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type RemoveRoleFromInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The name of the role to remove. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveRoleFromInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveRoleFromInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveRoleFromInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveRoleFromInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *RemoveRoleFromInstanceProfileInput) SetInstanceProfileName(v string) *RemoveRoleFromInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *RemoveRoleFromInstanceProfileInput) SetRoleName(v string) *RemoveRoleFromInstanceProfileInput { - s.RoleName = &v - return s -} - -type RemoveRoleFromInstanceProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveRoleFromInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveRoleFromInstanceProfileOutput) GoString() string { - return s.String() -} - -type RemoveUserFromGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The name of the user to remove. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveUserFromGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveUserFromGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveUserFromGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveUserFromGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *RemoveUserFromGroupInput) SetGroupName(v string) *RemoveUserFromGroupInput { - s.GroupName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *RemoveUserFromGroupInput) SetUserName(v string) *RemoveUserFromGroupInput { - s.UserName = &v - return s -} - -type RemoveUserFromGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveUserFromGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveUserFromGroupOutput) GoString() string { - return s.String() -} - -type ResetServiceSpecificCredentialInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the service-specific credential. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The name of the IAM user associated with the service-specific credential. - // If this value is not specified, then the operation assumes the user whose - // credentials are used to call the operation. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResetServiceSpecificCredentialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResetServiceSpecificCredentialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetServiceSpecificCredentialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetServiceSpecificCredentialInput"} - if s.ServiceSpecificCredentialId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceSpecificCredentialId")) - } - if s.ServiceSpecificCredentialId != nil && len(*s.ServiceSpecificCredentialId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ServiceSpecificCredentialId", 20)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *ResetServiceSpecificCredentialInput) SetServiceSpecificCredentialId(v string) *ResetServiceSpecificCredentialInput { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ResetServiceSpecificCredentialInput) SetUserName(v string) *ResetServiceSpecificCredentialInput { - s.UserName = &v - return s -} - -type ResetServiceSpecificCredentialOutput struct { - _ struct{} `type:"structure"` - - // A structure with details about the updated service-specific credential, including - // the new password. - // - // This is the only time that you can access the password. You cannot recover - // the password later, but you can reset it again. - ServiceSpecificCredential *ServiceSpecificCredential `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResetServiceSpecificCredentialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResetServiceSpecificCredentialOutput) GoString() string { - return s.String() -} - -// SetServiceSpecificCredential sets the ServiceSpecificCredential field's value. -func (s *ResetServiceSpecificCredentialOutput) SetServiceSpecificCredential(v *ServiceSpecificCredential) *ResetServiceSpecificCredentialOutput { - s.ServiceSpecificCredential = v - return s -} - -// Contains the result of the simulation of a single API operation call on a -// single resource. -// -// This data type is used by a member of the EvaluationResult data type. -type ResourceSpecificResult struct { - _ struct{} `type:"structure"` - - // Additional details about the results of the evaluation decision on a single - // resource. This parameter is returned only for cross-account simulations. - // This parameter explains how each policy type contributes to the resource-specific - // evaluation decision. - EvalDecisionDetails map[string]*string `type:"map"` - - // The result of the simulation of the simulated API operation on the resource - // specified in EvalResourceName. - // - // EvalResourceDecision is a required field - EvalResourceDecision *string `type:"string" required:"true" enum:"PolicyEvaluationDecisionType"` - - // The name of the simulated resource, in Amazon Resource Name (ARN) format. - // - // EvalResourceName is a required field - EvalResourceName *string `min:"1" type:"string" required:"true"` - - // A list of the statements in the input policies that determine the result - // for this part of the simulation. Remember that even if multiple statements - // allow the operation on the resource, if any statement denies that operation, - // then the explicit deny overrides any allow. In addition, the deny statement - // is the only entry included in the result. - MatchedStatements []*Statement `type:"list"` - - // A list of context keys that are required by the included input policies but - // that were not provided by one of the input parameters. This list is used - // when a list of ARNs is included in the ResourceArns parameter instead of - // "*". If you do not specify individual resources, by setting ResourceArns - // to "*" or by not including the ResourceArns parameter, then any missing context - // values are instead included under the EvaluationResults section. To discover - // the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy - // or GetContextKeysForPrincipalPolicy. - MissingContextValues []*string `type:"list"` - - // Contains information about the effect that a permissions boundary has on - // a policy simulation when that boundary is applied to an IAM entity. - PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResourceSpecificResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResourceSpecificResult) GoString() string { - return s.String() -} - -// SetEvalDecisionDetails sets the EvalDecisionDetails field's value. -func (s *ResourceSpecificResult) SetEvalDecisionDetails(v map[string]*string) *ResourceSpecificResult { - s.EvalDecisionDetails = v - return s -} - -// SetEvalResourceDecision sets the EvalResourceDecision field's value. -func (s *ResourceSpecificResult) SetEvalResourceDecision(v string) *ResourceSpecificResult { - s.EvalResourceDecision = &v - return s -} - -// SetEvalResourceName sets the EvalResourceName field's value. -func (s *ResourceSpecificResult) SetEvalResourceName(v string) *ResourceSpecificResult { - s.EvalResourceName = &v - return s -} - -// SetMatchedStatements sets the MatchedStatements field's value. -func (s *ResourceSpecificResult) SetMatchedStatements(v []*Statement) *ResourceSpecificResult { - s.MatchedStatements = v - return s -} - -// SetMissingContextValues sets the MissingContextValues field's value. -func (s *ResourceSpecificResult) SetMissingContextValues(v []*string) *ResourceSpecificResult { - s.MissingContextValues = v - return s -} - -// SetPermissionsBoundaryDecisionDetail sets the PermissionsBoundaryDecisionDetail field's value. -func (s *ResourceSpecificResult) SetPermissionsBoundaryDecisionDetail(v *PermissionsBoundaryDecisionDetail) *ResourceSpecificResult { - s.PermissionsBoundaryDecisionDetail = v - return s -} - -type ResyncMFADeviceInput struct { - _ struct{} `type:"structure"` - - // An authentication code emitted by the device. - // - // The format for this parameter is a sequence of six digits. - // - // AuthenticationCode1 is a required field - AuthenticationCode1 *string `min:"6" type:"string" required:"true"` - - // A subsequent authentication code emitted by the device. - // - // The format for this parameter is a sequence of six digits. - // - // AuthenticationCode2 is a required field - AuthenticationCode2 *string `min:"6" type:"string" required:"true"` - - // Serial number that uniquely identifies the MFA device. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The name of the user whose MFA device you want to resynchronize. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResyncMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResyncMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResyncMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResyncMFADeviceInput"} - if s.AuthenticationCode1 == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationCode1")) - } - if s.AuthenticationCode1 != nil && len(*s.AuthenticationCode1) < 6 { - invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode1", 6)) - } - if s.AuthenticationCode2 == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationCode2")) - } - if s.AuthenticationCode2 != nil && len(*s.AuthenticationCode2) < 6 { - invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode2", 6)) - } - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationCode1 sets the AuthenticationCode1 field's value. -func (s *ResyncMFADeviceInput) SetAuthenticationCode1(v string) *ResyncMFADeviceInput { - s.AuthenticationCode1 = &v - return s -} - -// SetAuthenticationCode2 sets the AuthenticationCode2 field's value. -func (s *ResyncMFADeviceInput) SetAuthenticationCode2(v string) *ResyncMFADeviceInput { - s.AuthenticationCode2 = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *ResyncMFADeviceInput) SetSerialNumber(v string) *ResyncMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ResyncMFADeviceInput) SetUserName(v string) *ResyncMFADeviceInput { - s.UserName = &v - return s -} - -type ResyncMFADeviceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResyncMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResyncMFADeviceOutput) GoString() string { - return s.String() -} - -// Contains information about an IAM role. This structure is returned as a response -// element in several API operations that interact with roles. -type Role struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) specifying the role. For more information - // about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The policy that grants an entity permission to assume the role. - AssumeRolePolicyDocument *string `min:"1" type:"string"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the role was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // A description of the role that you provide. - Description *string `type:"string"` - - // The maximum session duration (in seconds) for the specified role. Anyone - // who uses the CLI, or API to assume the role can specify the duration using - // the optional DurationSeconds API parameter or duration-seconds CLI parameter. - MaxSessionDuration *int64 `min:"3600" type:"integer"` - - // The path to the role. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // The ARN of the policy used to set the permissions boundary for the role. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` - - // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // RoleId is a required field - RoleId *string `min:"16" type:"string" required:"true"` - - // Contains information about the last time that an IAM role was used. This - // includes the date and time and the Region in which the role was last used. - // Activity is only reported for the trailing 400 days. This period can be shorter - // if your Region began supporting these features within the last year. The - // role might have been used more than 400 days ago. For more information, see - // Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM user Guide. - RoleLastUsed *RoleLastUsed `type:"structure"` - - // The friendly name that identifies the role. - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` - - // A list of tags that are attached to the role. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Role) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Role) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Role) SetArn(v string) *Role { - s.Arn = &v - return s -} - -// SetAssumeRolePolicyDocument sets the AssumeRolePolicyDocument field's value. -func (s *Role) SetAssumeRolePolicyDocument(v string) *Role { - s.AssumeRolePolicyDocument = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Role) SetCreateDate(v time.Time) *Role { - s.CreateDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Role) SetDescription(v string) *Role { - s.Description = &v - return s -} - -// SetMaxSessionDuration sets the MaxSessionDuration field's value. -func (s *Role) SetMaxSessionDuration(v int64) *Role { - s.MaxSessionDuration = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Role) SetPath(v string) *Role { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *Role) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *Role { - s.PermissionsBoundary = v - return s -} - -// SetRoleId sets the RoleId field's value. -func (s *Role) SetRoleId(v string) *Role { - s.RoleId = &v - return s -} - -// SetRoleLastUsed sets the RoleLastUsed field's value. -func (s *Role) SetRoleLastUsed(v *RoleLastUsed) *Role { - s.RoleLastUsed = v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *Role) SetRoleName(v string) *Role { - s.RoleName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Role) SetTags(v []*Tag) *Role { - s.Tags = v - return s -} - -// Contains information about an IAM role, including all of the role's policies. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -type RoleDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // The trust policy that grants permission to assume the role. - AssumeRolePolicyDocument *string `min:"1" type:"string"` - - // A list of managed policies attached to the role. These policies are the role's - // access (permissions) policies. - AttachedManagedPolicies []*AttachedPolicy `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the role was created. - CreateDate *time.Time `type:"timestamp"` - - // A list of instance profiles that contain this role. - InstanceProfileList []*InstanceProfile `type:"list"` - - // The path to the role. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The ARN of the policy used to set the permissions boundary for the role. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` - - // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - RoleId *string `min:"16" type:"string"` - - // Contains information about the last time that an IAM role was used. This - // includes the date and time and the Region in which the role was last used. - // Activity is only reported for the trailing 400 days. This period can be shorter - // if your Region began supporting these features within the last year. The - // role might have been used more than 400 days ago. For more information, see - // Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM User Guide. - RoleLastUsed *RoleLastUsed `type:"structure"` - - // The friendly name that identifies the role. - RoleName *string `min:"1" type:"string"` - - // A list of inline policies embedded in the role. These policies are the role's - // access (permissions) policies. - RolePolicyList []*PolicyDetail `type:"list"` - - // A list of tags that are attached to the role. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RoleDetail) SetArn(v string) *RoleDetail { - s.Arn = &v - return s -} - -// SetAssumeRolePolicyDocument sets the AssumeRolePolicyDocument field's value. -func (s *RoleDetail) SetAssumeRolePolicyDocument(v string) *RoleDetail { - s.AssumeRolePolicyDocument = &v - return s -} - -// SetAttachedManagedPolicies sets the AttachedManagedPolicies field's value. -func (s *RoleDetail) SetAttachedManagedPolicies(v []*AttachedPolicy) *RoleDetail { - s.AttachedManagedPolicies = v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *RoleDetail) SetCreateDate(v time.Time) *RoleDetail { - s.CreateDate = &v - return s -} - -// SetInstanceProfileList sets the InstanceProfileList field's value. -func (s *RoleDetail) SetInstanceProfileList(v []*InstanceProfile) *RoleDetail { - s.InstanceProfileList = v - return s -} - -// SetPath sets the Path field's value. -func (s *RoleDetail) SetPath(v string) *RoleDetail { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *RoleDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *RoleDetail { - s.PermissionsBoundary = v - return s -} - -// SetRoleId sets the RoleId field's value. -func (s *RoleDetail) SetRoleId(v string) *RoleDetail { - s.RoleId = &v - return s -} - -// SetRoleLastUsed sets the RoleLastUsed field's value. -func (s *RoleDetail) SetRoleLastUsed(v *RoleLastUsed) *RoleDetail { - s.RoleLastUsed = v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *RoleDetail) SetRoleName(v string) *RoleDetail { - s.RoleName = &v - return s -} - -// SetRolePolicyList sets the RolePolicyList field's value. -func (s *RoleDetail) SetRolePolicyList(v []*PolicyDetail) *RoleDetail { - s.RolePolicyList = v - return s -} - -// SetTags sets the Tags field's value. -func (s *RoleDetail) SetTags(v []*Tag) *RoleDetail { - s.Tags = v - return s -} - -// Contains information about the last time that an IAM role was used. This -// includes the date and time and the Region in which the role was last used. -// Activity is only reported for the trailing 400 days. This period can be shorter -// if your Region began supporting these features within the last year. The -// role might have been used more than 400 days ago. For more information, see -// Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) -// in the IAM user Guide. -// -// This data type is returned as a response element in the GetRole and GetAccountAuthorizationDetails -// operations. -type RoleLastUsed struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // that the role was last used. - // - // This field is null if the role has not been used within the IAM tracking - // period. For more information about the tracking period, see Regions where - // data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM User Guide. - LastUsedDate *time.Time `type:"timestamp"` - - // The name of the Amazon Web Services Region in which the role was last used. - Region *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleLastUsed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleLastUsed) GoString() string { - return s.String() -} - -// SetLastUsedDate sets the LastUsedDate field's value. -func (s *RoleLastUsed) SetLastUsedDate(v time.Time) *RoleLastUsed { - s.LastUsedDate = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *RoleLastUsed) SetRegion(v string) *RoleLastUsed { - s.Region = &v - return s -} - -// An object that contains details about how a service-linked role is used, -// if that information is returned by the service. -// -// This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus -// operation. -type RoleUsageType struct { - _ struct{} `type:"structure"` - - // The name of the Region where the service-linked role is being used. - Region *string `min:"1" type:"string"` - - // The name of the resource that is using the service-linked role. - Resources []*string `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleUsageType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleUsageType) GoString() string { - return s.String() -} - -// SetRegion sets the Region field's value. -func (s *RoleUsageType) SetRegion(v string) *RoleUsageType { - s.Region = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *RoleUsageType) SetResources(v []*string) *RoleUsageType { - s.Resources = v - return s -} - -// Contains the list of SAML providers for this account. -type SAMLProviderListEntry struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SAML provider. - Arn *string `min:"20" type:"string"` - - // The date and time when the SAML provider was created. - CreateDate *time.Time `type:"timestamp"` - - // The expiration date and time for the SAML provider. - ValidUntil *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SAMLProviderListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SAMLProviderListEntry) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *SAMLProviderListEntry) SetArn(v string) *SAMLProviderListEntry { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *SAMLProviderListEntry) SetCreateDate(v time.Time) *SAMLProviderListEntry { - s.CreateDate = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *SAMLProviderListEntry) SetValidUntil(v time.Time) *SAMLProviderListEntry { - s.ValidUntil = &v - return s -} - -// Contains information about an SSH public key. -// -// This data type is used as a response element in the GetSSHPublicKey and UploadSSHPublicKey -// operations. -type SSHPublicKey struct { - _ struct{} `type:"structure"` - - // The MD5 message digest of the SSH public key. - // - // Fingerprint is a required field - Fingerprint *string `min:"48" type:"string" required:"true"` - - // The SSH public key. - // - // SSHPublicKeyBody is a required field - SSHPublicKeyBody *string `min:"1" type:"string" required:"true"` - - // The unique identifier for the SSH public key. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The status of the SSH public key. Active means that the key can be used for - // authentication with an CodeCommit repository. Inactive means that the key - // cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the SSH public key was uploaded. - UploadDate *time.Time `type:"timestamp"` - - // The name of the IAM user associated with the SSH public key. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SSHPublicKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SSHPublicKey) GoString() string { - return s.String() -} - -// SetFingerprint sets the Fingerprint field's value. -func (s *SSHPublicKey) SetFingerprint(v string) *SSHPublicKey { - s.Fingerprint = &v - return s -} - -// SetSSHPublicKeyBody sets the SSHPublicKeyBody field's value. -func (s *SSHPublicKey) SetSSHPublicKeyBody(v string) *SSHPublicKey { - s.SSHPublicKeyBody = &v - return s -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *SSHPublicKey) SetSSHPublicKeyId(v string) *SSHPublicKey { - s.SSHPublicKeyId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SSHPublicKey) SetStatus(v string) *SSHPublicKey { - s.Status = &v - return s -} - -// SetUploadDate sets the UploadDate field's value. -func (s *SSHPublicKey) SetUploadDate(v time.Time) *SSHPublicKey { - s.UploadDate = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *SSHPublicKey) SetUserName(v string) *SSHPublicKey { - s.UserName = &v - return s -} - -// Contains information about an SSH public key, without the key's body or fingerprint. -// -// This data type is used as a response element in the ListSSHPublicKeys operation. -type SSHPublicKeyMetadata struct { - _ struct{} `type:"structure"` - - // The unique identifier for the SSH public key. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The status of the SSH public key. Active means that the key can be used for - // authentication with an CodeCommit repository. Inactive means that the key - // cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the SSH public key was uploaded. - // - // UploadDate is a required field - UploadDate *time.Time `type:"timestamp" required:"true"` - - // The name of the IAM user associated with the SSH public key. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SSHPublicKeyMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SSHPublicKeyMetadata) GoString() string { - return s.String() -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *SSHPublicKeyMetadata) SetSSHPublicKeyId(v string) *SSHPublicKeyMetadata { - s.SSHPublicKeyId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SSHPublicKeyMetadata) SetStatus(v string) *SSHPublicKeyMetadata { - s.Status = &v - return s -} - -// SetUploadDate sets the UploadDate field's value. -func (s *SSHPublicKeyMetadata) SetUploadDate(v time.Time) *SSHPublicKeyMetadata { - s.UploadDate = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *SSHPublicKeyMetadata) SetUserName(v string) *SSHPublicKeyMetadata { - s.UserName = &v - return s -} - -// Contains information about a server certificate. -// -// This data type is used as a response element in the GetServerCertificate -// operation. -type ServerCertificate struct { - _ struct{} `type:"structure"` - - // The contents of the public key certificate. - // - // CertificateBody is a required field - CertificateBody *string `min:"1" type:"string" required:"true"` - - // The contents of the public key certificate chain. - CertificateChain *string `min:"1" type:"string"` - - // The meta information of the server certificate, such as its name, path, ID, - // and ARN. - // - // ServerCertificateMetadata is a required field - ServerCertificateMetadata *ServerCertificateMetadata `type:"structure" required:"true"` - - // A list of tags that are attached to the server certificate. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerCertificate) GoString() string { - return s.String() -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *ServerCertificate) SetCertificateBody(v string) *ServerCertificate { - s.CertificateBody = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *ServerCertificate) SetCertificateChain(v string) *ServerCertificate { - s.CertificateChain = &v - return s -} - -// SetServerCertificateMetadata sets the ServerCertificateMetadata field's value. -func (s *ServerCertificate) SetServerCertificateMetadata(v *ServerCertificateMetadata) *ServerCertificate { - s.ServerCertificateMetadata = v - return s -} - -// SetTags sets the Tags field's value. -func (s *ServerCertificate) SetTags(v []*Tag) *ServerCertificate { - s.Tags = v - return s -} - -// Contains information about a server certificate without its certificate body, -// certificate chain, and private key. -// -// This data type is used as a response element in the UploadServerCertificate -// and ListServerCertificates operations. -type ServerCertificateMetadata struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) specifying the server certificate. For more - // information about ARNs and how to use them in policies, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The date on which the certificate is set to expire. - Expiration *time.Time `type:"timestamp"` - - // The path to the server certificate. For more information about paths, see - // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // The stable and unique string identifying the server certificate. For more - // information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // ServerCertificateId is a required field - ServerCertificateId *string `min:"16" type:"string" required:"true"` - - // The name that identifies the server certificate. - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` - - // The date when the server certificate was uploaded. - UploadDate *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerCertificateMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerCertificateMetadata) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ServerCertificateMetadata) SetArn(v string) *ServerCertificateMetadata { - s.Arn = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *ServerCertificateMetadata) SetExpiration(v time.Time) *ServerCertificateMetadata { - s.Expiration = &v - return s -} - -// SetPath sets the Path field's value. -func (s *ServerCertificateMetadata) SetPath(v string) *ServerCertificateMetadata { - s.Path = &v - return s -} - -// SetServerCertificateId sets the ServerCertificateId field's value. -func (s *ServerCertificateMetadata) SetServerCertificateId(v string) *ServerCertificateMetadata { - s.ServerCertificateId = &v - return s -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *ServerCertificateMetadata) SetServerCertificateName(v string) *ServerCertificateMetadata { - s.ServerCertificateName = &v - return s -} - -// SetUploadDate sets the UploadDate field's value. -func (s *ServerCertificateMetadata) SetUploadDate(v time.Time) *ServerCertificateMetadata { - s.UploadDate = &v - return s -} - -// Contains details about the most recent attempt to access the service. -// -// This data type is used as a response element in the GetServiceLastAccessedDetails -// operation. -type ServiceLastAccessed struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when an authenticated entity most recently attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticated *time.Time `type:"timestamp"` - - // The ARN of the authenticated entity (user or role) that last attempted to - // access the service. Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticatedEntity *string `min:"20" type:"string"` - - // The Region from which the authenticated entity (user or role) last attempted - // to access the service. Amazon Web Services does not report unauthenticated - // requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticatedRegion *string `type:"string"` - - // The name of the service in which access was attempted. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The namespace of the service in which access was attempted. - // - // To learn the service namespace of a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to - // view details for that service. In the first paragraph, find the service prefix. - // For example, (service prefix: a4b). For more information about service namespaces, - // see Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `min:"1" type:"string" required:"true"` - - // The total number of authenticated principals (root user, IAM users, or IAM - // roles) that have attempted to access the service. - // - // This field is null if no principals attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - TotalAuthenticatedEntities *int64 `type:"integer"` - - // An object that contains details about the most recent attempt to access a - // tracked action within the service. - // - // This field is null if there no tracked actions or if the principal did not - // use the tracked actions within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - // This field is also null if the report was generated at the service level - // and not the action level. For more information, see the Granularity field - // in GenerateServiceLastAccessedDetails. - TrackedActionsLastAccessed []*TrackedActionLastAccessed `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceLastAccessed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceLastAccessed) GoString() string { - return s.String() -} - -// SetLastAuthenticated sets the LastAuthenticated field's value. -func (s *ServiceLastAccessed) SetLastAuthenticated(v time.Time) *ServiceLastAccessed { - s.LastAuthenticated = &v - return s -} - -// SetLastAuthenticatedEntity sets the LastAuthenticatedEntity field's value. -func (s *ServiceLastAccessed) SetLastAuthenticatedEntity(v string) *ServiceLastAccessed { - s.LastAuthenticatedEntity = &v - return s -} - -// SetLastAuthenticatedRegion sets the LastAuthenticatedRegion field's value. -func (s *ServiceLastAccessed) SetLastAuthenticatedRegion(v string) *ServiceLastAccessed { - s.LastAuthenticatedRegion = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ServiceLastAccessed) SetServiceName(v string) *ServiceLastAccessed { - s.ServiceName = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *ServiceLastAccessed) SetServiceNamespace(v string) *ServiceLastAccessed { - s.ServiceNamespace = &v - return s -} - -// SetTotalAuthenticatedEntities sets the TotalAuthenticatedEntities field's value. -func (s *ServiceLastAccessed) SetTotalAuthenticatedEntities(v int64) *ServiceLastAccessed { - s.TotalAuthenticatedEntities = &v - return s -} - -// SetTrackedActionsLastAccessed sets the TrackedActionsLastAccessed field's value. -func (s *ServiceLastAccessed) SetTrackedActionsLastAccessed(v []*TrackedActionLastAccessed) *ServiceLastAccessed { - s.TrackedActionsLastAccessed = v - return s -} - -// Contains the details of a service-specific credential. -type ServiceSpecificCredential struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the service-specific credential were created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The name of the service associated with the service-specific credential. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The generated password for the service-specific credential. - // - // ServicePassword is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by ServiceSpecificCredential's - // String and GoString methods. - // - // ServicePassword is a required field - ServicePassword *string `type:"string" required:"true" sensitive:"true"` - - // The unique identifier for the service-specific credential. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The generated user name for the service-specific credential. This value is - // generated by combining the IAM user's name combined with the ID number of - // the Amazon Web Services account, as in jane-at-123456789012, for example. - // This value cannot be configured by the user. - // - // ServiceUserName is a required field - ServiceUserName *string `min:"17" type:"string" required:"true"` - - // The status of the service-specific credential. Active means that the key - // is valid for API calls, while Inactive means it is not. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user associated with the service-specific credential. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceSpecificCredential) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceSpecificCredential) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ServiceSpecificCredential) SetCreateDate(v time.Time) *ServiceSpecificCredential { - s.CreateDate = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ServiceSpecificCredential) SetServiceName(v string) *ServiceSpecificCredential { - s.ServiceName = &v - return s -} - -// SetServicePassword sets the ServicePassword field's value. -func (s *ServiceSpecificCredential) SetServicePassword(v string) *ServiceSpecificCredential { - s.ServicePassword = &v - return s -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *ServiceSpecificCredential) SetServiceSpecificCredentialId(v string) *ServiceSpecificCredential { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetServiceUserName sets the ServiceUserName field's value. -func (s *ServiceSpecificCredential) SetServiceUserName(v string) *ServiceSpecificCredential { - s.ServiceUserName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ServiceSpecificCredential) SetStatus(v string) *ServiceSpecificCredential { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ServiceSpecificCredential) SetUserName(v string) *ServiceSpecificCredential { - s.UserName = &v - return s -} - -// Contains additional details about a service-specific credential. -type ServiceSpecificCredentialMetadata struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the service-specific credential were created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The name of the service associated with the service-specific credential. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The unique identifier for the service-specific credential. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The generated user name for the service-specific credential. - // - // ServiceUserName is a required field - ServiceUserName *string `min:"17" type:"string" required:"true"` - - // The status of the service-specific credential. Active means that the key - // is valid for API calls, while Inactive means it is not. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user associated with the service-specific credential. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceSpecificCredentialMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceSpecificCredentialMetadata) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ServiceSpecificCredentialMetadata) SetCreateDate(v time.Time) *ServiceSpecificCredentialMetadata { - s.CreateDate = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ServiceSpecificCredentialMetadata) SetServiceName(v string) *ServiceSpecificCredentialMetadata { - s.ServiceName = &v - return s -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *ServiceSpecificCredentialMetadata) SetServiceSpecificCredentialId(v string) *ServiceSpecificCredentialMetadata { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetServiceUserName sets the ServiceUserName field's value. -func (s *ServiceSpecificCredentialMetadata) SetServiceUserName(v string) *ServiceSpecificCredentialMetadata { - s.ServiceUserName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ServiceSpecificCredentialMetadata) SetStatus(v string) *ServiceSpecificCredentialMetadata { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ServiceSpecificCredentialMetadata) SetUserName(v string) *ServiceSpecificCredentialMetadata { - s.UserName = &v - return s -} - -type SetDefaultPolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy whose default version you - // want to set. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The version of the policy to set as the default (operative) version. - // - // For more information about managed policy versions, see Versioning for managed - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - // - // VersionId is a required field - VersionId *string `type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetDefaultPolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetDefaultPolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetDefaultPolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetDefaultPolicyVersionInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.VersionId == nil { - invalidParams.Add(request.NewErrParamRequired("VersionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *SetDefaultPolicyVersionInput) SetPolicyArn(v string) *SetDefaultPolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *SetDefaultPolicyVersionInput) SetVersionId(v string) *SetDefaultPolicyVersionInput { - s.VersionId = &v - return s -} - -type SetDefaultPolicyVersionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetDefaultPolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetDefaultPolicyVersionOutput) GoString() string { - return s.String() -} - -type SetSecurityTokenServicePreferencesInput struct { - _ struct{} `type:"structure"` - - // The version of the global endpoint token. Version 1 tokens are valid only - // in Amazon Web Services Regions that are available by default. These tokens - // do not work in manually enabled Regions, such as Asia Pacific (Hong Kong). - // Version 2 tokens are valid in all Regions. However, version 2 tokens are - // longer and might affect systems where you temporarily store tokens. - // - // For information, see Activating and deactivating STS in an Amazon Web Services - // Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) - // in the IAM User Guide. - // - // GlobalEndpointTokenVersion is a required field - GlobalEndpointTokenVersion *string `type:"string" required:"true" enum:"GlobalEndpointTokenVersion"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetSecurityTokenServicePreferencesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetSecurityTokenServicePreferencesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSecurityTokenServicePreferencesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSecurityTokenServicePreferencesInput"} - if s.GlobalEndpointTokenVersion == nil { - invalidParams.Add(request.NewErrParamRequired("GlobalEndpointTokenVersion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGlobalEndpointTokenVersion sets the GlobalEndpointTokenVersion field's value. -func (s *SetSecurityTokenServicePreferencesInput) SetGlobalEndpointTokenVersion(v string) *SetSecurityTokenServicePreferencesInput { - s.GlobalEndpointTokenVersion = &v - return s -} - -type SetSecurityTokenServicePreferencesOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetSecurityTokenServicePreferencesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetSecurityTokenServicePreferencesOutput) GoString() string { - return s.String() -} - -// Contains information about an X.509 signing certificate. -// -// This data type is used as a response element in the UploadSigningCertificate -// and ListSigningCertificates operations. -type SigningCertificate struct { - _ struct{} `type:"structure"` - - // The contents of the signing certificate. - // - // CertificateBody is a required field - CertificateBody *string `min:"1" type:"string" required:"true"` - - // The ID for the signing certificate. - // - // CertificateId is a required field - CertificateId *string `min:"24" type:"string" required:"true"` - - // The status of the signing certificate. Active means that the key is valid - // for API calls, while Inactive means it is not. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The date when the signing certificate was uploaded. - UploadDate *time.Time `type:"timestamp"` - - // The name of the user the signing certificate is associated with. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SigningCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SigningCertificate) GoString() string { - return s.String() -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *SigningCertificate) SetCertificateBody(v string) *SigningCertificate { - s.CertificateBody = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *SigningCertificate) SetCertificateId(v string) *SigningCertificate { - s.CertificateId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SigningCertificate) SetStatus(v string) *SigningCertificate { - s.Status = &v - return s -} - -// SetUploadDate sets the UploadDate field's value. -func (s *SigningCertificate) SetUploadDate(v time.Time) *SigningCertificate { - s.UploadDate = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *SigningCertificate) SetUserName(v string) *SigningCertificate { - s.UserName = &v - return s -} - -type SimulateCustomPolicyInput struct { - _ struct{} `type:"structure"` - - // A list of names of API operations to evaluate in the simulation. Each operation - // is evaluated against each resource. Each operation must include the service - // identifier, such as iam:CreateUser. This operation does not support using - // wildcards (*) in an action name. - // - // ActionNames is a required field - ActionNames []*string `type:"list" required:"true"` - - // The ARN of the IAM user that you want to use as the simulated caller of the - // API operations. CallerArn is required if you include a ResourcePolicy so - // that the policy's Principal element has a value to use in evaluating the - // policy. - // - // You can specify only the ARN of an IAM user. You cannot specify the ARN of - // an assumed role, federated user, or a service principal. - CallerArn *string `min:"1" type:"string"` - - // A list of context keys and corresponding values for the simulation to use. - // Whenever a context key is evaluated in one of the simulated IAM permissions - // policies, the corresponding value is supplied. - ContextEntries []*ContextEntry `type:"list"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The IAM permissions boundary policy to simulate. The permissions boundary - // sets the maximum permissions that an IAM entity can have. You can input only - // one permissions boundary when you pass a policy to this operation. For more - // information about permissions boundaries, see Permissions boundaries for - // IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. The policy input is specified as a string that contains - // the complete, valid JSON text of a permissions boundary policy. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - PermissionsBoundaryPolicyInputList []*string `type:"list"` - - // A list of policy documents to include in the simulation. Each document is - // specified as a string containing the complete, valid JSON text of an IAM - // policy. Do not include any resource-based policies in this parameter. Any - // resource-based policy must be submitted with the ResourcePolicy parameter. - // The policies cannot be "scope-down" policies, such as you could include in - // a call to GetFederationToken (https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetFederationToken.html) - // or one of the AssumeRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AssumeRole.html) - // API operations. In other words, do not use policies designed to restrict - // what a user can do while using the temporary credentials. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyInputList is a required field - PolicyInputList []*string `type:"list" required:"true"` - - // A list of ARNs of Amazon Web Services resources to include in the simulation. - // If this parameter is not provided, then the value defaults to * (all resources). - // Each API in the ActionNames parameter is evaluated for each resource in this - // list. The simulation determines the access result (allowed or denied) of - // each combination and reports it in the response. You can simulate resources - // that don't exist in your account. - // - // The simulation does not automatically retrieve policies for the specified - // resources. If you want to include a resource policy in the simulation, then - // you must include the policy as a string in the ResourcePolicy parameter. - // - // If you include a ResourcePolicy, then it must be applicable to all of the - // resources included in the simulation or you receive an invalid input error. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // Simulation of resource-based policies isn't supported for IAM roles. - ResourceArns []*string `type:"list"` - - // Specifies the type of simulation to run. Different API operations that support - // resource-based policies require different combinations of resources. By specifying - // the type of simulation to run, you enable the policy simulator to enforce - // the presence of the required resources to ensure reliable simulation results. - // If your simulation does not match one of the following scenarios, then you - // can omit this parameter. The following list shows each of the supported scenario - // values and the resources that you must define to run the simulation. - // - // Each of the EC2 scenarios requires that you specify instance, image, and - // security group resources. If your scenario includes an EBS volume, then you - // must specify that volume as a resource. If the EC2 scenario includes VPC, - // then you must supply the network interface resource. If it includes an IP - // subnet, then you must specify the subnet resource. For more information on - // the EC2 scenario options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) - // in the Amazon EC2 User Guide. - // - // * EC2-VPC-InstanceStore instance, image, security group, network interface - // - // * EC2-VPC-InstanceStore-Subnet instance, image, security group, network - // interface, subnet - // - // * EC2-VPC-EBS instance, image, security group, network interface, volume - // - // * EC2-VPC-EBS-Subnet instance, image, security group, network interface, - // subnet, volume - ResourceHandlingOption *string `min:"1" type:"string"` - - // An ARN representing the Amazon Web Services account ID that specifies the - // owner of any simulated resource that does not identify its owner in the resource - // ARN. Examples of resource ARNs include an S3 bucket or object. If ResourceOwner - // is specified, it is also used as the account owner of any ResourcePolicy - // included in the simulation. If the ResourceOwner parameter is not specified, - // then the owner of the resources and the resource policy defaults to the account - // of the identity provided in CallerArn. This parameter is required only if - // you specify a resource-based policy and account that owns the resource is - // different from the account that owns the simulated calling user CallerArn. - // - // The ARN for an account uses the following syntax: arn:aws:iam::AWS-account-ID:root. - // For example, to represent the account with the 112233445566 ID, use the following - // ARN: arn:aws:iam::112233445566-ID:root. - ResourceOwner *string `min:"1" type:"string"` - - // A resource-based policy to include in the simulation provided as a string. - // Each resource in the simulation is treated as if it had this policy attached. - // You can include only one resource-based policy in a simulation. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // Simulation of resource-based policies isn't supported for IAM roles. - ResourcePolicy *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulateCustomPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulateCustomPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SimulateCustomPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SimulateCustomPolicyInput"} - if s.ActionNames == nil { - invalidParams.Add(request.NewErrParamRequired("ActionNames")) - } - if s.CallerArn != nil && len(*s.CallerArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CallerArn", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PolicyInputList == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyInputList")) - } - if s.ResourceHandlingOption != nil && len(*s.ResourceHandlingOption) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceHandlingOption", 1)) - } - if s.ResourceOwner != nil && len(*s.ResourceOwner) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceOwner", 1)) - } - if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) - } - if s.ContextEntries != nil { - for i, v := range s.ContextEntries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContextEntries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionNames sets the ActionNames field's value. -func (s *SimulateCustomPolicyInput) SetActionNames(v []*string) *SimulateCustomPolicyInput { - s.ActionNames = v - return s -} - -// SetCallerArn sets the CallerArn field's value. -func (s *SimulateCustomPolicyInput) SetCallerArn(v string) *SimulateCustomPolicyInput { - s.CallerArn = &v - return s -} - -// SetContextEntries sets the ContextEntries field's value. -func (s *SimulateCustomPolicyInput) SetContextEntries(v []*ContextEntry) *SimulateCustomPolicyInput { - s.ContextEntries = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *SimulateCustomPolicyInput) SetMarker(v string) *SimulateCustomPolicyInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *SimulateCustomPolicyInput) SetMaxItems(v int64) *SimulateCustomPolicyInput { - s.MaxItems = &v - return s -} - -// SetPermissionsBoundaryPolicyInputList sets the PermissionsBoundaryPolicyInputList field's value. -func (s *SimulateCustomPolicyInput) SetPermissionsBoundaryPolicyInputList(v []*string) *SimulateCustomPolicyInput { - s.PermissionsBoundaryPolicyInputList = v - return s -} - -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *SimulateCustomPolicyInput) SetPolicyInputList(v []*string) *SimulateCustomPolicyInput { - s.PolicyInputList = v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *SimulateCustomPolicyInput) SetResourceArns(v []*string) *SimulateCustomPolicyInput { - s.ResourceArns = v - return s -} - -// SetResourceHandlingOption sets the ResourceHandlingOption field's value. -func (s *SimulateCustomPolicyInput) SetResourceHandlingOption(v string) *SimulateCustomPolicyInput { - s.ResourceHandlingOption = &v - return s -} - -// SetResourceOwner sets the ResourceOwner field's value. -func (s *SimulateCustomPolicyInput) SetResourceOwner(v string) *SimulateCustomPolicyInput { - s.ResourceOwner = &v - return s -} - -// SetResourcePolicy sets the ResourcePolicy field's value. -func (s *SimulateCustomPolicyInput) SetResourcePolicy(v string) *SimulateCustomPolicyInput { - s.ResourcePolicy = &v - return s -} - -// Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy -// request. -type SimulatePolicyResponse struct { - _ struct{} `type:"structure"` - - // The results of the simulation. - EvaluationResults []*EvaluationResult `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulatePolicyResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulatePolicyResponse) GoString() string { - return s.String() -} - -// SetEvaluationResults sets the EvaluationResults field's value. -func (s *SimulatePolicyResponse) SetEvaluationResults(v []*EvaluationResult) *SimulatePolicyResponse { - s.EvaluationResults = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *SimulatePolicyResponse) SetIsTruncated(v bool) *SimulatePolicyResponse { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *SimulatePolicyResponse) SetMarker(v string) *SimulatePolicyResponse { - s.Marker = &v - return s -} - -type SimulatePrincipalPolicyInput struct { - _ struct{} `type:"structure"` - - // A list of names of API operations to evaluate in the simulation. Each operation - // is evaluated for each resource. Each operation must include the service identifier, - // such as iam:CreateUser. - // - // ActionNames is a required field - ActionNames []*string `type:"list" required:"true"` - - // The ARN of the IAM user that you want to specify as the simulated caller - // of the API operations. If you do not specify a CallerArn, it defaults to - // the ARN of the user that you specify in PolicySourceArn, if you specified - // a user. If you include both a PolicySourceArn (for example, arn:aws:iam::123456789012:user/David) - // and a CallerArn (for example, arn:aws:iam::123456789012:user/Bob), the result - // is that you simulate calling the API operations as Bob, as if Bob had David's - // policies. - // - // You can specify only the ARN of an IAM user. You cannot specify the ARN of - // an assumed role, federated user, or a service principal. - // - // CallerArn is required if you include a ResourcePolicy and the PolicySourceArn - // is not the ARN for an IAM user. This is required so that the resource-based - // policy's Principal element has a value to use in evaluating the policy. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - CallerArn *string `min:"1" type:"string"` - - // A list of context keys and corresponding values for the simulation to use. - // Whenever a context key is evaluated in one of the simulated IAM permissions - // policies, the corresponding value is supplied. - ContextEntries []*ContextEntry `type:"list"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The IAM permissions boundary policy to simulate. The permissions boundary - // sets the maximum permissions that the entity can have. You can input only - // one permissions boundary when you pass a policy to this operation. An IAM - // entity can only have one permissions boundary in effect at a time. For example, - // if a permissions boundary is attached to an entity and you pass in a different - // permissions boundary policy using this parameter, then the new permissions - // boundary policy is used for the simulation. For more information about permissions - // boundaries, see Permissions boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. The policy input is specified as a string containing - // the complete, valid JSON text of a permissions boundary policy. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - PermissionsBoundaryPolicyInputList []*string `type:"list"` - - // An optional list of additional policy documents to include in the simulation. - // Each document is specified as a string containing the complete, valid JSON - // text of an IAM policy. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - PolicyInputList []*string `type:"list"` - - // The Amazon Resource Name (ARN) of a user, group, or role whose policies you - // want to include in the simulation. If you specify a user, group, or role, - // the simulation includes all policies that are associated with that entity. - // If you specify a user, the simulation also includes all policies that are - // attached to any groups the user belongs to. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicySourceArn is a required field - PolicySourceArn *string `min:"20" type:"string" required:"true"` - - // A list of ARNs of Amazon Web Services resources to include in the simulation. - // If this parameter is not provided, then the value defaults to * (all resources). - // Each API in the ActionNames parameter is evaluated for each resource in this - // list. The simulation determines the access result (allowed or denied) of - // each combination and reports it in the response. You can simulate resources - // that don't exist in your account. - // - // The simulation does not automatically retrieve policies for the specified - // resources. If you want to include a resource policy in the simulation, then - // you must include the policy as a string in the ResourcePolicy parameter. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // Simulation of resource-based policies isn't supported for IAM roles. - ResourceArns []*string `type:"list"` - - // Specifies the type of simulation to run. Different API operations that support - // resource-based policies require different combinations of resources. By specifying - // the type of simulation to run, you enable the policy simulator to enforce - // the presence of the required resources to ensure reliable simulation results. - // If your simulation does not match one of the following scenarios, then you - // can omit this parameter. The following list shows each of the supported scenario - // values and the resources that you must define to run the simulation. - // - // Each of the EC2 scenarios requires that you specify instance, image, and - // security group resources. If your scenario includes an EBS volume, then you - // must specify that volume as a resource. If the EC2 scenario includes VPC, - // then you must supply the network interface resource. If it includes an IP - // subnet, then you must specify the subnet resource. For more information on - // the EC2 scenario options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) - // in the Amazon EC2 User Guide. - // - // * EC2-VPC-InstanceStore instance, image, security group, network interface - // - // * EC2-VPC-InstanceStore-Subnet instance, image, security group, network - // interface, subnet - // - // * EC2-VPC-EBS instance, image, security group, network interface, volume - // - // * EC2-VPC-EBS-Subnet instance, image, security group, network interface, - // subnet, volume - ResourceHandlingOption *string `min:"1" type:"string"` - - // An Amazon Web Services account ID that specifies the owner of any simulated - // resource that does not identify its owner in the resource ARN. Examples of - // resource ARNs include an S3 bucket or object. If ResourceOwner is specified, - // it is also used as the account owner of any ResourcePolicy included in the - // simulation. If the ResourceOwner parameter is not specified, then the owner - // of the resources and the resource policy defaults to the account of the identity - // provided in CallerArn. This parameter is required only if you specify a resource-based - // policy and account that owns the resource is different from the account that - // owns the simulated calling user CallerArn. - ResourceOwner *string `min:"1" type:"string"` - - // A resource-based policy to include in the simulation provided as a string. - // Each resource in the simulation is treated as if it had this policy attached. - // You can include only one resource-based policy in a simulation. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // Simulation of resource-based policies isn't supported for IAM roles. - ResourcePolicy *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulatePrincipalPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulatePrincipalPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SimulatePrincipalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SimulatePrincipalPolicyInput"} - if s.ActionNames == nil { - invalidParams.Add(request.NewErrParamRequired("ActionNames")) - } - if s.CallerArn != nil && len(*s.CallerArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CallerArn", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.PolicySourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicySourceArn")) - } - if s.PolicySourceArn != nil && len(*s.PolicySourceArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicySourceArn", 20)) - } - if s.ResourceHandlingOption != nil && len(*s.ResourceHandlingOption) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceHandlingOption", 1)) - } - if s.ResourceOwner != nil && len(*s.ResourceOwner) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceOwner", 1)) - } - if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) - } - if s.ContextEntries != nil { - for i, v := range s.ContextEntries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContextEntries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionNames sets the ActionNames field's value. -func (s *SimulatePrincipalPolicyInput) SetActionNames(v []*string) *SimulatePrincipalPolicyInput { - s.ActionNames = v - return s -} - -// SetCallerArn sets the CallerArn field's value. -func (s *SimulatePrincipalPolicyInput) SetCallerArn(v string) *SimulatePrincipalPolicyInput { - s.CallerArn = &v - return s -} - -// SetContextEntries sets the ContextEntries field's value. -func (s *SimulatePrincipalPolicyInput) SetContextEntries(v []*ContextEntry) *SimulatePrincipalPolicyInput { - s.ContextEntries = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *SimulatePrincipalPolicyInput) SetMarker(v string) *SimulatePrincipalPolicyInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *SimulatePrincipalPolicyInput) SetMaxItems(v int64) *SimulatePrincipalPolicyInput { - s.MaxItems = &v - return s -} - -// SetPermissionsBoundaryPolicyInputList sets the PermissionsBoundaryPolicyInputList field's value. -func (s *SimulatePrincipalPolicyInput) SetPermissionsBoundaryPolicyInputList(v []*string) *SimulatePrincipalPolicyInput { - s.PermissionsBoundaryPolicyInputList = v - return s -} - -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *SimulatePrincipalPolicyInput) SetPolicyInputList(v []*string) *SimulatePrincipalPolicyInput { - s.PolicyInputList = v - return s -} - -// SetPolicySourceArn sets the PolicySourceArn field's value. -func (s *SimulatePrincipalPolicyInput) SetPolicySourceArn(v string) *SimulatePrincipalPolicyInput { - s.PolicySourceArn = &v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceArns(v []*string) *SimulatePrincipalPolicyInput { - s.ResourceArns = v - return s -} - -// SetResourceHandlingOption sets the ResourceHandlingOption field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceHandlingOption(v string) *SimulatePrincipalPolicyInput { - s.ResourceHandlingOption = &v - return s -} - -// SetResourceOwner sets the ResourceOwner field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceOwner(v string) *SimulatePrincipalPolicyInput { - s.ResourceOwner = &v - return s -} - -// SetResourcePolicy sets the ResourcePolicy field's value. -func (s *SimulatePrincipalPolicyInput) SetResourcePolicy(v string) *SimulatePrincipalPolicyInput { - s.ResourcePolicy = &v - return s -} - -// Contains a reference to a Statement element in a policy document that determines -// the result of the simulation. -// -// This data type is used by the MatchedStatements member of the EvaluationResult -// type. -type Statement struct { - _ struct{} `type:"structure"` - - // The row and column of the end of a Statement in an IAM policy. - EndPosition *Position `type:"structure"` - - // The identifier of the policy that was provided as an input. - SourcePolicyId *string `type:"string"` - - // The type of the policy. - SourcePolicyType *string `type:"string" enum:"PolicySourceType"` - - // The row and column of the beginning of the Statement in an IAM policy. - StartPosition *Position `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Statement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Statement) GoString() string { - return s.String() -} - -// SetEndPosition sets the EndPosition field's value. -func (s *Statement) SetEndPosition(v *Position) *Statement { - s.EndPosition = v - return s -} - -// SetSourcePolicyId sets the SourcePolicyId field's value. -func (s *Statement) SetSourcePolicyId(v string) *Statement { - s.SourcePolicyId = &v - return s -} - -// SetSourcePolicyType sets the SourcePolicyType field's value. -func (s *Statement) SetSourcePolicyType(v string) *Statement { - s.SourcePolicyType = &v - return s -} - -// SetStartPosition sets the StartPosition field's value. -func (s *Statement) SetStartPosition(v *Position) *Statement { - s.StartPosition = v - return s -} - -// A structure that represents user-provided metadata that can be associated -// with an IAM resource. For more information about tagging, see Tagging IAM -// resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -type Tag struct { - _ struct{} `type:"structure"` - - // The key name that can be used to look up or retrieve the associated value. - // For example, Department or Cost Center are common choices. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value associated with this tag. For example, tags with a key name of - // Department could have values such as Human Resources, Accounting, and Support. - // Tags with a key name of Cost Center might have values that consist of the - // number associated with the different cost centers in your company. Typically, - // many resources have tags with the same key name but with different values. - // - // Amazon Web Services always interprets the tag Value as a single string. If - // you need to store an array, you can store comma-separated values in the string. - // However, you must interpret the value in your code. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM instance profile to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM instance profile. Each - // tag consists of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *TagInstanceProfileInput) SetInstanceProfileName(v string) *TagInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagInstanceProfileInput) SetTags(v []*Tag) *TagInstanceProfileInput { - s.Tags = v - return s -} - -type TagInstanceProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagInstanceProfileOutput) GoString() string { - return s.String() -} - -type TagMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the IAM virtual MFA device to which you want to - // add tags. For virtual MFA devices, the serial number is the same as the ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM virtual MFA device. Each - // tag consists of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *TagMFADeviceInput) SetSerialNumber(v string) *TagMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagMFADeviceInput) SetTags(v []*Tag) *TagMFADeviceInput { - s.Tags = v - return s -} - -type TagMFADeviceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagMFADeviceOutput) GoString() string { - return s.String() -} - -type TagOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The ARN of the OIDC identity provider in IAM to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` - - // The list of tags that you want to attach to the OIDC identity provider in - // IAM. Each tag consists of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagOpenIDConnectProviderInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *TagOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *TagOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagOpenIDConnectProviderInput) SetTags(v []*Tag) *TagOpenIDConnectProviderInput { - s.Tags = v - return s -} - -type TagOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type TagPolicyInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM customer managed policy to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM customer managed policy. - // Each tag consists of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *TagPolicyInput) SetPolicyArn(v string) *TagPolicyInput { - s.PolicyArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagPolicyInput) SetTags(v []*Tag) *TagPolicyInput { - s.Tags = v - return s -} - -type TagPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagPolicyOutput) GoString() string { - return s.String() -} - -type TagRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM role to which you want to add tags. - // - // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consist of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM role. Each tag consists - // of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *TagRoleInput) SetRoleName(v string) *TagRoleInput { - s.RoleName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagRoleInput) SetTags(v []*Tag) *TagRoleInput { - s.Tags = v - return s -} - -type TagRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagRoleOutput) GoString() string { - return s.String() -} - -type TagSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The ARN of the SAML identity provider in IAM to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" type:"string" required:"true"` - - // The list of tags that you want to attach to the SAML identity provider in - // IAM. Each tag consists of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagSAMLProviderInput"} - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *TagSAMLProviderInput) SetSAMLProviderArn(v string) *TagSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagSAMLProviderInput) SetTags(v []*Tag) *TagSAMLProviderInput { - s.Tags = v - return s -} - -type TagSAMLProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagSAMLProviderOutput) GoString() string { - return s.String() -} - -type TagServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM server certificate to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM server certificate. Each - // tag consists of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagServerCertificateInput"} - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *TagServerCertificateInput) SetServerCertificateName(v string) *TagServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagServerCertificateInput) SetTags(v []*Tag) *TagServerCertificateInput { - s.Tags = v - return s -} - -type TagServerCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagServerCertificateOutput) GoString() string { - return s.String() -} - -type TagUserInput struct { - _ struct{} `type:"structure"` - - // The list of tags that you want to attach to the IAM user. Each tag consists - // of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` - - // The name of the IAM user to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagUserInput"} - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTags sets the Tags field's value. -func (s *TagUserInput) SetTags(v []*Tag) *TagUserInput { - s.Tags = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *TagUserInput) SetUserName(v string) *TagUserInput { - s.UserName = &v - return s -} - -type TagUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagUserOutput) GoString() string { - return s.String() -} - -// Contains details about the most recent attempt to access an action within -// the service. -// -// This data type is used as a response element in the GetServiceLastAccessedDetails -// operation. -type TrackedActionLastAccessed struct { - _ struct{} `type:"structure"` - - // The name of the tracked action to which access was attempted. Tracked actions - // are actions that report activity to IAM. - ActionName *string `type:"string"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - LastAccessedEntity *string `min:"20" type:"string"` - - // The Region from which the authenticated entity (user or role) last attempted - // to access the tracked action. Amazon Web Services does not report unauthenticated - // requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAccessedRegion *string `type:"string"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when an authenticated entity most recently attempted to access the tracked - // service. Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAccessedTime *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TrackedActionLastAccessed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TrackedActionLastAccessed) GoString() string { - return s.String() -} - -// SetActionName sets the ActionName field's value. -func (s *TrackedActionLastAccessed) SetActionName(v string) *TrackedActionLastAccessed { - s.ActionName = &v - return s -} - -// SetLastAccessedEntity sets the LastAccessedEntity field's value. -func (s *TrackedActionLastAccessed) SetLastAccessedEntity(v string) *TrackedActionLastAccessed { - s.LastAccessedEntity = &v - return s -} - -// SetLastAccessedRegion sets the LastAccessedRegion field's value. -func (s *TrackedActionLastAccessed) SetLastAccessedRegion(v string) *TrackedActionLastAccessed { - s.LastAccessedRegion = &v - return s -} - -// SetLastAccessedTime sets the LastAccessedTime field's value. -func (s *TrackedActionLastAccessed) SetLastAccessedTime(v time.Time) *TrackedActionLastAccessed { - s.LastAccessedTime = &v - return s -} - -type UntagInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM instance profile from which you want to remove tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified instance profile. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *UntagInstanceProfileInput) SetInstanceProfileName(v string) *UntagInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagInstanceProfileInput) SetTagKeys(v []*string) *UntagInstanceProfileInput { - s.TagKeys = v - return s -} - -type UntagInstanceProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagInstanceProfileOutput) GoString() string { - return s.String() -} - -type UntagMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the IAM virtual MFA device from which you want - // to remove tags. For virtual MFA devices, the serial number is the same as - // the ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified instance profile. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *UntagMFADeviceInput) SetSerialNumber(v string) *UntagMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagMFADeviceInput) SetTagKeys(v []*string) *UntagMFADeviceInput { - s.TagKeys = v - return s -} - -type UntagMFADeviceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagMFADeviceOutput) GoString() string { - return s.String() -} - -type UntagOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The ARN of the OIDC provider in IAM from which you want to remove tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified OIDC provider. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagOpenIDConnectProviderInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *UntagOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *UntagOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagOpenIDConnectProviderInput) SetTagKeys(v []*string) *UntagOpenIDConnectProviderInput { - s.TagKeys = v - return s -} - -type UntagOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type UntagPolicyInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM customer managed policy from which you want to remove - // tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified policy. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *UntagPolicyInput) SetPolicyArn(v string) *UntagPolicyInput { - s.PolicyArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagPolicyInput) SetTagKeys(v []*string) *UntagPolicyInput { - s.TagKeys = v - return s -} - -type UntagPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagPolicyOutput) GoString() string { - return s.String() -} - -type UntagRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM role from which you want to remove tags. - // - // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consist of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified role. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *UntagRoleInput) SetRoleName(v string) *UntagRoleInput { - s.RoleName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagRoleInput) SetTagKeys(v []*string) *UntagRoleInput { - s.TagKeys = v - return s -} - -type UntagRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagRoleOutput) GoString() string { - return s.String() -} - -type UntagSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The ARN of the SAML identity provider in IAM from which you want to remove - // tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified SAML identity provider. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagSAMLProviderInput"} - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *UntagSAMLProviderInput) SetSAMLProviderArn(v string) *UntagSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagSAMLProviderInput) SetTagKeys(v []*string) *UntagSAMLProviderInput { - s.TagKeys = v - return s -} - -type UntagSAMLProviderOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagSAMLProviderOutput) GoString() string { - return s.String() -} - -type UntagServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM server certificate from which you want to remove tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified IAM server certificate. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagServerCertificateInput"} - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *UntagServerCertificateInput) SetServerCertificateName(v string) *UntagServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagServerCertificateInput) SetTagKeys(v []*string) *UntagServerCertificateInput { - s.TagKeys = v - return s -} - -type UntagServerCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagServerCertificateOutput) GoString() string { - return s.String() -} - -type UntagUserInput struct { - _ struct{} `type:"structure"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified user. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` - - // The name of the IAM user from which you want to remove tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagUserInput"} - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagUserInput) SetTagKeys(v []*string) *UntagUserInput { - s.TagKeys = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UntagUserInput) SetUserName(v string) *UntagUserInput { - s.UserName = &v - return s -} - -type UntagUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagUserOutput) GoString() string { - return s.String() -} - -type UpdateAccessKeyInput struct { - _ struct{} `type:"structure"` - - // The access key ID of the secret access key you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // AccessKeyId is a required field - AccessKeyId *string `min:"16" type:"string" required:"true"` - - // The status you want to assign to the secret access key. Active means that - // the key can be used for programmatic calls to Amazon Web Services, while - // Inactive means that the key cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the user whose key you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccessKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccessKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAccessKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAccessKeyInput"} - if s.AccessKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) - } - if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { - invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *UpdateAccessKeyInput) SetAccessKeyId(v string) *UpdateAccessKeyInput { - s.AccessKeyId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateAccessKeyInput) SetStatus(v string) *UpdateAccessKeyInput { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateAccessKeyInput) SetUserName(v string) *UpdateAccessKeyInput { - s.UserName = &v - return s -} - -type UpdateAccessKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccessKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccessKeyOutput) GoString() string { - return s.String() -} - -type UpdateAccountPasswordPolicyInput struct { - _ struct{} `type:"structure"` - - // Allows all IAM users in your account to use the Amazon Web Services Management - // Console to change their own passwords. For more information, see Permitting - // IAM users to change their own passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_enable-user-change.html) - // in the IAM User Guide. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that IAM users in the account do - // not automatically have permissions to change their own password. - AllowUsersToChangePassword *bool `type:"boolean"` - - // Prevents IAM users who are accessing the account via the Amazon Web Services - // Management Console from setting a new console password after their password - // has expired. The IAM user cannot access the console until an administrator - // resets the password. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that IAM users can change their - // passwords after they expire and continue to sign in as the user. - // - // In the Amazon Web Services Management Console, the custom password policy - // option Allow users to change their own password gives IAM users permissions - // to iam:ChangePassword for only their user and to the iam:GetAccountPasswordPolicy - // action. This option does not attach a permissions policy to each user, rather - // the permissions are applied at the account-level for all users by IAM. IAM - // users with iam:ChangePassword permission and active access keys can reset - // their own expired console password using the CLI or API. - HardExpiry *bool `type:"boolean"` - - // The number of days that an IAM user password is valid. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of 0. The result is that IAM user passwords never expire. - MaxPasswordAge *int64 `min:"1" type:"integer"` - - // The minimum number of characters allowed in an IAM user password. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of 6. - MinimumPasswordLength *int64 `min:"6" type:"integer"` - - // Specifies the number of previous passwords that IAM users are prevented from - // reusing. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of 0. The result is that IAM users are not prevented from - // reusing previous passwords. - PasswordReusePrevention *int64 `min:"1" type:"integer"` - - // Specifies whether IAM user passwords must contain at least one lowercase - // character from the ISO basic Latin alphabet (a to z). - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that passwords do not require at - // least one lowercase character. - RequireLowercaseCharacters *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one numeric character - // (0 to 9). - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that passwords do not require at - // least one numeric character. - RequireNumbers *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one of the following - // non-alphanumeric characters: - // - // ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that passwords do not require at - // least one symbol character. - RequireSymbols *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one uppercase - // character from the ISO basic Latin alphabet (A to Z). - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that passwords do not require at - // least one uppercase character. - RequireUppercaseCharacters *bool `type:"boolean"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccountPasswordPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccountPasswordPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAccountPasswordPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAccountPasswordPolicyInput"} - if s.MaxPasswordAge != nil && *s.MaxPasswordAge < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxPasswordAge", 1)) - } - if s.MinimumPasswordLength != nil && *s.MinimumPasswordLength < 6 { - invalidParams.Add(request.NewErrParamMinValue("MinimumPasswordLength", 6)) - } - if s.PasswordReusePrevention != nil && *s.PasswordReusePrevention < 1 { - invalidParams.Add(request.NewErrParamMinValue("PasswordReusePrevention", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowUsersToChangePassword sets the AllowUsersToChangePassword field's value. -func (s *UpdateAccountPasswordPolicyInput) SetAllowUsersToChangePassword(v bool) *UpdateAccountPasswordPolicyInput { - s.AllowUsersToChangePassword = &v - return s -} - -// SetHardExpiry sets the HardExpiry field's value. -func (s *UpdateAccountPasswordPolicyInput) SetHardExpiry(v bool) *UpdateAccountPasswordPolicyInput { - s.HardExpiry = &v - return s -} - -// SetMaxPasswordAge sets the MaxPasswordAge field's value. -func (s *UpdateAccountPasswordPolicyInput) SetMaxPasswordAge(v int64) *UpdateAccountPasswordPolicyInput { - s.MaxPasswordAge = &v - return s -} - -// SetMinimumPasswordLength sets the MinimumPasswordLength field's value. -func (s *UpdateAccountPasswordPolicyInput) SetMinimumPasswordLength(v int64) *UpdateAccountPasswordPolicyInput { - s.MinimumPasswordLength = &v - return s -} - -// SetPasswordReusePrevention sets the PasswordReusePrevention field's value. -func (s *UpdateAccountPasswordPolicyInput) SetPasswordReusePrevention(v int64) *UpdateAccountPasswordPolicyInput { - s.PasswordReusePrevention = &v - return s -} - -// SetRequireLowercaseCharacters sets the RequireLowercaseCharacters field's value. -func (s *UpdateAccountPasswordPolicyInput) SetRequireLowercaseCharacters(v bool) *UpdateAccountPasswordPolicyInput { - s.RequireLowercaseCharacters = &v - return s -} - -// SetRequireNumbers sets the RequireNumbers field's value. -func (s *UpdateAccountPasswordPolicyInput) SetRequireNumbers(v bool) *UpdateAccountPasswordPolicyInput { - s.RequireNumbers = &v - return s -} - -// SetRequireSymbols sets the RequireSymbols field's value. -func (s *UpdateAccountPasswordPolicyInput) SetRequireSymbols(v bool) *UpdateAccountPasswordPolicyInput { - s.RequireSymbols = &v - return s -} - -// SetRequireUppercaseCharacters sets the RequireUppercaseCharacters field's value. -func (s *UpdateAccountPasswordPolicyInput) SetRequireUppercaseCharacters(v bool) *UpdateAccountPasswordPolicyInput { - s.RequireUppercaseCharacters = &v - return s -} - -type UpdateAccountPasswordPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccountPasswordPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccountPasswordPolicyOutput) GoString() string { - return s.String() -} - -type UpdateAssumeRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The policy that grants an entity permission to assume the role. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the role to update with the new policy. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAssumeRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAssumeRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAssumeRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAssumeRolePolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *UpdateAssumeRolePolicyInput) SetPolicyDocument(v string) *UpdateAssumeRolePolicyInput { - s.PolicyDocument = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *UpdateAssumeRolePolicyInput) SetRoleName(v string) *UpdateAssumeRolePolicyInput { - s.RoleName = &v - return s -} - -type UpdateAssumeRolePolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAssumeRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAssumeRolePolicyOutput) GoString() string { - return s.String() -} - -type UpdateGroupInput struct { - _ struct{} `type:"structure"` - - // Name of the IAM group to update. If you're changing the name of the group, - // this is the original name. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // New name for the IAM group. Only include this if changing the group's name. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - NewGroupName *string `min:"1" type:"string"` - - // New path for the IAM group. Only include this if changing the group's path. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - NewPath *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.NewGroupName != nil && len(*s.NewGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewGroupName", 1)) - } - if s.NewPath != nil && len(*s.NewPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *UpdateGroupInput) SetGroupName(v string) *UpdateGroupInput { - s.GroupName = &v - return s -} - -// SetNewGroupName sets the NewGroupName field's value. -func (s *UpdateGroupInput) SetNewGroupName(v string) *UpdateGroupInput { - s.NewGroupName = &v - return s -} - -// SetNewPath sets the NewPath field's value. -func (s *UpdateGroupInput) SetNewPath(v string) *UpdateGroupInput { - s.NewPath = &v - return s -} - -type UpdateGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateGroupOutput) GoString() string { - return s.String() -} - -type UpdateLoginProfileInput struct { - _ struct{} `type:"structure"` - - // The new password for the specified IAM user. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // However, the format can be further restricted by the account administrator - // by setting a password policy on the Amazon Web Services account. For more - // information, see UpdateAccountPasswordPolicy. - // - // Password is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UpdateLoginProfileInput's - // String and GoString methods. - Password *string `min:"1" type:"string" sensitive:"true"` - - // Allows this new password to be used only once by requiring the specified - // IAM user to set a new password on next sign-in. - PasswordResetRequired *bool `type:"boolean"` - - // The name of the user whose password you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateLoginProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateLoginProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateLoginProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateLoginProfileInput"} - if s.Password != nil && len(*s.Password) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Password", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPassword sets the Password field's value. -func (s *UpdateLoginProfileInput) SetPassword(v string) *UpdateLoginProfileInput { - s.Password = &v - return s -} - -// SetPasswordResetRequired sets the PasswordResetRequired field's value. -func (s *UpdateLoginProfileInput) SetPasswordResetRequired(v bool) *UpdateLoginProfileInput { - s.PasswordResetRequired = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateLoginProfileInput) SetUserName(v string) *UpdateLoginProfileInput { - s.UserName = &v - return s -} - -type UpdateLoginProfileOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateLoginProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateLoginProfileOutput) GoString() string { - return s.String() -} - -type UpdateOpenIDConnectProviderThumbprintInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM OIDC provider resource object for - // which you want to update the thumbprint. You can get a list of OIDC provider - // ARNs by using the ListOpenIDConnectProviders operation. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` - - // A list of certificate thumbprints that are associated with the specified - // IAM OpenID Connect provider. For more information, see CreateOpenIDConnectProvider. - // - // ThumbprintList is a required field - ThumbprintList []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOpenIDConnectProviderThumbprintInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOpenIDConnectProviderThumbprintInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateOpenIDConnectProviderThumbprintInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateOpenIDConnectProviderThumbprintInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - if s.ThumbprintList == nil { - invalidParams.Add(request.NewErrParamRequired("ThumbprintList")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *UpdateOpenIDConnectProviderThumbprintInput) SetOpenIDConnectProviderArn(v string) *UpdateOpenIDConnectProviderThumbprintInput { - s.OpenIDConnectProviderArn = &v - return s -} - -// SetThumbprintList sets the ThumbprintList field's value. -func (s *UpdateOpenIDConnectProviderThumbprintInput) SetThumbprintList(v []*string) *UpdateOpenIDConnectProviderThumbprintInput { - s.ThumbprintList = v - return s -} - -type UpdateOpenIDConnectProviderThumbprintOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOpenIDConnectProviderThumbprintOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOpenIDConnectProviderThumbprintOutput) GoString() string { - return s.String() -} - -type UpdateRoleDescriptionInput struct { - _ struct{} `type:"structure"` - - // The new description that you want to apply to the specified role. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The name of the role that you want to modify. - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleDescriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleDescriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRoleDescriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRoleDescriptionInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateRoleDescriptionInput) SetDescription(v string) *UpdateRoleDescriptionInput { - s.Description = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *UpdateRoleDescriptionInput) SetRoleName(v string) *UpdateRoleDescriptionInput { - s.RoleName = &v - return s -} - -type UpdateRoleDescriptionOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the modified role. - Role *Role `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleDescriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleDescriptionOutput) GoString() string { - return s.String() -} - -// SetRole sets the Role field's value. -func (s *UpdateRoleDescriptionOutput) SetRole(v *Role) *UpdateRoleDescriptionOutput { - s.Role = v - return s -} - -type UpdateRoleInput struct { - _ struct{} `type:"structure"` - - // The new description that you want to apply to the specified role. - Description *string `type:"string"` - - // The maximum session duration (in seconds) that you want to set for the specified - // role. If you do not specify a value for this setting, the default value of - // one hour is applied. This setting can have a value from 1 hour to 12 hours. - // - // Anyone who assumes the role from the CLI or API can use the DurationSeconds - // API parameter or the duration-seconds CLI parameter to request a longer session. - // The MaxSessionDuration setting determines the maximum duration that can be - // requested using the DurationSeconds parameter. If users don't specify a value - // for the DurationSeconds parameter, their security credentials are valid for - // one hour by default. This applies when you use the AssumeRole* API operations - // or the assume-role* CLI operations but does not apply when you use those - // operations to create a console URL. For more information, see Using IAM roles - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) in the - // IAM User Guide. - MaxSessionDuration *int64 `min:"3600" type:"integer"` - - // The name of the role that you want to modify. - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRoleInput"} - if s.MaxSessionDuration != nil && *s.MaxSessionDuration < 3600 { - invalidParams.Add(request.NewErrParamMinValue("MaxSessionDuration", 3600)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateRoleInput) SetDescription(v string) *UpdateRoleInput { - s.Description = &v - return s -} - -// SetMaxSessionDuration sets the MaxSessionDuration field's value. -func (s *UpdateRoleInput) SetMaxSessionDuration(v int64) *UpdateRoleInput { - s.MaxSessionDuration = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *UpdateRoleInput) SetRoleName(v string) *UpdateRoleInput { - s.RoleName = &v - return s -} - -type UpdateRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleOutput) GoString() string { - return s.String() -} - -type UpdateSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // An XML document generated by an identity provider (IdP) that supports SAML - // 2.0. The document includes the issuer's name, expiration information, and - // keys that can be used to validate the SAML authentication response (assertions) - // that are received from the IdP. You must generate the metadata document using - // the identity management software that is used as your organization's IdP. - // - // SAMLMetadataDocument is a required field - SAMLMetadataDocument *string `min:"1000" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the SAML provider to update. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSAMLProviderInput"} - if s.SAMLMetadataDocument == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLMetadataDocument")) - } - if s.SAMLMetadataDocument != nil && len(*s.SAMLMetadataDocument) < 1000 { - invalidParams.Add(request.NewErrParamMinLen("SAMLMetadataDocument", 1000)) - } - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLMetadataDocument sets the SAMLMetadataDocument field's value. -func (s *UpdateSAMLProviderInput) SetSAMLMetadataDocument(v string) *UpdateSAMLProviderInput { - s.SAMLMetadataDocument = &v - return s -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *UpdateSAMLProviderInput) SetSAMLProviderArn(v string) *UpdateSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -// Contains the response to a successful UpdateSAMLProvider request. -type UpdateSAMLProviderOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SAML provider that was updated. - SAMLProviderArn *string `min:"20" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSAMLProviderOutput) GoString() string { - return s.String() -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *UpdateSAMLProviderOutput) SetSAMLProviderArn(v string) *UpdateSAMLProviderOutput { - s.SAMLProviderArn = &v - return s -} - -type UpdateSSHPublicKeyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The status to assign to the SSH public key. Active means that the key can - // be used for authentication with an CodeCommit repository. Inactive means - // that the key cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user associated with the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSSHPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSSHPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSSHPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSSHPublicKeyInput"} - if s.SSHPublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) - } - if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *UpdateSSHPublicKeyInput) SetSSHPublicKeyId(v string) *UpdateSSHPublicKeyInput { - s.SSHPublicKeyId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateSSHPublicKeyInput) SetStatus(v string) *UpdateSSHPublicKeyInput { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateSSHPublicKeyInput) SetUserName(v string) *UpdateSSHPublicKeyInput { - s.UserName = &v - return s -} - -type UpdateSSHPublicKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSSHPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSSHPublicKeyOutput) GoString() string { - return s.String() -} - -type UpdateServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The new path for the server certificate. Include this only if you are updating - // the server certificate's path. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - NewPath *string `min:"1" type:"string"` - - // The new name for the server certificate. Include this only if you are updating - // the server certificate's name. The name of the certificate cannot contain - // any spaces. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - NewServerCertificateName *string `min:"1" type:"string"` - - // The name of the server certificate that you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServerCertificateInput"} - if s.NewPath != nil && len(*s.NewPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) - } - if s.NewServerCertificateName != nil && len(*s.NewServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewServerCertificateName", 1)) - } - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewPath sets the NewPath field's value. -func (s *UpdateServerCertificateInput) SetNewPath(v string) *UpdateServerCertificateInput { - s.NewPath = &v - return s -} - -// SetNewServerCertificateName sets the NewServerCertificateName field's value. -func (s *UpdateServerCertificateInput) SetNewServerCertificateName(v string) *UpdateServerCertificateInput { - s.NewServerCertificateName = &v - return s -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *UpdateServerCertificateInput) SetServerCertificateName(v string) *UpdateServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -type UpdateServerCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServerCertificateOutput) GoString() string { - return s.String() -} - -type UpdateServiceSpecificCredentialInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the service-specific credential. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The status to be assigned to the service-specific credential. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user associated with the service-specific credential. - // If you do not specify this value, then the operation assumes the user whose - // credentials are used to call the operation. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServiceSpecificCredentialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServiceSpecificCredentialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServiceSpecificCredentialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServiceSpecificCredentialInput"} - if s.ServiceSpecificCredentialId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceSpecificCredentialId")) - } - if s.ServiceSpecificCredentialId != nil && len(*s.ServiceSpecificCredentialId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ServiceSpecificCredentialId", 20)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *UpdateServiceSpecificCredentialInput) SetServiceSpecificCredentialId(v string) *UpdateServiceSpecificCredentialInput { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateServiceSpecificCredentialInput) SetStatus(v string) *UpdateServiceSpecificCredentialInput { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateServiceSpecificCredentialInput) SetUserName(v string) *UpdateServiceSpecificCredentialInput { - s.UserName = &v - return s -} - -type UpdateServiceSpecificCredentialOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServiceSpecificCredentialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServiceSpecificCredentialOutput) GoString() string { - return s.String() -} - -type UpdateSigningCertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the signing certificate you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // CertificateId is a required field - CertificateId *string `min:"24" type:"string" required:"true"` - - // The status you want to assign to the certificate. Active means that the certificate - // can be used for programmatic calls to Amazon Web Services Inactive means - // that the certificate cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user the signing certificate belongs to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSigningCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSigningCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSigningCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSigningCertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 24 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 24)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *UpdateSigningCertificateInput) SetCertificateId(v string) *UpdateSigningCertificateInput { - s.CertificateId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateSigningCertificateInput) SetStatus(v string) *UpdateSigningCertificateInput { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateSigningCertificateInput) SetUserName(v string) *UpdateSigningCertificateInput { - s.UserName = &v - return s -} - -type UpdateSigningCertificateOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSigningCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSigningCertificateOutput) GoString() string { - return s.String() -} - -type UpdateUserInput struct { - _ struct{} `type:"structure"` - - // New path for the IAM user. Include this parameter only if you're changing - // the user's path. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - NewPath *string `min:"1" type:"string"` - - // New name for the user. Include this parameter only if you're changing the - // user's name. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - NewUserName *string `min:"1" type:"string"` - - // Name of the user to update. If you're changing the name of the user, this - // is the original user name. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"} - if s.NewPath != nil && len(*s.NewPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) - } - if s.NewUserName != nil && len(*s.NewUserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewUserName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewPath sets the NewPath field's value. -func (s *UpdateUserInput) SetNewPath(v string) *UpdateUserInput { - s.NewPath = &v - return s -} - -// SetNewUserName sets the NewUserName field's value. -func (s *UpdateUserInput) SetNewUserName(v string) *UpdateUserInput { - s.NewUserName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateUserInput) SetUserName(v string) *UpdateUserInput { - s.UserName = &v - return s -} - -type UpdateUserOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateUserOutput) GoString() string { - return s.String() -} - -type UploadSSHPublicKeyInput struct { - _ struct{} `type:"structure"` - - // The SSH public key. The public key must be encoded in ssh-rsa format or PEM - // format. The minimum bit-length of the public key is 2048 bits. For example, - // you can generate a 2048-bit key, and the resulting PEM file is 1679 bytes - // long. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // SSHPublicKeyBody is a required field - SSHPublicKeyBody *string `min:"1" type:"string" required:"true"` - - // The name of the IAM user to associate the SSH public key with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSSHPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSSHPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadSSHPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadSSHPublicKeyInput"} - if s.SSHPublicKeyBody == nil { - invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyBody")) - } - if s.SSHPublicKeyBody != nil && len(*s.SSHPublicKeyBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyBody", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSSHPublicKeyBody sets the SSHPublicKeyBody field's value. -func (s *UploadSSHPublicKeyInput) SetSSHPublicKeyBody(v string) *UploadSSHPublicKeyInput { - s.SSHPublicKeyBody = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UploadSSHPublicKeyInput) SetUserName(v string) *UploadSSHPublicKeyInput { - s.UserName = &v - return s -} - -// Contains the response to a successful UploadSSHPublicKey request. -type UploadSSHPublicKeyOutput struct { - _ struct{} `type:"structure"` - - // Contains information about the SSH public key. - SSHPublicKey *SSHPublicKey `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSSHPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSSHPublicKeyOutput) GoString() string { - return s.String() -} - -// SetSSHPublicKey sets the SSHPublicKey field's value. -func (s *UploadSSHPublicKeyOutput) SetSSHPublicKey(v *SSHPublicKey) *UploadSSHPublicKeyOutput { - s.SSHPublicKey = v - return s -} - -type UploadServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The contents of the public key certificate in PEM-encoded format. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // CertificateBody is a required field - CertificateBody *string `min:"1" type:"string" required:"true"` - - // The contents of the certificate chain. This is typically a concatenation - // of the PEM-encoded public key certificates of the chain. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - CertificateChain *string `min:"1" type:"string"` - - // The path for the server certificate. For more information about paths, see - // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - // - // If you are uploading a server certificate specifically for use with Amazon - // CloudFront distributions, you must specify a path using the path parameter. - // The path must begin with /cloudfront and must include a trailing slash (for - // example, /cloudfront/test/). - Path *string `min:"1" type:"string"` - - // The contents of the private key in PEM-encoded format. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PrivateKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UploadServerCertificateInput's - // String and GoString methods. - // - // PrivateKey is a required field - PrivateKey *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The name for the server certificate. Do not include the path in this value. - // The name of the certificate cannot contain any spaces. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` - - // A list of tags that you want to attach to the new IAM server certificate - // resource. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadServerCertificateInput"} - if s.CertificateBody == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateBody")) - } - if s.CertificateBody != nil && len(*s.CertificateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificateBody", 1)) - } - if s.CertificateChain != nil && len(*s.CertificateChain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificateChain", 1)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.PrivateKey == nil { - invalidParams.Add(request.NewErrParamRequired("PrivateKey")) - } - if s.PrivateKey != nil && len(*s.PrivateKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PrivateKey", 1)) - } - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *UploadServerCertificateInput) SetCertificateBody(v string) *UploadServerCertificateInput { - s.CertificateBody = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *UploadServerCertificateInput) SetCertificateChain(v string) *UploadServerCertificateInput { - s.CertificateChain = &v - return s -} - -// SetPath sets the Path field's value. -func (s *UploadServerCertificateInput) SetPath(v string) *UploadServerCertificateInput { - s.Path = &v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *UploadServerCertificateInput) SetPrivateKey(v string) *UploadServerCertificateInput { - s.PrivateKey = &v - return s -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *UploadServerCertificateInput) SetServerCertificateName(v string) *UploadServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *UploadServerCertificateInput) SetTags(v []*Tag) *UploadServerCertificateInput { - s.Tags = v - return s -} - -// Contains the response to a successful UploadServerCertificate request. -type UploadServerCertificateOutput struct { - _ struct{} `type:"structure"` - - // The meta information of the uploaded server certificate without its certificate - // body, certificate chain, and private key. - ServerCertificateMetadata *ServerCertificateMetadata `type:"structure"` - - // A list of tags that are attached to the new IAM server certificate. The returned - // list of tags is sorted by tag key. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadServerCertificateOutput) GoString() string { - return s.String() -} - -// SetServerCertificateMetadata sets the ServerCertificateMetadata field's value. -func (s *UploadServerCertificateOutput) SetServerCertificateMetadata(v *ServerCertificateMetadata) *UploadServerCertificateOutput { - s.ServerCertificateMetadata = v - return s -} - -// SetTags sets the Tags field's value. -func (s *UploadServerCertificateOutput) SetTags(v []*Tag) *UploadServerCertificateOutput { - s.Tags = v - return s -} - -type UploadSigningCertificateInput struct { - _ struct{} `type:"structure"` - - // The contents of the signing certificate. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // CertificateBody is a required field - CertificateBody *string `min:"1" type:"string" required:"true"` - - // The name of the user the signing certificate is for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSigningCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSigningCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadSigningCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadSigningCertificateInput"} - if s.CertificateBody == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateBody")) - } - if s.CertificateBody != nil && len(*s.CertificateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificateBody", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *UploadSigningCertificateInput) SetCertificateBody(v string) *UploadSigningCertificateInput { - s.CertificateBody = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UploadSigningCertificateInput) SetUserName(v string) *UploadSigningCertificateInput { - s.UserName = &v - return s -} - -// Contains the response to a successful UploadSigningCertificate request. -type UploadSigningCertificateOutput struct { - _ struct{} `type:"structure"` - - // Information about the certificate. - // - // Certificate is a required field - Certificate *SigningCertificate `type:"structure" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSigningCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSigningCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *UploadSigningCertificateOutput) SetCertificate(v *SigningCertificate) *UploadSigningCertificateOutput { - s.Certificate = v - return s -} - -// Contains information about an IAM user entity. -// -// This data type is used as a response element in the following operations: -// -// - CreateUser -// -// - GetUser -// -// - ListUsers -type User struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the user. For more information - // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the user was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the user's password was last used to sign in to an Amazon Web Services - // website. For a list of Amazon Web Services websites that capture a user's - // last sign-in time, see the Credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) - // topic in the IAM User Guide. If a password is used more than once in a five-minute - // span, only the first use is returned in this field. If the field is null - // (no value), then it indicates that they never signed in with a password. - // This can be because: - // - // * The user never had a password. - // - // * A password exists but has not been used since IAM started tracking this - // information on October 20, 2014. - // - // A null value does not mean that the user never had a password. Also, if the - // user does not currently have a password but had one in the past, then this - // field contains the date and time the most recent password was used. - // - // This value is returned only in the GetUser and ListUsers operations. - PasswordLastUsed *time.Time `type:"timestamp"` - - // The path to the user. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // The ARN of the policy used to set the permissions boundary for the user. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` - - // A list of tags that are associated with the user. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // UserId is a required field - UserId *string `min:"16" type:"string" required:"true"` - - // The friendly name identifying the user. - // - // UserName is a required field - UserName *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s User) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s User) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *User) SetArn(v string) *User { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *User) SetCreateDate(v time.Time) *User { - s.CreateDate = &v - return s -} - -// SetPasswordLastUsed sets the PasswordLastUsed field's value. -func (s *User) SetPasswordLastUsed(v time.Time) *User { - s.PasswordLastUsed = &v - return s -} - -// SetPath sets the Path field's value. -func (s *User) SetPath(v string) *User { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *User) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *User { - s.PermissionsBoundary = v - return s -} - -// SetTags sets the Tags field's value. -func (s *User) SetTags(v []*Tag) *User { - s.Tags = v - return s -} - -// SetUserId sets the UserId field's value. -func (s *User) SetUserId(v string) *User { - s.UserId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *User) SetUserName(v string) *User { - s.UserName = &v - return s -} - -// Contains information about an IAM user, including all the user's policies -// and all the IAM groups the user is in. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -type UserDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // A list of the managed policies attached to the user. - AttachedManagedPolicies []*AttachedPolicy `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the user was created. - CreateDate *time.Time `type:"timestamp"` - - // A list of IAM groups that the user is in. - GroupList []*string `type:"list"` - - // The path to the user. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The ARN of the policy used to set the permissions boundary for the user. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` - - // A list of tags that are associated with the user. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - UserId *string `min:"16" type:"string"` - - // The friendly name identifying the user. - UserName *string `min:"1" type:"string"` - - // A list of the inline policies embedded in the user. - UserPolicyList []*PolicyDetail `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UserDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UserDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *UserDetail) SetArn(v string) *UserDetail { - s.Arn = &v - return s -} - -// SetAttachedManagedPolicies sets the AttachedManagedPolicies field's value. -func (s *UserDetail) SetAttachedManagedPolicies(v []*AttachedPolicy) *UserDetail { - s.AttachedManagedPolicies = v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *UserDetail) SetCreateDate(v time.Time) *UserDetail { - s.CreateDate = &v - return s -} - -// SetGroupList sets the GroupList field's value. -func (s *UserDetail) SetGroupList(v []*string) *UserDetail { - s.GroupList = v - return s -} - -// SetPath sets the Path field's value. -func (s *UserDetail) SetPath(v string) *UserDetail { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *UserDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *UserDetail { - s.PermissionsBoundary = v - return s -} - -// SetTags sets the Tags field's value. -func (s *UserDetail) SetTags(v []*Tag) *UserDetail { - s.Tags = v - return s -} - -// SetUserId sets the UserId field's value. -func (s *UserDetail) SetUserId(v string) *UserDetail { - s.UserId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UserDetail) SetUserName(v string) *UserDetail { - s.UserName = &v - return s -} - -// SetUserPolicyList sets the UserPolicyList field's value. -func (s *UserDetail) SetUserPolicyList(v []*PolicyDetail) *UserDetail { - s.UserPolicyList = v - return s -} - -// Contains information about a virtual MFA device. -type VirtualMFADevice struct { - _ struct{} `type:"structure"` - - // The base32 seed defined as specified in RFC3548 (https://tools.ietf.org/html/rfc3548.txt). - // The Base32StringSeed is base32-encoded. - // - // Base32StringSeed is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by VirtualMFADevice's - // String and GoString methods. - // - // Base32StringSeed is automatically base64 encoded/decoded by the SDK. - Base32StringSeed []byte `type:"blob" sensitive:"true"` - - // The date and time on which the virtual MFA device was enabled. - EnableDate *time.Time `type:"timestamp"` - - // A QR code PNG image that encodes otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String - // where $virtualMFADeviceName is one of the create call arguments. AccountName - // is the user name if set (otherwise, the account ID otherwise), and Base32String - // is the seed in base32 format. The Base32String value is base64-encoded. - // - // QRCodePNG is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by VirtualMFADevice's - // String and GoString methods. - // - // QRCodePNG is automatically base64 encoded/decoded by the SDK. - QRCodePNG []byte `type:"blob" sensitive:"true"` - - // The serial number associated with VirtualMFADevice. - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // A list of tags that are attached to the virtual MFA device. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The IAM user associated with this virtual MFA device. - User *User `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s VirtualMFADevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s VirtualMFADevice) GoString() string { - return s.String() -} - -// SetBase32StringSeed sets the Base32StringSeed field's value. -func (s *VirtualMFADevice) SetBase32StringSeed(v []byte) *VirtualMFADevice { - s.Base32StringSeed = v - return s -} - -// SetEnableDate sets the EnableDate field's value. -func (s *VirtualMFADevice) SetEnableDate(v time.Time) *VirtualMFADevice { - s.EnableDate = &v - return s -} - -// SetQRCodePNG sets the QRCodePNG field's value. -func (s *VirtualMFADevice) SetQRCodePNG(v []byte) *VirtualMFADevice { - s.QRCodePNG = v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *VirtualMFADevice) SetSerialNumber(v string) *VirtualMFADevice { - s.SerialNumber = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *VirtualMFADevice) SetTags(v []*Tag) *VirtualMFADevice { - s.Tags = v - return s -} - -// SetUser sets the User field's value. -func (s *VirtualMFADevice) SetUser(v *User) *VirtualMFADevice { - s.User = v - return s -} - -const ( - // AccessAdvisorUsageGranularityTypeServiceLevel is a AccessAdvisorUsageGranularityType enum value - AccessAdvisorUsageGranularityTypeServiceLevel = "SERVICE_LEVEL" - - // AccessAdvisorUsageGranularityTypeActionLevel is a AccessAdvisorUsageGranularityType enum value - AccessAdvisorUsageGranularityTypeActionLevel = "ACTION_LEVEL" -) - -// AccessAdvisorUsageGranularityType_Values returns all elements of the AccessAdvisorUsageGranularityType enum -func AccessAdvisorUsageGranularityType_Values() []string { - return []string{ - AccessAdvisorUsageGranularityTypeServiceLevel, - AccessAdvisorUsageGranularityTypeActionLevel, - } -} - -const ( - // AssignmentStatusTypeAssigned is a AssignmentStatusType enum value - AssignmentStatusTypeAssigned = "Assigned" - - // AssignmentStatusTypeUnassigned is a AssignmentStatusType enum value - AssignmentStatusTypeUnassigned = "Unassigned" - - // AssignmentStatusTypeAny is a AssignmentStatusType enum value - AssignmentStatusTypeAny = "Any" -) - -// AssignmentStatusType_Values returns all elements of the AssignmentStatusType enum -func AssignmentStatusType_Values() []string { - return []string{ - AssignmentStatusTypeAssigned, - AssignmentStatusTypeUnassigned, - AssignmentStatusTypeAny, - } -} - -const ( - // ContextKeyTypeEnumString is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumString = "string" - - // ContextKeyTypeEnumStringList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumStringList = "stringList" - - // ContextKeyTypeEnumNumeric is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumNumeric = "numeric" - - // ContextKeyTypeEnumNumericList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumNumericList = "numericList" - - // ContextKeyTypeEnumBoolean is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumBoolean = "boolean" - - // ContextKeyTypeEnumBooleanList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumBooleanList = "booleanList" - - // ContextKeyTypeEnumIp is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumIp = "ip" - - // ContextKeyTypeEnumIpList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumIpList = "ipList" - - // ContextKeyTypeEnumBinary is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumBinary = "binary" - - // ContextKeyTypeEnumBinaryList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumBinaryList = "binaryList" - - // ContextKeyTypeEnumDate is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumDate = "date" - - // ContextKeyTypeEnumDateList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumDateList = "dateList" -) - -// ContextKeyTypeEnum_Values returns all elements of the ContextKeyTypeEnum enum -func ContextKeyTypeEnum_Values() []string { - return []string{ - ContextKeyTypeEnumString, - ContextKeyTypeEnumStringList, - ContextKeyTypeEnumNumeric, - ContextKeyTypeEnumNumericList, - ContextKeyTypeEnumBoolean, - ContextKeyTypeEnumBooleanList, - ContextKeyTypeEnumIp, - ContextKeyTypeEnumIpList, - ContextKeyTypeEnumBinary, - ContextKeyTypeEnumBinaryList, - ContextKeyTypeEnumDate, - ContextKeyTypeEnumDateList, - } -} - -const ( - // DeletionTaskStatusTypeSucceeded is a DeletionTaskStatusType enum value - DeletionTaskStatusTypeSucceeded = "SUCCEEDED" - - // DeletionTaskStatusTypeInProgress is a DeletionTaskStatusType enum value - DeletionTaskStatusTypeInProgress = "IN_PROGRESS" - - // DeletionTaskStatusTypeFailed is a DeletionTaskStatusType enum value - DeletionTaskStatusTypeFailed = "FAILED" - - // DeletionTaskStatusTypeNotStarted is a DeletionTaskStatusType enum value - DeletionTaskStatusTypeNotStarted = "NOT_STARTED" -) - -// DeletionTaskStatusType_Values returns all elements of the DeletionTaskStatusType enum -func DeletionTaskStatusType_Values() []string { - return []string{ - DeletionTaskStatusTypeSucceeded, - DeletionTaskStatusTypeInProgress, - DeletionTaskStatusTypeFailed, - DeletionTaskStatusTypeNotStarted, - } -} - -const ( - // EncodingTypeSsh is a EncodingType enum value - EncodingTypeSsh = "SSH" - - // EncodingTypePem is a EncodingType enum value - EncodingTypePem = "PEM" -) - -// EncodingType_Values returns all elements of the EncodingType enum -func EncodingType_Values() []string { - return []string{ - EncodingTypeSsh, - EncodingTypePem, - } -} - -const ( - // EntityTypeUser is a EntityType enum value - EntityTypeUser = "User" - - // EntityTypeRole is a EntityType enum value - EntityTypeRole = "Role" - - // EntityTypeGroup is a EntityType enum value - EntityTypeGroup = "Group" - - // EntityTypeLocalManagedPolicy is a EntityType enum value - EntityTypeLocalManagedPolicy = "LocalManagedPolicy" - - // EntityTypeAwsmanagedPolicy is a EntityType enum value - EntityTypeAwsmanagedPolicy = "AWSManagedPolicy" -) - -// EntityType_Values returns all elements of the EntityType enum -func EntityType_Values() []string { - return []string{ - EntityTypeUser, - EntityTypeRole, - EntityTypeGroup, - EntityTypeLocalManagedPolicy, - EntityTypeAwsmanagedPolicy, - } -} - -const ( - // GlobalEndpointTokenVersionV1token is a GlobalEndpointTokenVersion enum value - GlobalEndpointTokenVersionV1token = "v1Token" - - // GlobalEndpointTokenVersionV2token is a GlobalEndpointTokenVersion enum value - GlobalEndpointTokenVersionV2token = "v2Token" -) - -// GlobalEndpointTokenVersion_Values returns all elements of the GlobalEndpointTokenVersion enum -func GlobalEndpointTokenVersion_Values() []string { - return []string{ - GlobalEndpointTokenVersionV1token, - GlobalEndpointTokenVersionV2token, - } -} - -const ( - // JobStatusTypeInProgress is a JobStatusType enum value - JobStatusTypeInProgress = "IN_PROGRESS" - - // JobStatusTypeCompleted is a JobStatusType enum value - JobStatusTypeCompleted = "COMPLETED" - - // JobStatusTypeFailed is a JobStatusType enum value - JobStatusTypeFailed = "FAILED" -) - -// JobStatusType_Values returns all elements of the JobStatusType enum -func JobStatusType_Values() []string { - return []string{ - JobStatusTypeInProgress, - JobStatusTypeCompleted, - JobStatusTypeFailed, - } -} - -const ( - // PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy is a PermissionsBoundaryAttachmentType enum value - PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy = "PermissionsBoundaryPolicy" -) - -// PermissionsBoundaryAttachmentType_Values returns all elements of the PermissionsBoundaryAttachmentType enum -func PermissionsBoundaryAttachmentType_Values() []string { - return []string{ - PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy, - } -} - -const ( - // PolicyEvaluationDecisionTypeAllowed is a PolicyEvaluationDecisionType enum value - PolicyEvaluationDecisionTypeAllowed = "allowed" - - // PolicyEvaluationDecisionTypeExplicitDeny is a PolicyEvaluationDecisionType enum value - PolicyEvaluationDecisionTypeExplicitDeny = "explicitDeny" - - // PolicyEvaluationDecisionTypeImplicitDeny is a PolicyEvaluationDecisionType enum value - PolicyEvaluationDecisionTypeImplicitDeny = "implicitDeny" -) - -// PolicyEvaluationDecisionType_Values returns all elements of the PolicyEvaluationDecisionType enum -func PolicyEvaluationDecisionType_Values() []string { - return []string{ - PolicyEvaluationDecisionTypeAllowed, - PolicyEvaluationDecisionTypeExplicitDeny, - PolicyEvaluationDecisionTypeImplicitDeny, - } -} - -const ( - // PolicyOwnerEntityTypeUser is a PolicyOwnerEntityType enum value - PolicyOwnerEntityTypeUser = "USER" - - // PolicyOwnerEntityTypeRole is a PolicyOwnerEntityType enum value - PolicyOwnerEntityTypeRole = "ROLE" - - // PolicyOwnerEntityTypeGroup is a PolicyOwnerEntityType enum value - PolicyOwnerEntityTypeGroup = "GROUP" -) - -// PolicyOwnerEntityType_Values returns all elements of the PolicyOwnerEntityType enum -func PolicyOwnerEntityType_Values() []string { - return []string{ - PolicyOwnerEntityTypeUser, - PolicyOwnerEntityTypeRole, - PolicyOwnerEntityTypeGroup, - } -} - -const ( - // PolicyScopeTypeAll is a PolicyScopeType enum value - PolicyScopeTypeAll = "All" - - // PolicyScopeTypeAws is a PolicyScopeType enum value - PolicyScopeTypeAws = "AWS" - - // PolicyScopeTypeLocal is a PolicyScopeType enum value - PolicyScopeTypeLocal = "Local" -) - -// PolicyScopeType_Values returns all elements of the PolicyScopeType enum -func PolicyScopeType_Values() []string { - return []string{ - PolicyScopeTypeAll, - PolicyScopeTypeAws, - PolicyScopeTypeLocal, - } -} - -const ( - // PolicySourceTypeUser is a PolicySourceType enum value - PolicySourceTypeUser = "user" - - // PolicySourceTypeGroup is a PolicySourceType enum value - PolicySourceTypeGroup = "group" - - // PolicySourceTypeRole is a PolicySourceType enum value - PolicySourceTypeRole = "role" - - // PolicySourceTypeAwsManaged is a PolicySourceType enum value - PolicySourceTypeAwsManaged = "aws-managed" - - // PolicySourceTypeUserManaged is a PolicySourceType enum value - PolicySourceTypeUserManaged = "user-managed" - - // PolicySourceTypeResource is a PolicySourceType enum value - PolicySourceTypeResource = "resource" - - // PolicySourceTypeNone is a PolicySourceType enum value - PolicySourceTypeNone = "none" -) - -// PolicySourceType_Values returns all elements of the PolicySourceType enum -func PolicySourceType_Values() []string { - return []string{ - PolicySourceTypeUser, - PolicySourceTypeGroup, - PolicySourceTypeRole, - PolicySourceTypeAwsManaged, - PolicySourceTypeUserManaged, - PolicySourceTypeResource, - PolicySourceTypeNone, - } -} - -const ( - // PolicyTypeInline is a PolicyType enum value - PolicyTypeInline = "INLINE" - - // PolicyTypeManaged is a PolicyType enum value - PolicyTypeManaged = "MANAGED" -) - -// PolicyType_Values returns all elements of the PolicyType enum -func PolicyType_Values() []string { - return []string{ - PolicyTypeInline, - PolicyTypeManaged, - } -} - -// The policy usage type that indicates whether the policy is used as a permissions -// policy or as the permissions boundary for an entity. -// -// For more information about permissions boundaries, see Permissions boundaries -// for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) -// in the IAM User Guide. -const ( - // PolicyUsageTypePermissionsPolicy is a PolicyUsageType enum value - PolicyUsageTypePermissionsPolicy = "PermissionsPolicy" - - // PolicyUsageTypePermissionsBoundary is a PolicyUsageType enum value - PolicyUsageTypePermissionsBoundary = "PermissionsBoundary" -) - -// PolicyUsageType_Values returns all elements of the PolicyUsageType enum -func PolicyUsageType_Values() []string { - return []string{ - PolicyUsageTypePermissionsPolicy, - PolicyUsageTypePermissionsBoundary, - } -} - -const ( - // ReportFormatTypeTextCsv is a ReportFormatType enum value - ReportFormatTypeTextCsv = "text/csv" -) - -// ReportFormatType_Values returns all elements of the ReportFormatType enum -func ReportFormatType_Values() []string { - return []string{ - ReportFormatTypeTextCsv, - } -} - -const ( - // ReportStateTypeStarted is a ReportStateType enum value - ReportStateTypeStarted = "STARTED" - - // ReportStateTypeInprogress is a ReportStateType enum value - ReportStateTypeInprogress = "INPROGRESS" - - // ReportStateTypeComplete is a ReportStateType enum value - ReportStateTypeComplete = "COMPLETE" -) - -// ReportStateType_Values returns all elements of the ReportStateType enum -func ReportStateType_Values() []string { - return []string{ - ReportStateTypeStarted, - ReportStateTypeInprogress, - ReportStateTypeComplete, - } -} - -const ( - // SortKeyTypeServiceNamespaceAscending is a SortKeyType enum value - SortKeyTypeServiceNamespaceAscending = "SERVICE_NAMESPACE_ASCENDING" - - // SortKeyTypeServiceNamespaceDescending is a SortKeyType enum value - SortKeyTypeServiceNamespaceDescending = "SERVICE_NAMESPACE_DESCENDING" - - // SortKeyTypeLastAuthenticatedTimeAscending is a SortKeyType enum value - SortKeyTypeLastAuthenticatedTimeAscending = "LAST_AUTHENTICATED_TIME_ASCENDING" - - // SortKeyTypeLastAuthenticatedTimeDescending is a SortKeyType enum value - SortKeyTypeLastAuthenticatedTimeDescending = "LAST_AUTHENTICATED_TIME_DESCENDING" -) - -// SortKeyType_Values returns all elements of the SortKeyType enum -func SortKeyType_Values() []string { - return []string{ - SortKeyTypeServiceNamespaceAscending, - SortKeyTypeServiceNamespaceDescending, - SortKeyTypeLastAuthenticatedTimeAscending, - SortKeyTypeLastAuthenticatedTimeDescending, - } -} - -const ( - // StatusTypeActive is a StatusType enum value - StatusTypeActive = "Active" - - // StatusTypeInactive is a StatusType enum value - StatusTypeInactive = "Inactive" -) - -// StatusType_Values returns all elements of the StatusType enum -func StatusType_Values() []string { - return []string{ - StatusTypeActive, - StatusTypeInactive, - } -} - -const ( - // SummaryKeyTypeUsers is a SummaryKeyType enum value - SummaryKeyTypeUsers = "Users" - - // SummaryKeyTypeUsersQuota is a SummaryKeyType enum value - SummaryKeyTypeUsersQuota = "UsersQuota" - - // SummaryKeyTypeGroups is a SummaryKeyType enum value - SummaryKeyTypeGroups = "Groups" - - // SummaryKeyTypeGroupsQuota is a SummaryKeyType enum value - SummaryKeyTypeGroupsQuota = "GroupsQuota" - - // SummaryKeyTypeServerCertificates is a SummaryKeyType enum value - SummaryKeyTypeServerCertificates = "ServerCertificates" - - // SummaryKeyTypeServerCertificatesQuota is a SummaryKeyType enum value - SummaryKeyTypeServerCertificatesQuota = "ServerCertificatesQuota" - - // SummaryKeyTypeUserPolicySizeQuota is a SummaryKeyType enum value - SummaryKeyTypeUserPolicySizeQuota = "UserPolicySizeQuota" - - // SummaryKeyTypeGroupPolicySizeQuota is a SummaryKeyType enum value - SummaryKeyTypeGroupPolicySizeQuota = "GroupPolicySizeQuota" - - // SummaryKeyTypeGroupsPerUserQuota is a SummaryKeyType enum value - SummaryKeyTypeGroupsPerUserQuota = "GroupsPerUserQuota" - - // SummaryKeyTypeSigningCertificatesPerUserQuota is a SummaryKeyType enum value - SummaryKeyTypeSigningCertificatesPerUserQuota = "SigningCertificatesPerUserQuota" - - // SummaryKeyTypeAccessKeysPerUserQuota is a SummaryKeyType enum value - SummaryKeyTypeAccessKeysPerUserQuota = "AccessKeysPerUserQuota" - - // SummaryKeyTypeMfadevices is a SummaryKeyType enum value - SummaryKeyTypeMfadevices = "MFADevices" - - // SummaryKeyTypeMfadevicesInUse is a SummaryKeyType enum value - SummaryKeyTypeMfadevicesInUse = "MFADevicesInUse" - - // SummaryKeyTypeAccountMfaenabled is a SummaryKeyType enum value - SummaryKeyTypeAccountMfaenabled = "AccountMFAEnabled" - - // SummaryKeyTypeAccountAccessKeysPresent is a SummaryKeyType enum value - SummaryKeyTypeAccountAccessKeysPresent = "AccountAccessKeysPresent" - - // SummaryKeyTypeAccountSigningCertificatesPresent is a SummaryKeyType enum value - SummaryKeyTypeAccountSigningCertificatesPresent = "AccountSigningCertificatesPresent" - - // SummaryKeyTypeAttachedPoliciesPerGroupQuota is a SummaryKeyType enum value - SummaryKeyTypeAttachedPoliciesPerGroupQuota = "AttachedPoliciesPerGroupQuota" - - // SummaryKeyTypeAttachedPoliciesPerRoleQuota is a SummaryKeyType enum value - SummaryKeyTypeAttachedPoliciesPerRoleQuota = "AttachedPoliciesPerRoleQuota" - - // SummaryKeyTypeAttachedPoliciesPerUserQuota is a SummaryKeyType enum value - SummaryKeyTypeAttachedPoliciesPerUserQuota = "AttachedPoliciesPerUserQuota" - - // SummaryKeyTypePolicies is a SummaryKeyType enum value - SummaryKeyTypePolicies = "Policies" - - // SummaryKeyTypePoliciesQuota is a SummaryKeyType enum value - SummaryKeyTypePoliciesQuota = "PoliciesQuota" - - // SummaryKeyTypePolicySizeQuota is a SummaryKeyType enum value - SummaryKeyTypePolicySizeQuota = "PolicySizeQuota" - - // SummaryKeyTypePolicyVersionsInUse is a SummaryKeyType enum value - SummaryKeyTypePolicyVersionsInUse = "PolicyVersionsInUse" - - // SummaryKeyTypePolicyVersionsInUseQuota is a SummaryKeyType enum value - SummaryKeyTypePolicyVersionsInUseQuota = "PolicyVersionsInUseQuota" - - // SummaryKeyTypeVersionsPerPolicyQuota is a SummaryKeyType enum value - SummaryKeyTypeVersionsPerPolicyQuota = "VersionsPerPolicyQuota" - - // SummaryKeyTypeGlobalEndpointTokenVersion is a SummaryKeyType enum value - SummaryKeyTypeGlobalEndpointTokenVersion = "GlobalEndpointTokenVersion" -) - -// SummaryKeyType_Values returns all elements of the SummaryKeyType enum -func SummaryKeyType_Values() []string { - return []string{ - SummaryKeyTypeUsers, - SummaryKeyTypeUsersQuota, - SummaryKeyTypeGroups, - SummaryKeyTypeGroupsQuota, - SummaryKeyTypeServerCertificates, - SummaryKeyTypeServerCertificatesQuota, - SummaryKeyTypeUserPolicySizeQuota, - SummaryKeyTypeGroupPolicySizeQuota, - SummaryKeyTypeGroupsPerUserQuota, - SummaryKeyTypeSigningCertificatesPerUserQuota, - SummaryKeyTypeAccessKeysPerUserQuota, - SummaryKeyTypeMfadevices, - SummaryKeyTypeMfadevicesInUse, - SummaryKeyTypeAccountMfaenabled, - SummaryKeyTypeAccountAccessKeysPresent, - SummaryKeyTypeAccountSigningCertificatesPresent, - SummaryKeyTypeAttachedPoliciesPerGroupQuota, - SummaryKeyTypeAttachedPoliciesPerRoleQuota, - SummaryKeyTypeAttachedPoliciesPerUserQuota, - SummaryKeyTypePolicies, - SummaryKeyTypePoliciesQuota, - SummaryKeyTypePolicySizeQuota, - SummaryKeyTypePolicyVersionsInUse, - SummaryKeyTypePolicyVersionsInUseQuota, - SummaryKeyTypeVersionsPerPolicyQuota, - SummaryKeyTypeGlobalEndpointTokenVersion, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go deleted file mode 100644 index e87adfc6b1660..0000000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package iam provides the client and types for making API -// requests to AWS Identity and Access Management. -// -// Identity and Access Management (IAM) is a web service for securely controlling -// access to Amazon Web Services services. With IAM, you can centrally manage -// users, security credentials such as access keys, and permissions that control -// which Amazon Web Services resources users and applications can access. For -// more information about IAM, see Identity and Access Management (IAM) (http://aws.amazon.com/iam/) -// and the Identity and Access Management User Guide (https://docs.aws.amazon.com/IAM/latest/UserGuide/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08 for more information on this service. -// -// See iam package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/iam/ -// -// # Using the Client -// -// To contact AWS Identity and Access Management with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Identity and Access Management client IAM for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/iam/#New -package iam diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go b/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go deleted file mode 100644 index de6dfec0225ce..0000000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iam - -const ( - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModification". - // - // The request was rejected because multiple requests to change this object - // were submitted simultaneously. Wait a few minutes and submit your request - // again. - ErrCodeConcurrentModificationException = "ConcurrentModification" - - // ErrCodeCredentialReportExpiredException for service response error code - // "ReportExpired". - // - // The request was rejected because the most recent credential report has expired. - // To generate a new credential report, use GenerateCredentialReport. For more - // information about credential report expiration, see Getting credential reports - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) - // in the IAM User Guide. - ErrCodeCredentialReportExpiredException = "ReportExpired" - - // ErrCodeCredentialReportNotPresentException for service response error code - // "ReportNotPresent". - // - // The request was rejected because the credential report does not exist. To - // generate a credential report, use GenerateCredentialReport. - ErrCodeCredentialReportNotPresentException = "ReportNotPresent" - - // ErrCodeCredentialReportNotReadyException for service response error code - // "ReportInProgress". - // - // The request was rejected because the credential report is still being generated. - ErrCodeCredentialReportNotReadyException = "ReportInProgress" - - // ErrCodeDeleteConflictException for service response error code - // "DeleteConflict". - // - // The request was rejected because it attempted to delete a resource that has - // attached subordinate entities. The error message describes these entities. - ErrCodeDeleteConflictException = "DeleteConflict" - - // ErrCodeDuplicateCertificateException for service response error code - // "DuplicateCertificate". - // - // The request was rejected because the same certificate is associated with - // an IAM user in the account. - ErrCodeDuplicateCertificateException = "DuplicateCertificate" - - // ErrCodeDuplicateSSHPublicKeyException for service response error code - // "DuplicateSSHPublicKey". - // - // The request was rejected because the SSH public key is already associated - // with the specified IAM user. - ErrCodeDuplicateSSHPublicKeyException = "DuplicateSSHPublicKey" - - // ErrCodeEntityAlreadyExistsException for service response error code - // "EntityAlreadyExists". - // - // The request was rejected because it attempted to create a resource that already - // exists. - ErrCodeEntityAlreadyExistsException = "EntityAlreadyExists" - - // ErrCodeEntityTemporarilyUnmodifiableException for service response error code - // "EntityTemporarilyUnmodifiable". - // - // The request was rejected because it referenced an entity that is temporarily - // unmodifiable, such as a user name that was deleted and then recreated. The - // error indicates that the request is likely to succeed if you try again after - // waiting several minutes. The error message describes the entity. - ErrCodeEntityTemporarilyUnmodifiableException = "EntityTemporarilyUnmodifiable" - - // ErrCodeInvalidAuthenticationCodeException for service response error code - // "InvalidAuthenticationCode". - // - // The request was rejected because the authentication code was not recognized. - // The error message describes the specific error. - ErrCodeInvalidAuthenticationCodeException = "InvalidAuthenticationCode" - - // ErrCodeInvalidCertificateException for service response error code - // "InvalidCertificate". - // - // The request was rejected because the certificate is invalid. - ErrCodeInvalidCertificateException = "InvalidCertificate" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInput". - // - // The request was rejected because an invalid or out-of-range value was supplied - // for an input parameter. - ErrCodeInvalidInputException = "InvalidInput" - - // ErrCodeInvalidPublicKeyException for service response error code - // "InvalidPublicKey". - // - // The request was rejected because the public key is malformed or otherwise - // invalid. - ErrCodeInvalidPublicKeyException = "InvalidPublicKey" - - // ErrCodeInvalidUserTypeException for service response error code - // "InvalidUserType". - // - // The request was rejected because the type of user for the transaction was - // incorrect. - ErrCodeInvalidUserTypeException = "InvalidUserType" - - // ErrCodeKeyPairMismatchException for service response error code - // "KeyPairMismatch". - // - // The request was rejected because the public key certificate and the private - // key do not match. - ErrCodeKeyPairMismatchException = "KeyPairMismatch" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceeded". - // - // The request was rejected because it attempted to create resources beyond - // the current Amazon Web Services account limits. The error message describes - // the limit exceeded. - ErrCodeLimitExceededException = "LimitExceeded" - - // ErrCodeMalformedCertificateException for service response error code - // "MalformedCertificate". - // - // The request was rejected because the certificate was malformed or expired. - // The error message describes the specific error. - ErrCodeMalformedCertificateException = "MalformedCertificate" - - // ErrCodeMalformedPolicyDocumentException for service response error code - // "MalformedPolicyDocument". - // - // The request was rejected because the policy document was malformed. The error - // message describes the specific error. - ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocument" - - // ErrCodeNoSuchEntityException for service response error code - // "NoSuchEntity". - // - // The request was rejected because it referenced a resource entity that does - // not exist. The error message describes the resource. - ErrCodeNoSuchEntityException = "NoSuchEntity" - - // ErrCodePasswordPolicyViolationException for service response error code - // "PasswordPolicyViolation". - // - // The request was rejected because the provided password did not meet the requirements - // imposed by the account password policy. - ErrCodePasswordPolicyViolationException = "PasswordPolicyViolation" - - // ErrCodePolicyEvaluationException for service response error code - // "PolicyEvaluation". - // - // The request failed because a provided policy could not be successfully evaluated. - // An additional detailed message indicates the source of the failure. - ErrCodePolicyEvaluationException = "PolicyEvaluation" - - // ErrCodePolicyNotAttachableException for service response error code - // "PolicyNotAttachable". - // - // The request failed because Amazon Web Services service role policies can - // only be attached to the service-linked role for that service. - ErrCodePolicyNotAttachableException = "PolicyNotAttachable" - - // ErrCodeReportGenerationLimitExceededException for service response error code - // "ReportGenerationLimitExceeded". - // - // The request failed because the maximum number of concurrent requests for - // this account are already running. - ErrCodeReportGenerationLimitExceededException = "ReportGenerationLimitExceeded" - - // ErrCodeServiceFailureException for service response error code - // "ServiceFailure". - // - // The request processing has failed because of an unknown error, exception - // or failure. - ErrCodeServiceFailureException = "ServiceFailure" - - // ErrCodeServiceNotSupportedException for service response error code - // "NotSupportedService". - // - // The specified service does not support service-specific credentials. - ErrCodeServiceNotSupportedException = "NotSupportedService" - - // ErrCodeUnmodifiableEntityException for service response error code - // "UnmodifiableEntity". - // - // The request was rejected because service-linked roles are protected Amazon - // Web Services resources. Only the service that depends on the service-linked - // role can modify or delete the role on your behalf. The error message includes - // the name of the service that depends on this service-linked role. You must - // request the change through that service. - ErrCodeUnmodifiableEntityException = "UnmodifiableEntity" - - // ErrCodeUnrecognizedPublicKeyEncodingException for service response error code - // "UnrecognizedPublicKeyEncoding". - // - // The request was rejected because the public key encoding format is unsupported - // or unrecognized. - ErrCodeUnrecognizedPublicKeyEncodingException = "UnrecognizedPublicKeyEncoding" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/iamiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/iam/iamiface/interface.go deleted file mode 100644 index 4d8e8ec02f49e..0000000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/iamiface/interface.go +++ /dev/null @@ -1,814 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package iamiface provides an interface to enable mocking the AWS Identity and Access Management service client -// for testing your code. -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. -package iamiface - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/iam" -) - -// IAMAPI provides an interface to enable mocking the -// iam.IAM service client's API operation, -// paginators, and waiters. This make unit testing your code that calls out -// to the SDK's service client's calls easier. -// -// The best way to use this interface is so the SDK's service client's calls -// can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the SDK's request pipeline. -// -// // myFunc uses an SDK service client to make a request to -// // AWS Identity and Access Management. -// func myFunc(svc iamiface.IAMAPI) bool { -// // Make svc.AddClientIDToOpenIDConnectProvider request -// } -// -// func main() { -// sess := session.New() -// svc := iam.New(sess) -// -// myFunc(svc) -// } -// -// In your _test.go file: -// -// // Define a mock struct to be used in your unit tests of myFunc. -// type mockIAMClient struct { -// iamiface.IAMAPI -// } -// func (m *mockIAMClient) AddClientIDToOpenIDConnectProvider(input *iam.AddClientIDToOpenIDConnectProviderInput) (*iam.AddClientIDToOpenIDConnectProviderOutput, error) { -// // mock response/functionality -// } -// -// func TestMyFunc(t *testing.T) { -// // Setup Test -// mockSvc := &mockIAMClient{} -// -// myfunc(mockSvc) -// -// // Verify myFunc's functionality -// } -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. Its suggested to use the pattern above for testing, or using -// tooling to generate mocks to satisfy the interfaces. -type IAMAPI interface { - AddClientIDToOpenIDConnectProvider(*iam.AddClientIDToOpenIDConnectProviderInput) (*iam.AddClientIDToOpenIDConnectProviderOutput, error) - AddClientIDToOpenIDConnectProviderWithContext(aws.Context, *iam.AddClientIDToOpenIDConnectProviderInput, ...request.Option) (*iam.AddClientIDToOpenIDConnectProviderOutput, error) - AddClientIDToOpenIDConnectProviderRequest(*iam.AddClientIDToOpenIDConnectProviderInput) (*request.Request, *iam.AddClientIDToOpenIDConnectProviderOutput) - - AddRoleToInstanceProfile(*iam.AddRoleToInstanceProfileInput) (*iam.AddRoleToInstanceProfileOutput, error) - AddRoleToInstanceProfileWithContext(aws.Context, *iam.AddRoleToInstanceProfileInput, ...request.Option) (*iam.AddRoleToInstanceProfileOutput, error) - AddRoleToInstanceProfileRequest(*iam.AddRoleToInstanceProfileInput) (*request.Request, *iam.AddRoleToInstanceProfileOutput) - - AddUserToGroup(*iam.AddUserToGroupInput) (*iam.AddUserToGroupOutput, error) - AddUserToGroupWithContext(aws.Context, *iam.AddUserToGroupInput, ...request.Option) (*iam.AddUserToGroupOutput, error) - AddUserToGroupRequest(*iam.AddUserToGroupInput) (*request.Request, *iam.AddUserToGroupOutput) - - AttachGroupPolicy(*iam.AttachGroupPolicyInput) (*iam.AttachGroupPolicyOutput, error) - AttachGroupPolicyWithContext(aws.Context, *iam.AttachGroupPolicyInput, ...request.Option) (*iam.AttachGroupPolicyOutput, error) - AttachGroupPolicyRequest(*iam.AttachGroupPolicyInput) (*request.Request, *iam.AttachGroupPolicyOutput) - - AttachRolePolicy(*iam.AttachRolePolicyInput) (*iam.AttachRolePolicyOutput, error) - AttachRolePolicyWithContext(aws.Context, *iam.AttachRolePolicyInput, ...request.Option) (*iam.AttachRolePolicyOutput, error) - AttachRolePolicyRequest(*iam.AttachRolePolicyInput) (*request.Request, *iam.AttachRolePolicyOutput) - - AttachUserPolicy(*iam.AttachUserPolicyInput) (*iam.AttachUserPolicyOutput, error) - AttachUserPolicyWithContext(aws.Context, *iam.AttachUserPolicyInput, ...request.Option) (*iam.AttachUserPolicyOutput, error) - AttachUserPolicyRequest(*iam.AttachUserPolicyInput) (*request.Request, *iam.AttachUserPolicyOutput) - - ChangePassword(*iam.ChangePasswordInput) (*iam.ChangePasswordOutput, error) - ChangePasswordWithContext(aws.Context, *iam.ChangePasswordInput, ...request.Option) (*iam.ChangePasswordOutput, error) - ChangePasswordRequest(*iam.ChangePasswordInput) (*request.Request, *iam.ChangePasswordOutput) - - CreateAccessKey(*iam.CreateAccessKeyInput) (*iam.CreateAccessKeyOutput, error) - CreateAccessKeyWithContext(aws.Context, *iam.CreateAccessKeyInput, ...request.Option) (*iam.CreateAccessKeyOutput, error) - CreateAccessKeyRequest(*iam.CreateAccessKeyInput) (*request.Request, *iam.CreateAccessKeyOutput) - - CreateAccountAlias(*iam.CreateAccountAliasInput) (*iam.CreateAccountAliasOutput, error) - CreateAccountAliasWithContext(aws.Context, *iam.CreateAccountAliasInput, ...request.Option) (*iam.CreateAccountAliasOutput, error) - CreateAccountAliasRequest(*iam.CreateAccountAliasInput) (*request.Request, *iam.CreateAccountAliasOutput) - - CreateGroup(*iam.CreateGroupInput) (*iam.CreateGroupOutput, error) - CreateGroupWithContext(aws.Context, *iam.CreateGroupInput, ...request.Option) (*iam.CreateGroupOutput, error) - CreateGroupRequest(*iam.CreateGroupInput) (*request.Request, *iam.CreateGroupOutput) - - CreateInstanceProfile(*iam.CreateInstanceProfileInput) (*iam.CreateInstanceProfileOutput, error) - CreateInstanceProfileWithContext(aws.Context, *iam.CreateInstanceProfileInput, ...request.Option) (*iam.CreateInstanceProfileOutput, error) - CreateInstanceProfileRequest(*iam.CreateInstanceProfileInput) (*request.Request, *iam.CreateInstanceProfileOutput) - - CreateLoginProfile(*iam.CreateLoginProfileInput) (*iam.CreateLoginProfileOutput, error) - CreateLoginProfileWithContext(aws.Context, *iam.CreateLoginProfileInput, ...request.Option) (*iam.CreateLoginProfileOutput, error) - CreateLoginProfileRequest(*iam.CreateLoginProfileInput) (*request.Request, *iam.CreateLoginProfileOutput) - - CreateOpenIDConnectProvider(*iam.CreateOpenIDConnectProviderInput) (*iam.CreateOpenIDConnectProviderOutput, error) - CreateOpenIDConnectProviderWithContext(aws.Context, *iam.CreateOpenIDConnectProviderInput, ...request.Option) (*iam.CreateOpenIDConnectProviderOutput, error) - CreateOpenIDConnectProviderRequest(*iam.CreateOpenIDConnectProviderInput) (*request.Request, *iam.CreateOpenIDConnectProviderOutput) - - CreatePolicy(*iam.CreatePolicyInput) (*iam.CreatePolicyOutput, error) - CreatePolicyWithContext(aws.Context, *iam.CreatePolicyInput, ...request.Option) (*iam.CreatePolicyOutput, error) - CreatePolicyRequest(*iam.CreatePolicyInput) (*request.Request, *iam.CreatePolicyOutput) - - CreatePolicyVersion(*iam.CreatePolicyVersionInput) (*iam.CreatePolicyVersionOutput, error) - CreatePolicyVersionWithContext(aws.Context, *iam.CreatePolicyVersionInput, ...request.Option) (*iam.CreatePolicyVersionOutput, error) - CreatePolicyVersionRequest(*iam.CreatePolicyVersionInput) (*request.Request, *iam.CreatePolicyVersionOutput) - - CreateRole(*iam.CreateRoleInput) (*iam.CreateRoleOutput, error) - CreateRoleWithContext(aws.Context, *iam.CreateRoleInput, ...request.Option) (*iam.CreateRoleOutput, error) - CreateRoleRequest(*iam.CreateRoleInput) (*request.Request, *iam.CreateRoleOutput) - - CreateSAMLProvider(*iam.CreateSAMLProviderInput) (*iam.CreateSAMLProviderOutput, error) - CreateSAMLProviderWithContext(aws.Context, *iam.CreateSAMLProviderInput, ...request.Option) (*iam.CreateSAMLProviderOutput, error) - CreateSAMLProviderRequest(*iam.CreateSAMLProviderInput) (*request.Request, *iam.CreateSAMLProviderOutput) - - CreateServiceLinkedRole(*iam.CreateServiceLinkedRoleInput) (*iam.CreateServiceLinkedRoleOutput, error) - CreateServiceLinkedRoleWithContext(aws.Context, *iam.CreateServiceLinkedRoleInput, ...request.Option) (*iam.CreateServiceLinkedRoleOutput, error) - CreateServiceLinkedRoleRequest(*iam.CreateServiceLinkedRoleInput) (*request.Request, *iam.CreateServiceLinkedRoleOutput) - - CreateServiceSpecificCredential(*iam.CreateServiceSpecificCredentialInput) (*iam.CreateServiceSpecificCredentialOutput, error) - CreateServiceSpecificCredentialWithContext(aws.Context, *iam.CreateServiceSpecificCredentialInput, ...request.Option) (*iam.CreateServiceSpecificCredentialOutput, error) - CreateServiceSpecificCredentialRequest(*iam.CreateServiceSpecificCredentialInput) (*request.Request, *iam.CreateServiceSpecificCredentialOutput) - - CreateUser(*iam.CreateUserInput) (*iam.CreateUserOutput, error) - CreateUserWithContext(aws.Context, *iam.CreateUserInput, ...request.Option) (*iam.CreateUserOutput, error) - CreateUserRequest(*iam.CreateUserInput) (*request.Request, *iam.CreateUserOutput) - - CreateVirtualMFADevice(*iam.CreateVirtualMFADeviceInput) (*iam.CreateVirtualMFADeviceOutput, error) - CreateVirtualMFADeviceWithContext(aws.Context, *iam.CreateVirtualMFADeviceInput, ...request.Option) (*iam.CreateVirtualMFADeviceOutput, error) - CreateVirtualMFADeviceRequest(*iam.CreateVirtualMFADeviceInput) (*request.Request, *iam.CreateVirtualMFADeviceOutput) - - DeactivateMFADevice(*iam.DeactivateMFADeviceInput) (*iam.DeactivateMFADeviceOutput, error) - DeactivateMFADeviceWithContext(aws.Context, *iam.DeactivateMFADeviceInput, ...request.Option) (*iam.DeactivateMFADeviceOutput, error) - DeactivateMFADeviceRequest(*iam.DeactivateMFADeviceInput) (*request.Request, *iam.DeactivateMFADeviceOutput) - - DeleteAccessKey(*iam.DeleteAccessKeyInput) (*iam.DeleteAccessKeyOutput, error) - DeleteAccessKeyWithContext(aws.Context, *iam.DeleteAccessKeyInput, ...request.Option) (*iam.DeleteAccessKeyOutput, error) - DeleteAccessKeyRequest(*iam.DeleteAccessKeyInput) (*request.Request, *iam.DeleteAccessKeyOutput) - - DeleteAccountAlias(*iam.DeleteAccountAliasInput) (*iam.DeleteAccountAliasOutput, error) - DeleteAccountAliasWithContext(aws.Context, *iam.DeleteAccountAliasInput, ...request.Option) (*iam.DeleteAccountAliasOutput, error) - DeleteAccountAliasRequest(*iam.DeleteAccountAliasInput) (*request.Request, *iam.DeleteAccountAliasOutput) - - DeleteAccountPasswordPolicy(*iam.DeleteAccountPasswordPolicyInput) (*iam.DeleteAccountPasswordPolicyOutput, error) - DeleteAccountPasswordPolicyWithContext(aws.Context, *iam.DeleteAccountPasswordPolicyInput, ...request.Option) (*iam.DeleteAccountPasswordPolicyOutput, error) - DeleteAccountPasswordPolicyRequest(*iam.DeleteAccountPasswordPolicyInput) (*request.Request, *iam.DeleteAccountPasswordPolicyOutput) - - DeleteGroup(*iam.DeleteGroupInput) (*iam.DeleteGroupOutput, error) - DeleteGroupWithContext(aws.Context, *iam.DeleteGroupInput, ...request.Option) (*iam.DeleteGroupOutput, error) - DeleteGroupRequest(*iam.DeleteGroupInput) (*request.Request, *iam.DeleteGroupOutput) - - DeleteGroupPolicy(*iam.DeleteGroupPolicyInput) (*iam.DeleteGroupPolicyOutput, error) - DeleteGroupPolicyWithContext(aws.Context, *iam.DeleteGroupPolicyInput, ...request.Option) (*iam.DeleteGroupPolicyOutput, error) - DeleteGroupPolicyRequest(*iam.DeleteGroupPolicyInput) (*request.Request, *iam.DeleteGroupPolicyOutput) - - DeleteInstanceProfile(*iam.DeleteInstanceProfileInput) (*iam.DeleteInstanceProfileOutput, error) - DeleteInstanceProfileWithContext(aws.Context, *iam.DeleteInstanceProfileInput, ...request.Option) (*iam.DeleteInstanceProfileOutput, error) - DeleteInstanceProfileRequest(*iam.DeleteInstanceProfileInput) (*request.Request, *iam.DeleteInstanceProfileOutput) - - DeleteLoginProfile(*iam.DeleteLoginProfileInput) (*iam.DeleteLoginProfileOutput, error) - DeleteLoginProfileWithContext(aws.Context, *iam.DeleteLoginProfileInput, ...request.Option) (*iam.DeleteLoginProfileOutput, error) - DeleteLoginProfileRequest(*iam.DeleteLoginProfileInput) (*request.Request, *iam.DeleteLoginProfileOutput) - - DeleteOpenIDConnectProvider(*iam.DeleteOpenIDConnectProviderInput) (*iam.DeleteOpenIDConnectProviderOutput, error) - DeleteOpenIDConnectProviderWithContext(aws.Context, *iam.DeleteOpenIDConnectProviderInput, ...request.Option) (*iam.DeleteOpenIDConnectProviderOutput, error) - DeleteOpenIDConnectProviderRequest(*iam.DeleteOpenIDConnectProviderInput) (*request.Request, *iam.DeleteOpenIDConnectProviderOutput) - - DeletePolicy(*iam.DeletePolicyInput) (*iam.DeletePolicyOutput, error) - DeletePolicyWithContext(aws.Context, *iam.DeletePolicyInput, ...request.Option) (*iam.DeletePolicyOutput, error) - DeletePolicyRequest(*iam.DeletePolicyInput) (*request.Request, *iam.DeletePolicyOutput) - - DeletePolicyVersion(*iam.DeletePolicyVersionInput) (*iam.DeletePolicyVersionOutput, error) - DeletePolicyVersionWithContext(aws.Context, *iam.DeletePolicyVersionInput, ...request.Option) (*iam.DeletePolicyVersionOutput, error) - DeletePolicyVersionRequest(*iam.DeletePolicyVersionInput) (*request.Request, *iam.DeletePolicyVersionOutput) - - DeleteRole(*iam.DeleteRoleInput) (*iam.DeleteRoleOutput, error) - DeleteRoleWithContext(aws.Context, *iam.DeleteRoleInput, ...request.Option) (*iam.DeleteRoleOutput, error) - DeleteRoleRequest(*iam.DeleteRoleInput) (*request.Request, *iam.DeleteRoleOutput) - - DeleteRolePermissionsBoundary(*iam.DeleteRolePermissionsBoundaryInput) (*iam.DeleteRolePermissionsBoundaryOutput, error) - DeleteRolePermissionsBoundaryWithContext(aws.Context, *iam.DeleteRolePermissionsBoundaryInput, ...request.Option) (*iam.DeleteRolePermissionsBoundaryOutput, error) - DeleteRolePermissionsBoundaryRequest(*iam.DeleteRolePermissionsBoundaryInput) (*request.Request, *iam.DeleteRolePermissionsBoundaryOutput) - - DeleteRolePolicy(*iam.DeleteRolePolicyInput) (*iam.DeleteRolePolicyOutput, error) - DeleteRolePolicyWithContext(aws.Context, *iam.DeleteRolePolicyInput, ...request.Option) (*iam.DeleteRolePolicyOutput, error) - DeleteRolePolicyRequest(*iam.DeleteRolePolicyInput) (*request.Request, *iam.DeleteRolePolicyOutput) - - DeleteSAMLProvider(*iam.DeleteSAMLProviderInput) (*iam.DeleteSAMLProviderOutput, error) - DeleteSAMLProviderWithContext(aws.Context, *iam.DeleteSAMLProviderInput, ...request.Option) (*iam.DeleteSAMLProviderOutput, error) - DeleteSAMLProviderRequest(*iam.DeleteSAMLProviderInput) (*request.Request, *iam.DeleteSAMLProviderOutput) - - DeleteSSHPublicKey(*iam.DeleteSSHPublicKeyInput) (*iam.DeleteSSHPublicKeyOutput, error) - DeleteSSHPublicKeyWithContext(aws.Context, *iam.DeleteSSHPublicKeyInput, ...request.Option) (*iam.DeleteSSHPublicKeyOutput, error) - DeleteSSHPublicKeyRequest(*iam.DeleteSSHPublicKeyInput) (*request.Request, *iam.DeleteSSHPublicKeyOutput) - - DeleteServerCertificate(*iam.DeleteServerCertificateInput) (*iam.DeleteServerCertificateOutput, error) - DeleteServerCertificateWithContext(aws.Context, *iam.DeleteServerCertificateInput, ...request.Option) (*iam.DeleteServerCertificateOutput, error) - DeleteServerCertificateRequest(*iam.DeleteServerCertificateInput) (*request.Request, *iam.DeleteServerCertificateOutput) - - DeleteServiceLinkedRole(*iam.DeleteServiceLinkedRoleInput) (*iam.DeleteServiceLinkedRoleOutput, error) - DeleteServiceLinkedRoleWithContext(aws.Context, *iam.DeleteServiceLinkedRoleInput, ...request.Option) (*iam.DeleteServiceLinkedRoleOutput, error) - DeleteServiceLinkedRoleRequest(*iam.DeleteServiceLinkedRoleInput) (*request.Request, *iam.DeleteServiceLinkedRoleOutput) - - DeleteServiceSpecificCredential(*iam.DeleteServiceSpecificCredentialInput) (*iam.DeleteServiceSpecificCredentialOutput, error) - DeleteServiceSpecificCredentialWithContext(aws.Context, *iam.DeleteServiceSpecificCredentialInput, ...request.Option) (*iam.DeleteServiceSpecificCredentialOutput, error) - DeleteServiceSpecificCredentialRequest(*iam.DeleteServiceSpecificCredentialInput) (*request.Request, *iam.DeleteServiceSpecificCredentialOutput) - - DeleteSigningCertificate(*iam.DeleteSigningCertificateInput) (*iam.DeleteSigningCertificateOutput, error) - DeleteSigningCertificateWithContext(aws.Context, *iam.DeleteSigningCertificateInput, ...request.Option) (*iam.DeleteSigningCertificateOutput, error) - DeleteSigningCertificateRequest(*iam.DeleteSigningCertificateInput) (*request.Request, *iam.DeleteSigningCertificateOutput) - - DeleteUser(*iam.DeleteUserInput) (*iam.DeleteUserOutput, error) - DeleteUserWithContext(aws.Context, *iam.DeleteUserInput, ...request.Option) (*iam.DeleteUserOutput, error) - DeleteUserRequest(*iam.DeleteUserInput) (*request.Request, *iam.DeleteUserOutput) - - DeleteUserPermissionsBoundary(*iam.DeleteUserPermissionsBoundaryInput) (*iam.DeleteUserPermissionsBoundaryOutput, error) - DeleteUserPermissionsBoundaryWithContext(aws.Context, *iam.DeleteUserPermissionsBoundaryInput, ...request.Option) (*iam.DeleteUserPermissionsBoundaryOutput, error) - DeleteUserPermissionsBoundaryRequest(*iam.DeleteUserPermissionsBoundaryInput) (*request.Request, *iam.DeleteUserPermissionsBoundaryOutput) - - DeleteUserPolicy(*iam.DeleteUserPolicyInput) (*iam.DeleteUserPolicyOutput, error) - DeleteUserPolicyWithContext(aws.Context, *iam.DeleteUserPolicyInput, ...request.Option) (*iam.DeleteUserPolicyOutput, error) - DeleteUserPolicyRequest(*iam.DeleteUserPolicyInput) (*request.Request, *iam.DeleteUserPolicyOutput) - - DeleteVirtualMFADevice(*iam.DeleteVirtualMFADeviceInput) (*iam.DeleteVirtualMFADeviceOutput, error) - DeleteVirtualMFADeviceWithContext(aws.Context, *iam.DeleteVirtualMFADeviceInput, ...request.Option) (*iam.DeleteVirtualMFADeviceOutput, error) - DeleteVirtualMFADeviceRequest(*iam.DeleteVirtualMFADeviceInput) (*request.Request, *iam.DeleteVirtualMFADeviceOutput) - - DetachGroupPolicy(*iam.DetachGroupPolicyInput) (*iam.DetachGroupPolicyOutput, error) - DetachGroupPolicyWithContext(aws.Context, *iam.DetachGroupPolicyInput, ...request.Option) (*iam.DetachGroupPolicyOutput, error) - DetachGroupPolicyRequest(*iam.DetachGroupPolicyInput) (*request.Request, *iam.DetachGroupPolicyOutput) - - DetachRolePolicy(*iam.DetachRolePolicyInput) (*iam.DetachRolePolicyOutput, error) - DetachRolePolicyWithContext(aws.Context, *iam.DetachRolePolicyInput, ...request.Option) (*iam.DetachRolePolicyOutput, error) - DetachRolePolicyRequest(*iam.DetachRolePolicyInput) (*request.Request, *iam.DetachRolePolicyOutput) - - DetachUserPolicy(*iam.DetachUserPolicyInput) (*iam.DetachUserPolicyOutput, error) - DetachUserPolicyWithContext(aws.Context, *iam.DetachUserPolicyInput, ...request.Option) (*iam.DetachUserPolicyOutput, error) - DetachUserPolicyRequest(*iam.DetachUserPolicyInput) (*request.Request, *iam.DetachUserPolicyOutput) - - EnableMFADevice(*iam.EnableMFADeviceInput) (*iam.EnableMFADeviceOutput, error) - EnableMFADeviceWithContext(aws.Context, *iam.EnableMFADeviceInput, ...request.Option) (*iam.EnableMFADeviceOutput, error) - EnableMFADeviceRequest(*iam.EnableMFADeviceInput) (*request.Request, *iam.EnableMFADeviceOutput) - - GenerateCredentialReport(*iam.GenerateCredentialReportInput) (*iam.GenerateCredentialReportOutput, error) - GenerateCredentialReportWithContext(aws.Context, *iam.GenerateCredentialReportInput, ...request.Option) (*iam.GenerateCredentialReportOutput, error) - GenerateCredentialReportRequest(*iam.GenerateCredentialReportInput) (*request.Request, *iam.GenerateCredentialReportOutput) - - GenerateOrganizationsAccessReport(*iam.GenerateOrganizationsAccessReportInput) (*iam.GenerateOrganizationsAccessReportOutput, error) - GenerateOrganizationsAccessReportWithContext(aws.Context, *iam.GenerateOrganizationsAccessReportInput, ...request.Option) (*iam.GenerateOrganizationsAccessReportOutput, error) - GenerateOrganizationsAccessReportRequest(*iam.GenerateOrganizationsAccessReportInput) (*request.Request, *iam.GenerateOrganizationsAccessReportOutput) - - GenerateServiceLastAccessedDetails(*iam.GenerateServiceLastAccessedDetailsInput) (*iam.GenerateServiceLastAccessedDetailsOutput, error) - GenerateServiceLastAccessedDetailsWithContext(aws.Context, *iam.GenerateServiceLastAccessedDetailsInput, ...request.Option) (*iam.GenerateServiceLastAccessedDetailsOutput, error) - GenerateServiceLastAccessedDetailsRequest(*iam.GenerateServiceLastAccessedDetailsInput) (*request.Request, *iam.GenerateServiceLastAccessedDetailsOutput) - - GetAccessKeyLastUsed(*iam.GetAccessKeyLastUsedInput) (*iam.GetAccessKeyLastUsedOutput, error) - GetAccessKeyLastUsedWithContext(aws.Context, *iam.GetAccessKeyLastUsedInput, ...request.Option) (*iam.GetAccessKeyLastUsedOutput, error) - GetAccessKeyLastUsedRequest(*iam.GetAccessKeyLastUsedInput) (*request.Request, *iam.GetAccessKeyLastUsedOutput) - - GetAccountAuthorizationDetails(*iam.GetAccountAuthorizationDetailsInput) (*iam.GetAccountAuthorizationDetailsOutput, error) - GetAccountAuthorizationDetailsWithContext(aws.Context, *iam.GetAccountAuthorizationDetailsInput, ...request.Option) (*iam.GetAccountAuthorizationDetailsOutput, error) - GetAccountAuthorizationDetailsRequest(*iam.GetAccountAuthorizationDetailsInput) (*request.Request, *iam.GetAccountAuthorizationDetailsOutput) - - GetAccountAuthorizationDetailsPages(*iam.GetAccountAuthorizationDetailsInput, func(*iam.GetAccountAuthorizationDetailsOutput, bool) bool) error - GetAccountAuthorizationDetailsPagesWithContext(aws.Context, *iam.GetAccountAuthorizationDetailsInput, func(*iam.GetAccountAuthorizationDetailsOutput, bool) bool, ...request.Option) error - - GetAccountPasswordPolicy(*iam.GetAccountPasswordPolicyInput) (*iam.GetAccountPasswordPolicyOutput, error) - GetAccountPasswordPolicyWithContext(aws.Context, *iam.GetAccountPasswordPolicyInput, ...request.Option) (*iam.GetAccountPasswordPolicyOutput, error) - GetAccountPasswordPolicyRequest(*iam.GetAccountPasswordPolicyInput) (*request.Request, *iam.GetAccountPasswordPolicyOutput) - - GetAccountSummary(*iam.GetAccountSummaryInput) (*iam.GetAccountSummaryOutput, error) - GetAccountSummaryWithContext(aws.Context, *iam.GetAccountSummaryInput, ...request.Option) (*iam.GetAccountSummaryOutput, error) - GetAccountSummaryRequest(*iam.GetAccountSummaryInput) (*request.Request, *iam.GetAccountSummaryOutput) - - GetContextKeysForCustomPolicy(*iam.GetContextKeysForCustomPolicyInput) (*iam.GetContextKeysForPolicyResponse, error) - GetContextKeysForCustomPolicyWithContext(aws.Context, *iam.GetContextKeysForCustomPolicyInput, ...request.Option) (*iam.GetContextKeysForPolicyResponse, error) - GetContextKeysForCustomPolicyRequest(*iam.GetContextKeysForCustomPolicyInput) (*request.Request, *iam.GetContextKeysForPolicyResponse) - - GetContextKeysForPrincipalPolicy(*iam.GetContextKeysForPrincipalPolicyInput) (*iam.GetContextKeysForPolicyResponse, error) - GetContextKeysForPrincipalPolicyWithContext(aws.Context, *iam.GetContextKeysForPrincipalPolicyInput, ...request.Option) (*iam.GetContextKeysForPolicyResponse, error) - GetContextKeysForPrincipalPolicyRequest(*iam.GetContextKeysForPrincipalPolicyInput) (*request.Request, *iam.GetContextKeysForPolicyResponse) - - GetCredentialReport(*iam.GetCredentialReportInput) (*iam.GetCredentialReportOutput, error) - GetCredentialReportWithContext(aws.Context, *iam.GetCredentialReportInput, ...request.Option) (*iam.GetCredentialReportOutput, error) - GetCredentialReportRequest(*iam.GetCredentialReportInput) (*request.Request, *iam.GetCredentialReportOutput) - - GetGroup(*iam.GetGroupInput) (*iam.GetGroupOutput, error) - GetGroupWithContext(aws.Context, *iam.GetGroupInput, ...request.Option) (*iam.GetGroupOutput, error) - GetGroupRequest(*iam.GetGroupInput) (*request.Request, *iam.GetGroupOutput) - - GetGroupPages(*iam.GetGroupInput, func(*iam.GetGroupOutput, bool) bool) error - GetGroupPagesWithContext(aws.Context, *iam.GetGroupInput, func(*iam.GetGroupOutput, bool) bool, ...request.Option) error - - GetGroupPolicy(*iam.GetGroupPolicyInput) (*iam.GetGroupPolicyOutput, error) - GetGroupPolicyWithContext(aws.Context, *iam.GetGroupPolicyInput, ...request.Option) (*iam.GetGroupPolicyOutput, error) - GetGroupPolicyRequest(*iam.GetGroupPolicyInput) (*request.Request, *iam.GetGroupPolicyOutput) - - GetInstanceProfile(*iam.GetInstanceProfileInput) (*iam.GetInstanceProfileOutput, error) - GetInstanceProfileWithContext(aws.Context, *iam.GetInstanceProfileInput, ...request.Option) (*iam.GetInstanceProfileOutput, error) - GetInstanceProfileRequest(*iam.GetInstanceProfileInput) (*request.Request, *iam.GetInstanceProfileOutput) - - GetLoginProfile(*iam.GetLoginProfileInput) (*iam.GetLoginProfileOutput, error) - GetLoginProfileWithContext(aws.Context, *iam.GetLoginProfileInput, ...request.Option) (*iam.GetLoginProfileOutput, error) - GetLoginProfileRequest(*iam.GetLoginProfileInput) (*request.Request, *iam.GetLoginProfileOutput) - - GetMFADevice(*iam.GetMFADeviceInput) (*iam.GetMFADeviceOutput, error) - GetMFADeviceWithContext(aws.Context, *iam.GetMFADeviceInput, ...request.Option) (*iam.GetMFADeviceOutput, error) - GetMFADeviceRequest(*iam.GetMFADeviceInput) (*request.Request, *iam.GetMFADeviceOutput) - - GetOpenIDConnectProvider(*iam.GetOpenIDConnectProviderInput) (*iam.GetOpenIDConnectProviderOutput, error) - GetOpenIDConnectProviderWithContext(aws.Context, *iam.GetOpenIDConnectProviderInput, ...request.Option) (*iam.GetOpenIDConnectProviderOutput, error) - GetOpenIDConnectProviderRequest(*iam.GetOpenIDConnectProviderInput) (*request.Request, *iam.GetOpenIDConnectProviderOutput) - - GetOrganizationsAccessReport(*iam.GetOrganizationsAccessReportInput) (*iam.GetOrganizationsAccessReportOutput, error) - GetOrganizationsAccessReportWithContext(aws.Context, *iam.GetOrganizationsAccessReportInput, ...request.Option) (*iam.GetOrganizationsAccessReportOutput, error) - GetOrganizationsAccessReportRequest(*iam.GetOrganizationsAccessReportInput) (*request.Request, *iam.GetOrganizationsAccessReportOutput) - - GetPolicy(*iam.GetPolicyInput) (*iam.GetPolicyOutput, error) - GetPolicyWithContext(aws.Context, *iam.GetPolicyInput, ...request.Option) (*iam.GetPolicyOutput, error) - GetPolicyRequest(*iam.GetPolicyInput) (*request.Request, *iam.GetPolicyOutput) - - GetPolicyVersion(*iam.GetPolicyVersionInput) (*iam.GetPolicyVersionOutput, error) - GetPolicyVersionWithContext(aws.Context, *iam.GetPolicyVersionInput, ...request.Option) (*iam.GetPolicyVersionOutput, error) - GetPolicyVersionRequest(*iam.GetPolicyVersionInput) (*request.Request, *iam.GetPolicyVersionOutput) - - GetRole(*iam.GetRoleInput) (*iam.GetRoleOutput, error) - GetRoleWithContext(aws.Context, *iam.GetRoleInput, ...request.Option) (*iam.GetRoleOutput, error) - GetRoleRequest(*iam.GetRoleInput) (*request.Request, *iam.GetRoleOutput) - - GetRolePolicy(*iam.GetRolePolicyInput) (*iam.GetRolePolicyOutput, error) - GetRolePolicyWithContext(aws.Context, *iam.GetRolePolicyInput, ...request.Option) (*iam.GetRolePolicyOutput, error) - GetRolePolicyRequest(*iam.GetRolePolicyInput) (*request.Request, *iam.GetRolePolicyOutput) - - GetSAMLProvider(*iam.GetSAMLProviderInput) (*iam.GetSAMLProviderOutput, error) - GetSAMLProviderWithContext(aws.Context, *iam.GetSAMLProviderInput, ...request.Option) (*iam.GetSAMLProviderOutput, error) - GetSAMLProviderRequest(*iam.GetSAMLProviderInput) (*request.Request, *iam.GetSAMLProviderOutput) - - GetSSHPublicKey(*iam.GetSSHPublicKeyInput) (*iam.GetSSHPublicKeyOutput, error) - GetSSHPublicKeyWithContext(aws.Context, *iam.GetSSHPublicKeyInput, ...request.Option) (*iam.GetSSHPublicKeyOutput, error) - GetSSHPublicKeyRequest(*iam.GetSSHPublicKeyInput) (*request.Request, *iam.GetSSHPublicKeyOutput) - - GetServerCertificate(*iam.GetServerCertificateInput) (*iam.GetServerCertificateOutput, error) - GetServerCertificateWithContext(aws.Context, *iam.GetServerCertificateInput, ...request.Option) (*iam.GetServerCertificateOutput, error) - GetServerCertificateRequest(*iam.GetServerCertificateInput) (*request.Request, *iam.GetServerCertificateOutput) - - GetServiceLastAccessedDetails(*iam.GetServiceLastAccessedDetailsInput) (*iam.GetServiceLastAccessedDetailsOutput, error) - GetServiceLastAccessedDetailsWithContext(aws.Context, *iam.GetServiceLastAccessedDetailsInput, ...request.Option) (*iam.GetServiceLastAccessedDetailsOutput, error) - GetServiceLastAccessedDetailsRequest(*iam.GetServiceLastAccessedDetailsInput) (*request.Request, *iam.GetServiceLastAccessedDetailsOutput) - - GetServiceLastAccessedDetailsWithEntities(*iam.GetServiceLastAccessedDetailsWithEntitiesInput) (*iam.GetServiceLastAccessedDetailsWithEntitiesOutput, error) - GetServiceLastAccessedDetailsWithEntitiesWithContext(aws.Context, *iam.GetServiceLastAccessedDetailsWithEntitiesInput, ...request.Option) (*iam.GetServiceLastAccessedDetailsWithEntitiesOutput, error) - GetServiceLastAccessedDetailsWithEntitiesRequest(*iam.GetServiceLastAccessedDetailsWithEntitiesInput) (*request.Request, *iam.GetServiceLastAccessedDetailsWithEntitiesOutput) - - GetServiceLinkedRoleDeletionStatus(*iam.GetServiceLinkedRoleDeletionStatusInput) (*iam.GetServiceLinkedRoleDeletionStatusOutput, error) - GetServiceLinkedRoleDeletionStatusWithContext(aws.Context, *iam.GetServiceLinkedRoleDeletionStatusInput, ...request.Option) (*iam.GetServiceLinkedRoleDeletionStatusOutput, error) - GetServiceLinkedRoleDeletionStatusRequest(*iam.GetServiceLinkedRoleDeletionStatusInput) (*request.Request, *iam.GetServiceLinkedRoleDeletionStatusOutput) - - GetUser(*iam.GetUserInput) (*iam.GetUserOutput, error) - GetUserWithContext(aws.Context, *iam.GetUserInput, ...request.Option) (*iam.GetUserOutput, error) - GetUserRequest(*iam.GetUserInput) (*request.Request, *iam.GetUserOutput) - - GetUserPolicy(*iam.GetUserPolicyInput) (*iam.GetUserPolicyOutput, error) - GetUserPolicyWithContext(aws.Context, *iam.GetUserPolicyInput, ...request.Option) (*iam.GetUserPolicyOutput, error) - GetUserPolicyRequest(*iam.GetUserPolicyInput) (*request.Request, *iam.GetUserPolicyOutput) - - ListAccessKeys(*iam.ListAccessKeysInput) (*iam.ListAccessKeysOutput, error) - ListAccessKeysWithContext(aws.Context, *iam.ListAccessKeysInput, ...request.Option) (*iam.ListAccessKeysOutput, error) - ListAccessKeysRequest(*iam.ListAccessKeysInput) (*request.Request, *iam.ListAccessKeysOutput) - - ListAccessKeysPages(*iam.ListAccessKeysInput, func(*iam.ListAccessKeysOutput, bool) bool) error - ListAccessKeysPagesWithContext(aws.Context, *iam.ListAccessKeysInput, func(*iam.ListAccessKeysOutput, bool) bool, ...request.Option) error - - ListAccountAliases(*iam.ListAccountAliasesInput) (*iam.ListAccountAliasesOutput, error) - ListAccountAliasesWithContext(aws.Context, *iam.ListAccountAliasesInput, ...request.Option) (*iam.ListAccountAliasesOutput, error) - ListAccountAliasesRequest(*iam.ListAccountAliasesInput) (*request.Request, *iam.ListAccountAliasesOutput) - - ListAccountAliasesPages(*iam.ListAccountAliasesInput, func(*iam.ListAccountAliasesOutput, bool) bool) error - ListAccountAliasesPagesWithContext(aws.Context, *iam.ListAccountAliasesInput, func(*iam.ListAccountAliasesOutput, bool) bool, ...request.Option) error - - ListAttachedGroupPolicies(*iam.ListAttachedGroupPoliciesInput) (*iam.ListAttachedGroupPoliciesOutput, error) - ListAttachedGroupPoliciesWithContext(aws.Context, *iam.ListAttachedGroupPoliciesInput, ...request.Option) (*iam.ListAttachedGroupPoliciesOutput, error) - ListAttachedGroupPoliciesRequest(*iam.ListAttachedGroupPoliciesInput) (*request.Request, *iam.ListAttachedGroupPoliciesOutput) - - ListAttachedGroupPoliciesPages(*iam.ListAttachedGroupPoliciesInput, func(*iam.ListAttachedGroupPoliciesOutput, bool) bool) error - ListAttachedGroupPoliciesPagesWithContext(aws.Context, *iam.ListAttachedGroupPoliciesInput, func(*iam.ListAttachedGroupPoliciesOutput, bool) bool, ...request.Option) error - - ListAttachedRolePolicies(*iam.ListAttachedRolePoliciesInput) (*iam.ListAttachedRolePoliciesOutput, error) - ListAttachedRolePoliciesWithContext(aws.Context, *iam.ListAttachedRolePoliciesInput, ...request.Option) (*iam.ListAttachedRolePoliciesOutput, error) - ListAttachedRolePoliciesRequest(*iam.ListAttachedRolePoliciesInput) (*request.Request, *iam.ListAttachedRolePoliciesOutput) - - ListAttachedRolePoliciesPages(*iam.ListAttachedRolePoliciesInput, func(*iam.ListAttachedRolePoliciesOutput, bool) bool) error - ListAttachedRolePoliciesPagesWithContext(aws.Context, *iam.ListAttachedRolePoliciesInput, func(*iam.ListAttachedRolePoliciesOutput, bool) bool, ...request.Option) error - - ListAttachedUserPolicies(*iam.ListAttachedUserPoliciesInput) (*iam.ListAttachedUserPoliciesOutput, error) - ListAttachedUserPoliciesWithContext(aws.Context, *iam.ListAttachedUserPoliciesInput, ...request.Option) (*iam.ListAttachedUserPoliciesOutput, error) - ListAttachedUserPoliciesRequest(*iam.ListAttachedUserPoliciesInput) (*request.Request, *iam.ListAttachedUserPoliciesOutput) - - ListAttachedUserPoliciesPages(*iam.ListAttachedUserPoliciesInput, func(*iam.ListAttachedUserPoliciesOutput, bool) bool) error - ListAttachedUserPoliciesPagesWithContext(aws.Context, *iam.ListAttachedUserPoliciesInput, func(*iam.ListAttachedUserPoliciesOutput, bool) bool, ...request.Option) error - - ListEntitiesForPolicy(*iam.ListEntitiesForPolicyInput) (*iam.ListEntitiesForPolicyOutput, error) - ListEntitiesForPolicyWithContext(aws.Context, *iam.ListEntitiesForPolicyInput, ...request.Option) (*iam.ListEntitiesForPolicyOutput, error) - ListEntitiesForPolicyRequest(*iam.ListEntitiesForPolicyInput) (*request.Request, *iam.ListEntitiesForPolicyOutput) - - ListEntitiesForPolicyPages(*iam.ListEntitiesForPolicyInput, func(*iam.ListEntitiesForPolicyOutput, bool) bool) error - ListEntitiesForPolicyPagesWithContext(aws.Context, *iam.ListEntitiesForPolicyInput, func(*iam.ListEntitiesForPolicyOutput, bool) bool, ...request.Option) error - - ListGroupPolicies(*iam.ListGroupPoliciesInput) (*iam.ListGroupPoliciesOutput, error) - ListGroupPoliciesWithContext(aws.Context, *iam.ListGroupPoliciesInput, ...request.Option) (*iam.ListGroupPoliciesOutput, error) - ListGroupPoliciesRequest(*iam.ListGroupPoliciesInput) (*request.Request, *iam.ListGroupPoliciesOutput) - - ListGroupPoliciesPages(*iam.ListGroupPoliciesInput, func(*iam.ListGroupPoliciesOutput, bool) bool) error - ListGroupPoliciesPagesWithContext(aws.Context, *iam.ListGroupPoliciesInput, func(*iam.ListGroupPoliciesOutput, bool) bool, ...request.Option) error - - ListGroups(*iam.ListGroupsInput) (*iam.ListGroupsOutput, error) - ListGroupsWithContext(aws.Context, *iam.ListGroupsInput, ...request.Option) (*iam.ListGroupsOutput, error) - ListGroupsRequest(*iam.ListGroupsInput) (*request.Request, *iam.ListGroupsOutput) - - ListGroupsPages(*iam.ListGroupsInput, func(*iam.ListGroupsOutput, bool) bool) error - ListGroupsPagesWithContext(aws.Context, *iam.ListGroupsInput, func(*iam.ListGroupsOutput, bool) bool, ...request.Option) error - - ListGroupsForUser(*iam.ListGroupsForUserInput) (*iam.ListGroupsForUserOutput, error) - ListGroupsForUserWithContext(aws.Context, *iam.ListGroupsForUserInput, ...request.Option) (*iam.ListGroupsForUserOutput, error) - ListGroupsForUserRequest(*iam.ListGroupsForUserInput) (*request.Request, *iam.ListGroupsForUserOutput) - - ListGroupsForUserPages(*iam.ListGroupsForUserInput, func(*iam.ListGroupsForUserOutput, bool) bool) error - ListGroupsForUserPagesWithContext(aws.Context, *iam.ListGroupsForUserInput, func(*iam.ListGroupsForUserOutput, bool) bool, ...request.Option) error - - ListInstanceProfileTags(*iam.ListInstanceProfileTagsInput) (*iam.ListInstanceProfileTagsOutput, error) - ListInstanceProfileTagsWithContext(aws.Context, *iam.ListInstanceProfileTagsInput, ...request.Option) (*iam.ListInstanceProfileTagsOutput, error) - ListInstanceProfileTagsRequest(*iam.ListInstanceProfileTagsInput) (*request.Request, *iam.ListInstanceProfileTagsOutput) - - ListInstanceProfileTagsPages(*iam.ListInstanceProfileTagsInput, func(*iam.ListInstanceProfileTagsOutput, bool) bool) error - ListInstanceProfileTagsPagesWithContext(aws.Context, *iam.ListInstanceProfileTagsInput, func(*iam.ListInstanceProfileTagsOutput, bool) bool, ...request.Option) error - - ListInstanceProfiles(*iam.ListInstanceProfilesInput) (*iam.ListInstanceProfilesOutput, error) - ListInstanceProfilesWithContext(aws.Context, *iam.ListInstanceProfilesInput, ...request.Option) (*iam.ListInstanceProfilesOutput, error) - ListInstanceProfilesRequest(*iam.ListInstanceProfilesInput) (*request.Request, *iam.ListInstanceProfilesOutput) - - ListInstanceProfilesPages(*iam.ListInstanceProfilesInput, func(*iam.ListInstanceProfilesOutput, bool) bool) error - ListInstanceProfilesPagesWithContext(aws.Context, *iam.ListInstanceProfilesInput, func(*iam.ListInstanceProfilesOutput, bool) bool, ...request.Option) error - - ListInstanceProfilesForRole(*iam.ListInstanceProfilesForRoleInput) (*iam.ListInstanceProfilesForRoleOutput, error) - ListInstanceProfilesForRoleWithContext(aws.Context, *iam.ListInstanceProfilesForRoleInput, ...request.Option) (*iam.ListInstanceProfilesForRoleOutput, error) - ListInstanceProfilesForRoleRequest(*iam.ListInstanceProfilesForRoleInput) (*request.Request, *iam.ListInstanceProfilesForRoleOutput) - - ListInstanceProfilesForRolePages(*iam.ListInstanceProfilesForRoleInput, func(*iam.ListInstanceProfilesForRoleOutput, bool) bool) error - ListInstanceProfilesForRolePagesWithContext(aws.Context, *iam.ListInstanceProfilesForRoleInput, func(*iam.ListInstanceProfilesForRoleOutput, bool) bool, ...request.Option) error - - ListMFADeviceTags(*iam.ListMFADeviceTagsInput) (*iam.ListMFADeviceTagsOutput, error) - ListMFADeviceTagsWithContext(aws.Context, *iam.ListMFADeviceTagsInput, ...request.Option) (*iam.ListMFADeviceTagsOutput, error) - ListMFADeviceTagsRequest(*iam.ListMFADeviceTagsInput) (*request.Request, *iam.ListMFADeviceTagsOutput) - - ListMFADeviceTagsPages(*iam.ListMFADeviceTagsInput, func(*iam.ListMFADeviceTagsOutput, bool) bool) error - ListMFADeviceTagsPagesWithContext(aws.Context, *iam.ListMFADeviceTagsInput, func(*iam.ListMFADeviceTagsOutput, bool) bool, ...request.Option) error - - ListMFADevices(*iam.ListMFADevicesInput) (*iam.ListMFADevicesOutput, error) - ListMFADevicesWithContext(aws.Context, *iam.ListMFADevicesInput, ...request.Option) (*iam.ListMFADevicesOutput, error) - ListMFADevicesRequest(*iam.ListMFADevicesInput) (*request.Request, *iam.ListMFADevicesOutput) - - ListMFADevicesPages(*iam.ListMFADevicesInput, func(*iam.ListMFADevicesOutput, bool) bool) error - ListMFADevicesPagesWithContext(aws.Context, *iam.ListMFADevicesInput, func(*iam.ListMFADevicesOutput, bool) bool, ...request.Option) error - - ListOpenIDConnectProviderTags(*iam.ListOpenIDConnectProviderTagsInput) (*iam.ListOpenIDConnectProviderTagsOutput, error) - ListOpenIDConnectProviderTagsWithContext(aws.Context, *iam.ListOpenIDConnectProviderTagsInput, ...request.Option) (*iam.ListOpenIDConnectProviderTagsOutput, error) - ListOpenIDConnectProviderTagsRequest(*iam.ListOpenIDConnectProviderTagsInput) (*request.Request, *iam.ListOpenIDConnectProviderTagsOutput) - - ListOpenIDConnectProviderTagsPages(*iam.ListOpenIDConnectProviderTagsInput, func(*iam.ListOpenIDConnectProviderTagsOutput, bool) bool) error - ListOpenIDConnectProviderTagsPagesWithContext(aws.Context, *iam.ListOpenIDConnectProviderTagsInput, func(*iam.ListOpenIDConnectProviderTagsOutput, bool) bool, ...request.Option) error - - ListOpenIDConnectProviders(*iam.ListOpenIDConnectProvidersInput) (*iam.ListOpenIDConnectProvidersOutput, error) - ListOpenIDConnectProvidersWithContext(aws.Context, *iam.ListOpenIDConnectProvidersInput, ...request.Option) (*iam.ListOpenIDConnectProvidersOutput, error) - ListOpenIDConnectProvidersRequest(*iam.ListOpenIDConnectProvidersInput) (*request.Request, *iam.ListOpenIDConnectProvidersOutput) - - ListPolicies(*iam.ListPoliciesInput) (*iam.ListPoliciesOutput, error) - ListPoliciesWithContext(aws.Context, *iam.ListPoliciesInput, ...request.Option) (*iam.ListPoliciesOutput, error) - ListPoliciesRequest(*iam.ListPoliciesInput) (*request.Request, *iam.ListPoliciesOutput) - - ListPoliciesPages(*iam.ListPoliciesInput, func(*iam.ListPoliciesOutput, bool) bool) error - ListPoliciesPagesWithContext(aws.Context, *iam.ListPoliciesInput, func(*iam.ListPoliciesOutput, bool) bool, ...request.Option) error - - ListPoliciesGrantingServiceAccess(*iam.ListPoliciesGrantingServiceAccessInput) (*iam.ListPoliciesGrantingServiceAccessOutput, error) - ListPoliciesGrantingServiceAccessWithContext(aws.Context, *iam.ListPoliciesGrantingServiceAccessInput, ...request.Option) (*iam.ListPoliciesGrantingServiceAccessOutput, error) - ListPoliciesGrantingServiceAccessRequest(*iam.ListPoliciesGrantingServiceAccessInput) (*request.Request, *iam.ListPoliciesGrantingServiceAccessOutput) - - ListPolicyTags(*iam.ListPolicyTagsInput) (*iam.ListPolicyTagsOutput, error) - ListPolicyTagsWithContext(aws.Context, *iam.ListPolicyTagsInput, ...request.Option) (*iam.ListPolicyTagsOutput, error) - ListPolicyTagsRequest(*iam.ListPolicyTagsInput) (*request.Request, *iam.ListPolicyTagsOutput) - - ListPolicyTagsPages(*iam.ListPolicyTagsInput, func(*iam.ListPolicyTagsOutput, bool) bool) error - ListPolicyTagsPagesWithContext(aws.Context, *iam.ListPolicyTagsInput, func(*iam.ListPolicyTagsOutput, bool) bool, ...request.Option) error - - ListPolicyVersions(*iam.ListPolicyVersionsInput) (*iam.ListPolicyVersionsOutput, error) - ListPolicyVersionsWithContext(aws.Context, *iam.ListPolicyVersionsInput, ...request.Option) (*iam.ListPolicyVersionsOutput, error) - ListPolicyVersionsRequest(*iam.ListPolicyVersionsInput) (*request.Request, *iam.ListPolicyVersionsOutput) - - ListPolicyVersionsPages(*iam.ListPolicyVersionsInput, func(*iam.ListPolicyVersionsOutput, bool) bool) error - ListPolicyVersionsPagesWithContext(aws.Context, *iam.ListPolicyVersionsInput, func(*iam.ListPolicyVersionsOutput, bool) bool, ...request.Option) error - - ListRolePolicies(*iam.ListRolePoliciesInput) (*iam.ListRolePoliciesOutput, error) - ListRolePoliciesWithContext(aws.Context, *iam.ListRolePoliciesInput, ...request.Option) (*iam.ListRolePoliciesOutput, error) - ListRolePoliciesRequest(*iam.ListRolePoliciesInput) (*request.Request, *iam.ListRolePoliciesOutput) - - ListRolePoliciesPages(*iam.ListRolePoliciesInput, func(*iam.ListRolePoliciesOutput, bool) bool) error - ListRolePoliciesPagesWithContext(aws.Context, *iam.ListRolePoliciesInput, func(*iam.ListRolePoliciesOutput, bool) bool, ...request.Option) error - - ListRoleTags(*iam.ListRoleTagsInput) (*iam.ListRoleTagsOutput, error) - ListRoleTagsWithContext(aws.Context, *iam.ListRoleTagsInput, ...request.Option) (*iam.ListRoleTagsOutput, error) - ListRoleTagsRequest(*iam.ListRoleTagsInput) (*request.Request, *iam.ListRoleTagsOutput) - - ListRoleTagsPages(*iam.ListRoleTagsInput, func(*iam.ListRoleTagsOutput, bool) bool) error - ListRoleTagsPagesWithContext(aws.Context, *iam.ListRoleTagsInput, func(*iam.ListRoleTagsOutput, bool) bool, ...request.Option) error - - ListRoles(*iam.ListRolesInput) (*iam.ListRolesOutput, error) - ListRolesWithContext(aws.Context, *iam.ListRolesInput, ...request.Option) (*iam.ListRolesOutput, error) - ListRolesRequest(*iam.ListRolesInput) (*request.Request, *iam.ListRolesOutput) - - ListRolesPages(*iam.ListRolesInput, func(*iam.ListRolesOutput, bool) bool) error - ListRolesPagesWithContext(aws.Context, *iam.ListRolesInput, func(*iam.ListRolesOutput, bool) bool, ...request.Option) error - - ListSAMLProviderTags(*iam.ListSAMLProviderTagsInput) (*iam.ListSAMLProviderTagsOutput, error) - ListSAMLProviderTagsWithContext(aws.Context, *iam.ListSAMLProviderTagsInput, ...request.Option) (*iam.ListSAMLProviderTagsOutput, error) - ListSAMLProviderTagsRequest(*iam.ListSAMLProviderTagsInput) (*request.Request, *iam.ListSAMLProviderTagsOutput) - - ListSAMLProviderTagsPages(*iam.ListSAMLProviderTagsInput, func(*iam.ListSAMLProviderTagsOutput, bool) bool) error - ListSAMLProviderTagsPagesWithContext(aws.Context, *iam.ListSAMLProviderTagsInput, func(*iam.ListSAMLProviderTagsOutput, bool) bool, ...request.Option) error - - ListSAMLProviders(*iam.ListSAMLProvidersInput) (*iam.ListSAMLProvidersOutput, error) - ListSAMLProvidersWithContext(aws.Context, *iam.ListSAMLProvidersInput, ...request.Option) (*iam.ListSAMLProvidersOutput, error) - ListSAMLProvidersRequest(*iam.ListSAMLProvidersInput) (*request.Request, *iam.ListSAMLProvidersOutput) - - ListSSHPublicKeys(*iam.ListSSHPublicKeysInput) (*iam.ListSSHPublicKeysOutput, error) - ListSSHPublicKeysWithContext(aws.Context, *iam.ListSSHPublicKeysInput, ...request.Option) (*iam.ListSSHPublicKeysOutput, error) - ListSSHPublicKeysRequest(*iam.ListSSHPublicKeysInput) (*request.Request, *iam.ListSSHPublicKeysOutput) - - ListSSHPublicKeysPages(*iam.ListSSHPublicKeysInput, func(*iam.ListSSHPublicKeysOutput, bool) bool) error - ListSSHPublicKeysPagesWithContext(aws.Context, *iam.ListSSHPublicKeysInput, func(*iam.ListSSHPublicKeysOutput, bool) bool, ...request.Option) error - - ListServerCertificateTags(*iam.ListServerCertificateTagsInput) (*iam.ListServerCertificateTagsOutput, error) - ListServerCertificateTagsWithContext(aws.Context, *iam.ListServerCertificateTagsInput, ...request.Option) (*iam.ListServerCertificateTagsOutput, error) - ListServerCertificateTagsRequest(*iam.ListServerCertificateTagsInput) (*request.Request, *iam.ListServerCertificateTagsOutput) - - ListServerCertificateTagsPages(*iam.ListServerCertificateTagsInput, func(*iam.ListServerCertificateTagsOutput, bool) bool) error - ListServerCertificateTagsPagesWithContext(aws.Context, *iam.ListServerCertificateTagsInput, func(*iam.ListServerCertificateTagsOutput, bool) bool, ...request.Option) error - - ListServerCertificates(*iam.ListServerCertificatesInput) (*iam.ListServerCertificatesOutput, error) - ListServerCertificatesWithContext(aws.Context, *iam.ListServerCertificatesInput, ...request.Option) (*iam.ListServerCertificatesOutput, error) - ListServerCertificatesRequest(*iam.ListServerCertificatesInput) (*request.Request, *iam.ListServerCertificatesOutput) - - ListServerCertificatesPages(*iam.ListServerCertificatesInput, func(*iam.ListServerCertificatesOutput, bool) bool) error - ListServerCertificatesPagesWithContext(aws.Context, *iam.ListServerCertificatesInput, func(*iam.ListServerCertificatesOutput, bool) bool, ...request.Option) error - - ListServiceSpecificCredentials(*iam.ListServiceSpecificCredentialsInput) (*iam.ListServiceSpecificCredentialsOutput, error) - ListServiceSpecificCredentialsWithContext(aws.Context, *iam.ListServiceSpecificCredentialsInput, ...request.Option) (*iam.ListServiceSpecificCredentialsOutput, error) - ListServiceSpecificCredentialsRequest(*iam.ListServiceSpecificCredentialsInput) (*request.Request, *iam.ListServiceSpecificCredentialsOutput) - - ListSigningCertificates(*iam.ListSigningCertificatesInput) (*iam.ListSigningCertificatesOutput, error) - ListSigningCertificatesWithContext(aws.Context, *iam.ListSigningCertificatesInput, ...request.Option) (*iam.ListSigningCertificatesOutput, error) - ListSigningCertificatesRequest(*iam.ListSigningCertificatesInput) (*request.Request, *iam.ListSigningCertificatesOutput) - - ListSigningCertificatesPages(*iam.ListSigningCertificatesInput, func(*iam.ListSigningCertificatesOutput, bool) bool) error - ListSigningCertificatesPagesWithContext(aws.Context, *iam.ListSigningCertificatesInput, func(*iam.ListSigningCertificatesOutput, bool) bool, ...request.Option) error - - ListUserPolicies(*iam.ListUserPoliciesInput) (*iam.ListUserPoliciesOutput, error) - ListUserPoliciesWithContext(aws.Context, *iam.ListUserPoliciesInput, ...request.Option) (*iam.ListUserPoliciesOutput, error) - ListUserPoliciesRequest(*iam.ListUserPoliciesInput) (*request.Request, *iam.ListUserPoliciesOutput) - - ListUserPoliciesPages(*iam.ListUserPoliciesInput, func(*iam.ListUserPoliciesOutput, bool) bool) error - ListUserPoliciesPagesWithContext(aws.Context, *iam.ListUserPoliciesInput, func(*iam.ListUserPoliciesOutput, bool) bool, ...request.Option) error - - ListUserTags(*iam.ListUserTagsInput) (*iam.ListUserTagsOutput, error) - ListUserTagsWithContext(aws.Context, *iam.ListUserTagsInput, ...request.Option) (*iam.ListUserTagsOutput, error) - ListUserTagsRequest(*iam.ListUserTagsInput) (*request.Request, *iam.ListUserTagsOutput) - - ListUserTagsPages(*iam.ListUserTagsInput, func(*iam.ListUserTagsOutput, bool) bool) error - ListUserTagsPagesWithContext(aws.Context, *iam.ListUserTagsInput, func(*iam.ListUserTagsOutput, bool) bool, ...request.Option) error - - ListUsers(*iam.ListUsersInput) (*iam.ListUsersOutput, error) - ListUsersWithContext(aws.Context, *iam.ListUsersInput, ...request.Option) (*iam.ListUsersOutput, error) - ListUsersRequest(*iam.ListUsersInput) (*request.Request, *iam.ListUsersOutput) - - ListUsersPages(*iam.ListUsersInput, func(*iam.ListUsersOutput, bool) bool) error - ListUsersPagesWithContext(aws.Context, *iam.ListUsersInput, func(*iam.ListUsersOutput, bool) bool, ...request.Option) error - - ListVirtualMFADevices(*iam.ListVirtualMFADevicesInput) (*iam.ListVirtualMFADevicesOutput, error) - ListVirtualMFADevicesWithContext(aws.Context, *iam.ListVirtualMFADevicesInput, ...request.Option) (*iam.ListVirtualMFADevicesOutput, error) - ListVirtualMFADevicesRequest(*iam.ListVirtualMFADevicesInput) (*request.Request, *iam.ListVirtualMFADevicesOutput) - - ListVirtualMFADevicesPages(*iam.ListVirtualMFADevicesInput, func(*iam.ListVirtualMFADevicesOutput, bool) bool) error - ListVirtualMFADevicesPagesWithContext(aws.Context, *iam.ListVirtualMFADevicesInput, func(*iam.ListVirtualMFADevicesOutput, bool) bool, ...request.Option) error - - PutGroupPolicy(*iam.PutGroupPolicyInput) (*iam.PutGroupPolicyOutput, error) - PutGroupPolicyWithContext(aws.Context, *iam.PutGroupPolicyInput, ...request.Option) (*iam.PutGroupPolicyOutput, error) - PutGroupPolicyRequest(*iam.PutGroupPolicyInput) (*request.Request, *iam.PutGroupPolicyOutput) - - PutRolePermissionsBoundary(*iam.PutRolePermissionsBoundaryInput) (*iam.PutRolePermissionsBoundaryOutput, error) - PutRolePermissionsBoundaryWithContext(aws.Context, *iam.PutRolePermissionsBoundaryInput, ...request.Option) (*iam.PutRolePermissionsBoundaryOutput, error) - PutRolePermissionsBoundaryRequest(*iam.PutRolePermissionsBoundaryInput) (*request.Request, *iam.PutRolePermissionsBoundaryOutput) - - PutRolePolicy(*iam.PutRolePolicyInput) (*iam.PutRolePolicyOutput, error) - PutRolePolicyWithContext(aws.Context, *iam.PutRolePolicyInput, ...request.Option) (*iam.PutRolePolicyOutput, error) - PutRolePolicyRequest(*iam.PutRolePolicyInput) (*request.Request, *iam.PutRolePolicyOutput) - - PutUserPermissionsBoundary(*iam.PutUserPermissionsBoundaryInput) (*iam.PutUserPermissionsBoundaryOutput, error) - PutUserPermissionsBoundaryWithContext(aws.Context, *iam.PutUserPermissionsBoundaryInput, ...request.Option) (*iam.PutUserPermissionsBoundaryOutput, error) - PutUserPermissionsBoundaryRequest(*iam.PutUserPermissionsBoundaryInput) (*request.Request, *iam.PutUserPermissionsBoundaryOutput) - - PutUserPolicy(*iam.PutUserPolicyInput) (*iam.PutUserPolicyOutput, error) - PutUserPolicyWithContext(aws.Context, *iam.PutUserPolicyInput, ...request.Option) (*iam.PutUserPolicyOutput, error) - PutUserPolicyRequest(*iam.PutUserPolicyInput) (*request.Request, *iam.PutUserPolicyOutput) - - RemoveClientIDFromOpenIDConnectProvider(*iam.RemoveClientIDFromOpenIDConnectProviderInput) (*iam.RemoveClientIDFromOpenIDConnectProviderOutput, error) - RemoveClientIDFromOpenIDConnectProviderWithContext(aws.Context, *iam.RemoveClientIDFromOpenIDConnectProviderInput, ...request.Option) (*iam.RemoveClientIDFromOpenIDConnectProviderOutput, error) - RemoveClientIDFromOpenIDConnectProviderRequest(*iam.RemoveClientIDFromOpenIDConnectProviderInput) (*request.Request, *iam.RemoveClientIDFromOpenIDConnectProviderOutput) - - RemoveRoleFromInstanceProfile(*iam.RemoveRoleFromInstanceProfileInput) (*iam.RemoveRoleFromInstanceProfileOutput, error) - RemoveRoleFromInstanceProfileWithContext(aws.Context, *iam.RemoveRoleFromInstanceProfileInput, ...request.Option) (*iam.RemoveRoleFromInstanceProfileOutput, error) - RemoveRoleFromInstanceProfileRequest(*iam.RemoveRoleFromInstanceProfileInput) (*request.Request, *iam.RemoveRoleFromInstanceProfileOutput) - - RemoveUserFromGroup(*iam.RemoveUserFromGroupInput) (*iam.RemoveUserFromGroupOutput, error) - RemoveUserFromGroupWithContext(aws.Context, *iam.RemoveUserFromGroupInput, ...request.Option) (*iam.RemoveUserFromGroupOutput, error) - RemoveUserFromGroupRequest(*iam.RemoveUserFromGroupInput) (*request.Request, *iam.RemoveUserFromGroupOutput) - - ResetServiceSpecificCredential(*iam.ResetServiceSpecificCredentialInput) (*iam.ResetServiceSpecificCredentialOutput, error) - ResetServiceSpecificCredentialWithContext(aws.Context, *iam.ResetServiceSpecificCredentialInput, ...request.Option) (*iam.ResetServiceSpecificCredentialOutput, error) - ResetServiceSpecificCredentialRequest(*iam.ResetServiceSpecificCredentialInput) (*request.Request, *iam.ResetServiceSpecificCredentialOutput) - - ResyncMFADevice(*iam.ResyncMFADeviceInput) (*iam.ResyncMFADeviceOutput, error) - ResyncMFADeviceWithContext(aws.Context, *iam.ResyncMFADeviceInput, ...request.Option) (*iam.ResyncMFADeviceOutput, error) - ResyncMFADeviceRequest(*iam.ResyncMFADeviceInput) (*request.Request, *iam.ResyncMFADeviceOutput) - - SetDefaultPolicyVersion(*iam.SetDefaultPolicyVersionInput) (*iam.SetDefaultPolicyVersionOutput, error) - SetDefaultPolicyVersionWithContext(aws.Context, *iam.SetDefaultPolicyVersionInput, ...request.Option) (*iam.SetDefaultPolicyVersionOutput, error) - SetDefaultPolicyVersionRequest(*iam.SetDefaultPolicyVersionInput) (*request.Request, *iam.SetDefaultPolicyVersionOutput) - - SetSecurityTokenServicePreferences(*iam.SetSecurityTokenServicePreferencesInput) (*iam.SetSecurityTokenServicePreferencesOutput, error) - SetSecurityTokenServicePreferencesWithContext(aws.Context, *iam.SetSecurityTokenServicePreferencesInput, ...request.Option) (*iam.SetSecurityTokenServicePreferencesOutput, error) - SetSecurityTokenServicePreferencesRequest(*iam.SetSecurityTokenServicePreferencesInput) (*request.Request, *iam.SetSecurityTokenServicePreferencesOutput) - - SimulateCustomPolicy(*iam.SimulateCustomPolicyInput) (*iam.SimulatePolicyResponse, error) - SimulateCustomPolicyWithContext(aws.Context, *iam.SimulateCustomPolicyInput, ...request.Option) (*iam.SimulatePolicyResponse, error) - SimulateCustomPolicyRequest(*iam.SimulateCustomPolicyInput) (*request.Request, *iam.SimulatePolicyResponse) - - SimulateCustomPolicyPages(*iam.SimulateCustomPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool) error - SimulateCustomPolicyPagesWithContext(aws.Context, *iam.SimulateCustomPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool, ...request.Option) error - - SimulatePrincipalPolicy(*iam.SimulatePrincipalPolicyInput) (*iam.SimulatePolicyResponse, error) - SimulatePrincipalPolicyWithContext(aws.Context, *iam.SimulatePrincipalPolicyInput, ...request.Option) (*iam.SimulatePolicyResponse, error) - SimulatePrincipalPolicyRequest(*iam.SimulatePrincipalPolicyInput) (*request.Request, *iam.SimulatePolicyResponse) - - SimulatePrincipalPolicyPages(*iam.SimulatePrincipalPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool) error - SimulatePrincipalPolicyPagesWithContext(aws.Context, *iam.SimulatePrincipalPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool, ...request.Option) error - - TagInstanceProfile(*iam.TagInstanceProfileInput) (*iam.TagInstanceProfileOutput, error) - TagInstanceProfileWithContext(aws.Context, *iam.TagInstanceProfileInput, ...request.Option) (*iam.TagInstanceProfileOutput, error) - TagInstanceProfileRequest(*iam.TagInstanceProfileInput) (*request.Request, *iam.TagInstanceProfileOutput) - - TagMFADevice(*iam.TagMFADeviceInput) (*iam.TagMFADeviceOutput, error) - TagMFADeviceWithContext(aws.Context, *iam.TagMFADeviceInput, ...request.Option) (*iam.TagMFADeviceOutput, error) - TagMFADeviceRequest(*iam.TagMFADeviceInput) (*request.Request, *iam.TagMFADeviceOutput) - - TagOpenIDConnectProvider(*iam.TagOpenIDConnectProviderInput) (*iam.TagOpenIDConnectProviderOutput, error) - TagOpenIDConnectProviderWithContext(aws.Context, *iam.TagOpenIDConnectProviderInput, ...request.Option) (*iam.TagOpenIDConnectProviderOutput, error) - TagOpenIDConnectProviderRequest(*iam.TagOpenIDConnectProviderInput) (*request.Request, *iam.TagOpenIDConnectProviderOutput) - - TagPolicy(*iam.TagPolicyInput) (*iam.TagPolicyOutput, error) - TagPolicyWithContext(aws.Context, *iam.TagPolicyInput, ...request.Option) (*iam.TagPolicyOutput, error) - TagPolicyRequest(*iam.TagPolicyInput) (*request.Request, *iam.TagPolicyOutput) - - TagRole(*iam.TagRoleInput) (*iam.TagRoleOutput, error) - TagRoleWithContext(aws.Context, *iam.TagRoleInput, ...request.Option) (*iam.TagRoleOutput, error) - TagRoleRequest(*iam.TagRoleInput) (*request.Request, *iam.TagRoleOutput) - - TagSAMLProvider(*iam.TagSAMLProviderInput) (*iam.TagSAMLProviderOutput, error) - TagSAMLProviderWithContext(aws.Context, *iam.TagSAMLProviderInput, ...request.Option) (*iam.TagSAMLProviderOutput, error) - TagSAMLProviderRequest(*iam.TagSAMLProviderInput) (*request.Request, *iam.TagSAMLProviderOutput) - - TagServerCertificate(*iam.TagServerCertificateInput) (*iam.TagServerCertificateOutput, error) - TagServerCertificateWithContext(aws.Context, *iam.TagServerCertificateInput, ...request.Option) (*iam.TagServerCertificateOutput, error) - TagServerCertificateRequest(*iam.TagServerCertificateInput) (*request.Request, *iam.TagServerCertificateOutput) - - TagUser(*iam.TagUserInput) (*iam.TagUserOutput, error) - TagUserWithContext(aws.Context, *iam.TagUserInput, ...request.Option) (*iam.TagUserOutput, error) - TagUserRequest(*iam.TagUserInput) (*request.Request, *iam.TagUserOutput) - - UntagInstanceProfile(*iam.UntagInstanceProfileInput) (*iam.UntagInstanceProfileOutput, error) - UntagInstanceProfileWithContext(aws.Context, *iam.UntagInstanceProfileInput, ...request.Option) (*iam.UntagInstanceProfileOutput, error) - UntagInstanceProfileRequest(*iam.UntagInstanceProfileInput) (*request.Request, *iam.UntagInstanceProfileOutput) - - UntagMFADevice(*iam.UntagMFADeviceInput) (*iam.UntagMFADeviceOutput, error) - UntagMFADeviceWithContext(aws.Context, *iam.UntagMFADeviceInput, ...request.Option) (*iam.UntagMFADeviceOutput, error) - UntagMFADeviceRequest(*iam.UntagMFADeviceInput) (*request.Request, *iam.UntagMFADeviceOutput) - - UntagOpenIDConnectProvider(*iam.UntagOpenIDConnectProviderInput) (*iam.UntagOpenIDConnectProviderOutput, error) - UntagOpenIDConnectProviderWithContext(aws.Context, *iam.UntagOpenIDConnectProviderInput, ...request.Option) (*iam.UntagOpenIDConnectProviderOutput, error) - UntagOpenIDConnectProviderRequest(*iam.UntagOpenIDConnectProviderInput) (*request.Request, *iam.UntagOpenIDConnectProviderOutput) - - UntagPolicy(*iam.UntagPolicyInput) (*iam.UntagPolicyOutput, error) - UntagPolicyWithContext(aws.Context, *iam.UntagPolicyInput, ...request.Option) (*iam.UntagPolicyOutput, error) - UntagPolicyRequest(*iam.UntagPolicyInput) (*request.Request, *iam.UntagPolicyOutput) - - UntagRole(*iam.UntagRoleInput) (*iam.UntagRoleOutput, error) - UntagRoleWithContext(aws.Context, *iam.UntagRoleInput, ...request.Option) (*iam.UntagRoleOutput, error) - UntagRoleRequest(*iam.UntagRoleInput) (*request.Request, *iam.UntagRoleOutput) - - UntagSAMLProvider(*iam.UntagSAMLProviderInput) (*iam.UntagSAMLProviderOutput, error) - UntagSAMLProviderWithContext(aws.Context, *iam.UntagSAMLProviderInput, ...request.Option) (*iam.UntagSAMLProviderOutput, error) - UntagSAMLProviderRequest(*iam.UntagSAMLProviderInput) (*request.Request, *iam.UntagSAMLProviderOutput) - - UntagServerCertificate(*iam.UntagServerCertificateInput) (*iam.UntagServerCertificateOutput, error) - UntagServerCertificateWithContext(aws.Context, *iam.UntagServerCertificateInput, ...request.Option) (*iam.UntagServerCertificateOutput, error) - UntagServerCertificateRequest(*iam.UntagServerCertificateInput) (*request.Request, *iam.UntagServerCertificateOutput) - - UntagUser(*iam.UntagUserInput) (*iam.UntagUserOutput, error) - UntagUserWithContext(aws.Context, *iam.UntagUserInput, ...request.Option) (*iam.UntagUserOutput, error) - UntagUserRequest(*iam.UntagUserInput) (*request.Request, *iam.UntagUserOutput) - - UpdateAccessKey(*iam.UpdateAccessKeyInput) (*iam.UpdateAccessKeyOutput, error) - UpdateAccessKeyWithContext(aws.Context, *iam.UpdateAccessKeyInput, ...request.Option) (*iam.UpdateAccessKeyOutput, error) - UpdateAccessKeyRequest(*iam.UpdateAccessKeyInput) (*request.Request, *iam.UpdateAccessKeyOutput) - - UpdateAccountPasswordPolicy(*iam.UpdateAccountPasswordPolicyInput) (*iam.UpdateAccountPasswordPolicyOutput, error) - UpdateAccountPasswordPolicyWithContext(aws.Context, *iam.UpdateAccountPasswordPolicyInput, ...request.Option) (*iam.UpdateAccountPasswordPolicyOutput, error) - UpdateAccountPasswordPolicyRequest(*iam.UpdateAccountPasswordPolicyInput) (*request.Request, *iam.UpdateAccountPasswordPolicyOutput) - - UpdateAssumeRolePolicy(*iam.UpdateAssumeRolePolicyInput) (*iam.UpdateAssumeRolePolicyOutput, error) - UpdateAssumeRolePolicyWithContext(aws.Context, *iam.UpdateAssumeRolePolicyInput, ...request.Option) (*iam.UpdateAssumeRolePolicyOutput, error) - UpdateAssumeRolePolicyRequest(*iam.UpdateAssumeRolePolicyInput) (*request.Request, *iam.UpdateAssumeRolePolicyOutput) - - UpdateGroup(*iam.UpdateGroupInput) (*iam.UpdateGroupOutput, error) - UpdateGroupWithContext(aws.Context, *iam.UpdateGroupInput, ...request.Option) (*iam.UpdateGroupOutput, error) - UpdateGroupRequest(*iam.UpdateGroupInput) (*request.Request, *iam.UpdateGroupOutput) - - UpdateLoginProfile(*iam.UpdateLoginProfileInput) (*iam.UpdateLoginProfileOutput, error) - UpdateLoginProfileWithContext(aws.Context, *iam.UpdateLoginProfileInput, ...request.Option) (*iam.UpdateLoginProfileOutput, error) - UpdateLoginProfileRequest(*iam.UpdateLoginProfileInput) (*request.Request, *iam.UpdateLoginProfileOutput) - - UpdateOpenIDConnectProviderThumbprint(*iam.UpdateOpenIDConnectProviderThumbprintInput) (*iam.UpdateOpenIDConnectProviderThumbprintOutput, error) - UpdateOpenIDConnectProviderThumbprintWithContext(aws.Context, *iam.UpdateOpenIDConnectProviderThumbprintInput, ...request.Option) (*iam.UpdateOpenIDConnectProviderThumbprintOutput, error) - UpdateOpenIDConnectProviderThumbprintRequest(*iam.UpdateOpenIDConnectProviderThumbprintInput) (*request.Request, *iam.UpdateOpenIDConnectProviderThumbprintOutput) - - UpdateRole(*iam.UpdateRoleInput) (*iam.UpdateRoleOutput, error) - UpdateRoleWithContext(aws.Context, *iam.UpdateRoleInput, ...request.Option) (*iam.UpdateRoleOutput, error) - UpdateRoleRequest(*iam.UpdateRoleInput) (*request.Request, *iam.UpdateRoleOutput) - - UpdateRoleDescription(*iam.UpdateRoleDescriptionInput) (*iam.UpdateRoleDescriptionOutput, error) - UpdateRoleDescriptionWithContext(aws.Context, *iam.UpdateRoleDescriptionInput, ...request.Option) (*iam.UpdateRoleDescriptionOutput, error) - UpdateRoleDescriptionRequest(*iam.UpdateRoleDescriptionInput) (*request.Request, *iam.UpdateRoleDescriptionOutput) - - UpdateSAMLProvider(*iam.UpdateSAMLProviderInput) (*iam.UpdateSAMLProviderOutput, error) - UpdateSAMLProviderWithContext(aws.Context, *iam.UpdateSAMLProviderInput, ...request.Option) (*iam.UpdateSAMLProviderOutput, error) - UpdateSAMLProviderRequest(*iam.UpdateSAMLProviderInput) (*request.Request, *iam.UpdateSAMLProviderOutput) - - UpdateSSHPublicKey(*iam.UpdateSSHPublicKeyInput) (*iam.UpdateSSHPublicKeyOutput, error) - UpdateSSHPublicKeyWithContext(aws.Context, *iam.UpdateSSHPublicKeyInput, ...request.Option) (*iam.UpdateSSHPublicKeyOutput, error) - UpdateSSHPublicKeyRequest(*iam.UpdateSSHPublicKeyInput) (*request.Request, *iam.UpdateSSHPublicKeyOutput) - - UpdateServerCertificate(*iam.UpdateServerCertificateInput) (*iam.UpdateServerCertificateOutput, error) - UpdateServerCertificateWithContext(aws.Context, *iam.UpdateServerCertificateInput, ...request.Option) (*iam.UpdateServerCertificateOutput, error) - UpdateServerCertificateRequest(*iam.UpdateServerCertificateInput) (*request.Request, *iam.UpdateServerCertificateOutput) - - UpdateServiceSpecificCredential(*iam.UpdateServiceSpecificCredentialInput) (*iam.UpdateServiceSpecificCredentialOutput, error) - UpdateServiceSpecificCredentialWithContext(aws.Context, *iam.UpdateServiceSpecificCredentialInput, ...request.Option) (*iam.UpdateServiceSpecificCredentialOutput, error) - UpdateServiceSpecificCredentialRequest(*iam.UpdateServiceSpecificCredentialInput) (*request.Request, *iam.UpdateServiceSpecificCredentialOutput) - - UpdateSigningCertificate(*iam.UpdateSigningCertificateInput) (*iam.UpdateSigningCertificateOutput, error) - UpdateSigningCertificateWithContext(aws.Context, *iam.UpdateSigningCertificateInput, ...request.Option) (*iam.UpdateSigningCertificateOutput, error) - UpdateSigningCertificateRequest(*iam.UpdateSigningCertificateInput) (*request.Request, *iam.UpdateSigningCertificateOutput) - - UpdateUser(*iam.UpdateUserInput) (*iam.UpdateUserOutput, error) - UpdateUserWithContext(aws.Context, *iam.UpdateUserInput, ...request.Option) (*iam.UpdateUserOutput, error) - UpdateUserRequest(*iam.UpdateUserInput) (*request.Request, *iam.UpdateUserOutput) - - UploadSSHPublicKey(*iam.UploadSSHPublicKeyInput) (*iam.UploadSSHPublicKeyOutput, error) - UploadSSHPublicKeyWithContext(aws.Context, *iam.UploadSSHPublicKeyInput, ...request.Option) (*iam.UploadSSHPublicKeyOutput, error) - UploadSSHPublicKeyRequest(*iam.UploadSSHPublicKeyInput) (*request.Request, *iam.UploadSSHPublicKeyOutput) - - UploadServerCertificate(*iam.UploadServerCertificateInput) (*iam.UploadServerCertificateOutput, error) - UploadServerCertificateWithContext(aws.Context, *iam.UploadServerCertificateInput, ...request.Option) (*iam.UploadServerCertificateOutput, error) - UploadServerCertificateRequest(*iam.UploadServerCertificateInput) (*request.Request, *iam.UploadServerCertificateOutput) - - UploadSigningCertificate(*iam.UploadSigningCertificateInput) (*iam.UploadSigningCertificateOutput, error) - UploadSigningCertificateWithContext(aws.Context, *iam.UploadSigningCertificateInput, ...request.Option) (*iam.UploadSigningCertificateOutput, error) - UploadSigningCertificateRequest(*iam.UploadSigningCertificateInput) (*request.Request, *iam.UploadSigningCertificateOutput) - - WaitUntilInstanceProfileExists(*iam.GetInstanceProfileInput) error - WaitUntilInstanceProfileExistsWithContext(aws.Context, *iam.GetInstanceProfileInput, ...request.WaiterOption) error - - WaitUntilPolicyExists(*iam.GetPolicyInput) error - WaitUntilPolicyExistsWithContext(aws.Context, *iam.GetPolicyInput, ...request.WaiterOption) error - - WaitUntilRoleExists(*iam.GetRoleInput) error - WaitUntilRoleExistsWithContext(aws.Context, *iam.GetRoleInput, ...request.WaiterOption) error - - WaitUntilUserExists(*iam.GetUserInput) error - WaitUntilUserExistsWithContext(aws.Context, *iam.GetUserInput, ...request.WaiterOption) error -} - -var _ IAMAPI = (*iam.IAM)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go b/vendor/github.com/aws/aws-sdk-go/service/iam/service.go deleted file mode 100644 index e4f49a9b8cffb..0000000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iam - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol/query" -) - -// IAM provides the API operation methods for making requests to -// AWS Identity and Access Management. See this package's package overview docs -// for details on the service. -// -// IAM methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type IAM struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "iam" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "IAM" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the IAM client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// -// mySession := session.Must(session.NewSession()) -// -// // Create a IAM client from just a session. -// svc := iam.New(mySession) -// -// // Create a IAM client with additional configuration -// svc := iam.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *IAM { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = EndpointsID - // No Fallback - } - return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *IAM { - svc := &IAM{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2010-05-08", - ResolvedRegion: resolvedRegion, - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a IAM operation and runs any -// custom request initialization. -func (c *IAM) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/iam/waiters.go deleted file mode 100644 index 4331ba37b96f1..0000000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/waiters.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iam - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilInstanceProfileExists uses the IAM API operation -// GetInstanceProfile to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *IAM) WaitUntilInstanceProfileExists(input *GetInstanceProfileInput) error { - return c.WaitUntilInstanceProfileExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceProfileExistsWithContext is an extended version of WaitUntilInstanceProfileExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) WaitUntilInstanceProfileExistsWithContext(ctx aws.Context, input *GetInstanceProfileInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceProfileExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 404, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetInstanceProfileInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetInstanceProfileRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilPolicyExists uses the IAM API operation -// GetPolicy to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *IAM) WaitUntilPolicyExists(input *GetPolicyInput) error { - return c.WaitUntilPolicyExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilPolicyExistsWithContext is an extended version of WaitUntilPolicyExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) WaitUntilPolicyExistsWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilPolicyExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "NoSuchEntity", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilRoleExists uses the IAM API operation -// GetRole to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *IAM) WaitUntilRoleExists(input *GetRoleInput) error { - return c.WaitUntilRoleExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilRoleExistsWithContext is an extended version of WaitUntilRoleExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) WaitUntilRoleExistsWithContext(ctx aws.Context, input *GetRoleInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilRoleExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "NoSuchEntity", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetRoleInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetRoleRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilUserExists uses the IAM API operation -// GetUser to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *IAM) WaitUntilUserExists(input *GetUserInput) error { - return c.WaitUntilUserExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilUserExistsWithContext is an extended version of WaitUntilUserExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *IAM) WaitUntilUserExistsWithContext(ctx aws.Context, input *GetUserInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilUserExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "NoSuchEntity", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetUserInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetUserRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 272f454655ee4..33859d1b5b371 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -189,8 +189,6 @@ github.com/aws/aws-sdk-go/service/elb github.com/aws/aws-sdk-go/service/elb/elbiface github.com/aws/aws-sdk-go/service/elbv2 github.com/aws/aws-sdk-go/service/elbv2/elbv2iface -github.com/aws/aws-sdk-go/service/iam -github.com/aws/aws-sdk-go/service/iam/iamiface github.com/aws/aws-sdk-go/service/kms github.com/aws/aws-sdk-go/service/pricing github.com/aws/aws-sdk-go/service/pricing/pricingiface @@ -274,6 +272,11 @@ github.com/aws/aws-sdk-go-v2/service/eventbridge github.com/aws/aws-sdk-go-v2/service/eventbridge/internal/customizations github.com/aws/aws-sdk-go-v2/service/eventbridge/internal/endpoints github.com/aws/aws-sdk-go-v2/service/eventbridge/types +# github.com/aws/aws-sdk-go-v2/service/iam v1.31.4 +## explicit; go 1.20 +github.com/aws/aws-sdk-go-v2/service/iam +github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints +github.com/aws/aws-sdk-go-v2/service/iam/types # github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding